Huge speed up by changing how Intersect are shared.
This commit is contained in:
@@ -32,7 +32,8 @@ int main()
|
||||
double worldX = -(wallSize / 2) + pixelSize * x;
|
||||
Point position = Point(worldX, worldY, wallDistance);
|
||||
Ray r = Ray(cameraOrigin, (position - cameraOrigin).normalise());
|
||||
Intersect xs = s.intersect(r);
|
||||
Intersect xs;
|
||||
s.intersect(r, xs);
|
||||
|
||||
if (!xs.hit().nothing())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user