| Age | Commit message (Collapse) | Author |
|
Also decided to not use glam and just do the math myself.
Just didn't want an entire library for such a small thing.
Probably goint to replace Vec3 at some point, just not now.
|
|
Before you could only move the position of the camera.
- Add support for turning camera by holding down left mouse.
- Add support for turning camera with arrow keys.
- Add Mouse move callback for key_inputs.
|
|
println works for a while. Was time to set up something better. Worth
to not that there is a big difference between logging and writing to
the terminal which is why both slog and console was dragged in. Might
seem similar but purpose is not the same.
Most of the time the log is interesting during runtime but user
messages does not belong in the log.
|
|
Once the render is done it saves an PNG.
|
|
|
|
- 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.
|
|
- All data shared between threads are now Arcs since the data is
immutable.
- Remove tokio
- Rustified main
|
|
- 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).
|
|
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.
|
|
|