I was following Computer Graphics from Scratch -- Getting distorted spheres

40 views Asked by At

So I just started learning graphics programming, and got suggested https://gabrielgambetta.com/computer-graphics-from-scratch/ . The explanations are super good, but it provides pseudocode for the reader to implement. I am doing it in cpp (my first project), and am getting distroted spheres. I don't see any problem (maybe something related to doubles etc).

Also this book doesn't talk about how to get image output (just the logic), but thankfully I read the first parts of "Ray tracing in one weekend" book, which introduced me to the programming constructs to make it happen.

https://github.com/mesahilgautam/computer-graphics-from-scratch/tree/main/02-basic-ray-tracing Here's the source code.

I tried it multiple times, but got the same results.

0

There are 0 answers