100DaysOfGameDev: Day 41
Building a ray tracer is so much fun! It literally cannot stop coding. From the original red green gradient now I already have a cute little sphere. Following is list of stuff I have implemented today, in reverse order ( the feature on top is most recent ):
* added hittable class for management
* stores front/back face information
* Added abstract hittable class, which represents everything that can be
intersected with a ray.
* Imlemented hittable in sphere class.
* simplified sphere_hit code
* Added Sphere Normals. Drawing sphere normals with normal xyz as rgb.
* Added sphere. Added sphere and sphere intersection. Returns red for sphere.
* Added camera, viewport and ray.
* Simple vertical gradient from light blue to white.
And below is the evolution of output image after each major change ( in chronological order )
With Blue Gradient
Returns red color if ray intersects the sphere.
Uses the normal's xyz as rgb to debug.
That's it for today. Code is as always available in my github page. I have implemented some more stuff, but there is currently a bug, so I will leave it for tomorrow. See you!