I am creating a space universe with many distant planets. The far away planets are simple low-poly impostor spheres which are about 1000f away from the camera (scaled to look like big, far-away planets) and they need to be rendered after the skybox and before the rest of the scene.
From reading up on URP it seemed using a second camera was not a good option, as an overlay camera expects to be rendered last. So I use one camera, hide the impostor layer and then render it after the skybox, with a “Render Objects” render feature in the URP Render Asset. This seemed simple.
The problem is that despite trying various setups, it does not render. The closest I have come is when assigning a material override in the render feature, the impostor layer will then render in the scene view, but not on the game view (white sphere here is the impostor):
I tried a bare minimum setup, still no luck. Reproduction steps:
-
New project. Unity 6000.0.26f1. Default URP project setup.
-
Create “impostor” layer.
-
Create two objects. One on default layer, other on impostor layer. Basic unlit URP materials with render type opaque.
-
Camera, set to render all layers except for the impostor layer.
In the URP Renderer Asset, Add render feature → Render Objects. Then set:
- Event: After Rendering Skybox.
- Layer Mask: only render the Impostor layer.
- Overrides:
- Material: Some basic unlit URP material with render type opaque (for testing).
- Depth: Check the box to enable depth overrides. Set the Depth Test to Less Equal and uncheck Write Depth. This should make the impostors appear behind everything else.
Per what I have seen this should now work, rendering the impostor after the skybox and before everything else. Except for the impostors do not show in the game view. I have fiddled with many settings, double checked everything, but as long as the game camera does not have the impostor layer in its mask it just does not render.
I’ve done all this in a clean project, checked quality settings, checked the render pipeline asset, the rendering asset, camera-specific overrides, messed with carious camera settings such as occlusion culling, changed the render feature event to make it render later, and checked the Render Graph Viewer to make sure the render pass actually exists.
It seems the object is being culled during the GPU pass due to a depth test or material issue, but I am using everything default Unity. Changing the depth test did not handle this, nor any of the above. No page could point to other possible reasons. AI told me to submit a bug report.
It must be something obvious. Any ideas or possible issues welcome.
