How to reproduce:
1. Create a new URP project
2. Unzip and import the attached "SimpleTerrainTest.zip" file
3. Open the scene from the zip
4. Set the active URP Renderer Asset’s Rendering Path value to Deferred
5. Observe the Game view
Actual result: Terrain is rendered blue at distance (basemap) and red near the camera (fog color)
Expected result: Terrain is rendered blue
Reproducible with: 6000.3.0a6, 6000.3.14f1, 6000.4.4f1, 6000.5.0b5, 6000.6.0a3
Could not test with: 6000.0.73f1 (ShaderGraphs break upon downgrading and Terrain Shaders sample is only available from 6000.3.0a6)
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Workaround: Set the Base Map Dist. parameter in the affected Terrain tile's settings to 0
This is not a valid workaround because the basemap rendering quality is not the same as the expected shader.
Notes:
- Disabling fog through the lighting settings fixes the issue
- Does not reproduce with forward rendering
Here is the shadergraph used in the zip :
When using the frame debugger, it seems like the terrain isn't properly rendering in GBuffer 4:
When comparing the generated shader code with the URP/TerrainLit shader, the GBuffer passes seem to have some differences in the render states :
URP/TerrainLit : No explicit renderstate declarations (colormask or blend state)
Generated shader :
Cull Back
Blend One Zero
ZTest LEqual
ZWrite On
URP/TerrainLitAdd :
ZWrite Off
Blend 0 One One
Blend 1 One One
Blend 2 One One
Blend 3 One One
Blend 4 Off
Blend 5 Off
Blend 6 Off
ColorMask RGB 0 ColorMask 0 4 ColorMask 0 5
ColorMask 0 6
Generated shader add :