Bug #25179
Reflection Probes render scaled scenery on top of local
20%
Description
Reflection probes seem to render the scaled scenery and the local scenery together, without clearing the depth buffer in between, and without adjusting for depth/scale differences between the two. This can manifest itself in far away planets appearing on top of local terrain where they shouldn't be visible.
Included is a capture of a cubemap face on stock 1.9.1 using Nvidia Nsight:
Here I am a in low 50km orbit on the far side of the Mun, Kerbin is hidden by the Mun, PQS is activated and rendering.
First the scaled planet is rendered, all is good, then local scenery starts rendering on top, but without clearing the depth buffer, PQS fails the depths check.
How to read the composite image: Left side of the composite is after rendering the scaled scenery, right side is after rendering the local scenery, top part is the color buffer and bottom part is the depth buffer (in both the scaledSpace planet appears closest to the camera, white value in a reverse depth buffer).
History
#1 Updated by blackrack almost 4 years ago
Update:
I ended up writing a script to fix this, first removing the scaledSpace layer from the reflectionProbe camera, and then making it clear only depth, then copying it to use as a scaledSpace Camera that renders before it and clears color+depth.
If you're interested: https://github.com/LGhassen/Scatterer/blob/master/scatterer/Utilities/Camera/ReflectionProbeFixer.cs
#2 Updated by Technicalfool almost 4 years ago
- Status changed from New to Investigating
- Assignee set to Technicalfool
- % Done changed from 0 to 20