3 ms·
From what I see, it's a simplification: rays start from (x, y, -10) and follow the z axis. This is very limited and I guess you'll lose the perspective. Exerci
by laurentlb 4y ago
From what I see, it's a simplification: rays start from (x, y, -10) and follow the z axis. This is very limited and I guess you'll lose the perspective.
Exercise for the reader:
- Update the sample function, pass the ray direction as argument.
- Compute the direction for each ray.
Rays should have a slightly different direction, based on the camera field of view. When you move the camera back or increase the field of view, the donut should get smaller.
Next exercise: move the camera around the donut (but still looking at it).
- d110af5ccf 4y agoIt's an orthographic projection. Ever play an isometric game? https://en.wikipedia.org/wiki/Orthographic_projection#/media/File:Various_projections_of_cube_above_plane.svg https://en.wikipedia.org/wiki/Orthographic_projection#/media...