Unity GPU Occlusion Culling Texture Flickering

Hi,

im currently testing resident drawer and gpu occlusion culling for my game.
While using GPU occlusion culling i noticed a really weird bug.
Sometimes textures start flickering like in the screenshots below.
When i turn of gpu occlusion culling everything is fine again.

With GPU Occlusion Culling:

Without GPU Occlusion Culling:

What is going on here? The tank uses default hdrp lit shader.
I checked the requirements for the resident drawer

  • Has a Mesh Renderer component (yes)
  • In the Mesh Renderer component, Light Probes isn’t set to Use Proxy Volume. (i cant find that setting)
  • Uses only static global illumination, not real time global illumination. (contribute gi is turned off)
  • Uses a shader that supports DOTS instancing. (HDRP Lit)
  • Doesn’t move position after one camera finishes rendering and before another camera starts rendering. (Moves in fixed update)
  • Doesn’t use the MaterialPropertyBlock API. (yes)
  • Doesn’t have a script that uses a per-instance callback, for example OnRenderObject. (yes)

Thank you for your help.

1 Like

Such triangular flickering artefacts are typically caused by numerical error in coordinate positions (See examples) and you can prove/disprove this by making the World position of the flickering region close to the camera while the camera is at (0,0,0).
Although HDRP camera relative rendering text indicates that such numerical error is handled, it is not possible for the rendering pipeline (HDPR or otherwise) to solve error created earlier in the application pipeline. Evidence of HDRP numerical jitter with Unity asset.

Another way in which this type of effect can occur, even close to the origin, is when surfaces are so close together that calculations based on even highly accurate coordinates cannot resolve what is in front or behind. The first resolution step should be origin-centering, as indicated above. Then, if the coordinates are not sufficiently accurate, separate the two surfaces by a little and test again.

Hey. Thanks for the reply.
The screenshots were made about 30 meters away from world origin

1 Like

Thanks. I’ll check that out.
maybe i can exclude really small objects from culling other objects

I have tested a bit on found out one thing.
When small mesh screen percentage is 0 it looks like this

When i set it to 0.1 it looks like this

So that probably rules out the most common cause.
I was actually looking at the triangles appearing on the green ground surface and the significant change of the edges between the green ground and the white terrain behind the tank.
The missing/displaced components in the top image appears to be a completely different issue.