While researching the SSR implementation, I noticed that the far-plane clipping appears to be missing. My initial assumption was that when sceneZMax returns 0 (indicating no geometry), the raymarching process should terminate to save performance.
However, the current behavior seems different: even if sceneZMax is 0 at a certain point, the ray continues to march and might hit an object further along the path. I noticed a conditional check in the source code (see screenshot) that looks like a legacy clipping implementation. But since sceneZMax is currently being assigned an extremely large value later in the code, this check has effectively become dead code.
Given this, should we consider re-introducing far-plane clipping? Since objects beyond the far plane aren’t rendered anyway, continuing the raymarch beyond that point seems like a waste of GPU cycles.
