Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
A few small improvements: - change the Checker class so it matches the scene files' intended appearance; - change the default scene to 'forest.fray'; - use the prescribed max trace depth specified in the scene; - do the scene rendertime measurement in main(), and display the result in the window's title bar.
Eliminate some divisions in BBox intersection methods. Since divisions by ray.dir.(x|y|z) happen a lot, it's beneficial to compute the reciprocal of ray.dir before the intersection calculation. This is made with a special, augmented Ray class (RRay). The same kind of optimization can be implemented in other parts of the raytracer, but doing it globally makes no sense: RRay::dir and rdir have to be kept in sync, which is too much work to do (esp. through model-view transformations). This optimization sheds about 1.5% of the render time.