Couple of small optimisation
Add option to build for gprof Do not build by default with the renderstat (they have a reasonable impact on performances) Separated created ray and castedray in the stats Trying to force some simple function to be inlined
This commit is contained in:
@@ -54,6 +54,7 @@ Ray Camera::rayForPixel(uint32_t pixelX, uint32_t pixelY)
|
||||
Tuple origin = this->inverseTransform * Point(0, 0, 0);
|
||||
Tuple direction = (pixel - origin).normalise();
|
||||
|
||||
stats.addCastedRay();
|
||||
return Ray(origin, direction);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user