[Help] Render Problem unwanted Culling.

I have 2 shaders within an entire scene.

Shader A is for vegetation with a Render Queue of 2001, and everything else is using Shader B of Render Queue 2000.

However, moving Enemies using Shader B are not rendering and remain invisible. See this video here.

The Full Length and Raw capture can be viewed here :

I have yet to try and correct the issue. On the full length video, I demonstrate the invisible enemies using Shader B will appear as soon as the Scene Camera brings them into view. However, this is not always the case. Later in the video, I have both the Game Camera and Scene Camera unable to render enemies. These gameObjects are all Active with Active SkinMeshRenderers.

I also demonstrated that the invisible objects render when pulled several feet away from the Game Camera.

occlusion culling is off for both Shaders.

What are my options to solve this render issue?

I cant remember why I had the vegetation Shader as Opaque 2001, but i set it back to 2000 the problem has yet to return (Face Palm)!

I hope i dont find out the hard way as to why the shader was 2001.

Anyway, why would 2001 cause a render Queue of 2000 to not render? (the initial problem.):eyes:

Update — NVM… it returned. Even with Both Shaders as Render Queue 2000, the enemy shader is still invisible.

So I have tried a List of things.

I have tried a list of things in attempts to make the Enemies render during Gameplay.

On the Enemy

  • Toggled Skin Mesh Renderer = No Results

  • Toggled Dynamic Culling Occlusion = No Results

  • Changed Layer Mask = No Results

On First Person Camera

  • Toggled Camera = No Results

  • Toggled UI Camera = No Results

  • Toggled Occlusion Culling = No Results

  • Changed Near Clipping Plane = No Results

  • Changed Far Clipping Plane = No Results

  • Changed Field of View = Enemies Rendered!

Tests that Work

  • Change Field of View (Update 1: change value from 55 to 150.)

  • Pulling Enemy(s) 50 meters away from Game Camera.

Update #1

  1. Changing FOV does not always work. Changing FOV from 55 to 150 will always reveal invisible enemies.

anyone? i need this resolved ASAP.

Maybe consider that it could be something other than a culling issue.

For example, maybe you are doing alpha testing in the second shader and the cutout value is not set correctly. Or the object fails the depth or stencil test for some reason.

I would use the frame debugger and Renderdoc to check if the draw call is there. If it is, it’s not a culling issue. In RenderDoc, you can see why a pixel wasn’t rendered in the pixel history.

1 Like

I found the issue!

Ragdolling Enemies after death do not reset their Rigs back to origins. This essentially displaces the Bounding Box away from the Root.

So once the Enemy is again brought to scene from the Spawn pool, their bounding box is not in view with the First Person Camera (it was in the ground)!

SOLVED

1 Like