summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-13๐Ÿ“ธ Add Camera defocus blur + OtherSakarias Johansson
Just wanted to add defocus blur but ended up changing a bunch of other this as well. - Moved scenes to a separate folder. - Updated readme with more pretty images. - Add interface for loading scenes. There is currently one for yaml and another if you want a slightly random scene. - Add image action to decide what to do with the final image once its rendered. Currently supports just showing the buffer until you press the render buffer again and saving the image as `png`. - When you use nix shell you will be dropped in the proper folder so you can just do cargo build etc without having to do `cd`.
2023-03-08๐ŸŽฅ Add support for camera looking at direction.Sakarias Johansson
- Set position of camera. - Set look position of camera. - Set FOV
2023-03-08๐Ÿ“ฆ Move scenes into a separate folderSakarias Johansson
2023-03-03โœจ Add image save supportSakarias Johansson
Once the render is done it saves an PNG.
2023-03-03๐Ÿ›  Cleanup error handling & functionalizeSakarias Johansson
2023-02-17๐Ÿงน Refactor rendering & CleanupSakarias Johansson
Refactored how the threading worked. Before it just keept up splitting the screen recursively for x number of times. Felt like using recursion was unnecessary. It's now just done in a loop instead. The user can control the behaviour by setting `num_threads_width` and `num_threads_height` which will split the image x number of times and run a thread for each. Split up the rendering function for one that does scaling and one that doesn't. I just don't want to deal with any kind of scaling when actually rendering the image. The code shouldn't change much so maintaining is going to be ok. - Fixed scaling issues where black bars would appear if the subimage size wasn't divisible by the scale. - Cleaned up a bunch of arcs and other things that wasn't neccesary any more.
2023-01-19๐Ÿ’š Add CI workflowsSakarias Johansson
2023-01-19๐Ÿ“– Add READMESakarias Johansson
2023-01-18๐Ÿ™๏ธ Add support for reading scene from fileSakarias Johansson
2023-01-17๐Ÿ“œ Add config supportSakarias Johansson
2023-01-16๐ŸŽจ Add dialectric materialSakarias Johansson
2023-01-13โœจ Add realtime previewSakarias Johansson
- Preview quality is crude but works good enough. - Add scaling to render function. This helps to make the preview faster because we can use the same result for several pixels. - You can move around the camera a bit with wasd, super basic. - Press R to start/stop rendering the scene.
2023-01-12๐Ÿงน Minor cleanupSakarias Johansson
- Made the traits into supertraits so we don't have to mention Send and Sync everywhere. - Add methods for Vec3 that modifies the existing Vector. Can be used to make less copies.
2023-01-12๐Ÿ–Œ๏ธ Add materialsSakarias Johansson
2023-01-11๐Ÿ”จ Refactors & Use rayonSakarias Johansson
- All data shared between threads are now Arcs since the data is immutable. - Remove tokio - Rustified main
2023-01-08๐ŸŒ Add GeometrySakarias Johansson
- Created a trait for all geometry that has to implement a hit function. Depending on if the ray hits or not it returns an option with the color. - Add support for multiple samples per pixel Current issues: - Using cooperative multitasking which isn't that helpful in this situation since it's like running without async but without overhead. Should switch to rayon. - All data gets copied once per job. Will decide later what to do (copy or put locks and share data between jobs).
2023-01-06โ˜ Add skySakarias Johansson
2023-01-05โšก Prepare asyncnessSakarias Johansson
Creating a bunch of futures that when completed get the buffers copied to the screen buffer updating the screen as it gets done. It's a bit overkill to create a future per row but it can be changed later. Moved hsv_to_rgb to utils. Don't even think it will be needed later.
2023-01-05Initial commit ๐ŸŽ‰Sakarias Johansson