We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 974d36b commit 4adabf0Copy full SHA for 4adabf0
src/plot.cpp
@@ -1713,6 +1713,14 @@ void PhongRay::on_intersection()
1713
? material()
1714
: lowest_coord().cell;
1715
1716
+ // If we are reflected and have advanced beyond the camera,
1717
+ // the ray is done. This is checked here because we should
1718
+ // kill the ray even if the material is not opaque.
1719
+ if (reflected_ && (r() - plot_.camera_position()).dot(u()) >= 0.0) {
1720
+ stop();
1721
+ return;
1722
+ }
1723
+
1724
// Anything that's not opaque has zero impact on the plot.
1725
if (!plot_.is_id_opaque(hit_id))
1726
return;
0 commit comments