ssloy / tinyraytracer

A brief computer graphics / rendering course
https://github.com/ssloy/tinyraytracer/wiki
5k stars 333 forks source link

Integer FOV value #8

Closed cl0ne closed 5 years ago

cl0ne commented 5 years ago

https://github.com/ssloy/tinyraytracer/blob/edfb292caad134a9c2df154edc050fb6c6ec3a31/tinyraytracer.cpp#L124 Shouldn't we use float here instead of int?

ssloy commented 5 years ago

nice catch, fixed, thank you.

ema2159 commented 1 year ago

Just in case anyone is asking themselves (like myself) why their results are not matching with the result images shown in the walkthrough, using int instead of float causes an implicit cast which causes the fov value to be exactly 1. So, in most steps, the camera's FOV is set to 1.