UPR 12: terrain shader does not support shadows masks in deferred

the deferred pass just misses the pragmas but includes some older ones?

this is from:
https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLit.shader

Pass
{
Name “GBuffer”
Tags{“LightMode” = “UniversalGBuffer”}
HLSLPROGRAM
#pragma exclude_renderers gles
#pragma target 3.0
#pragma vertex SplatmapVert
#pragma fragment SplatmapFragment
#define _METALLICSPECGLOSSMAP 1
#define _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A 1
// -------------------------------------
// Universal Pipeline keywords
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
//#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
//#pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
#pragma multi_compile _ _SHADOWS_SOFT
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
#pragma multi_compile_fragment _ _LIGHT_LAYERS

Hi @larsbertram1 ,

Could you please submit a bug report for this issue, ideally with a minimal reproduction project?

hi leonhard,

thanks for coming back to me. unfotunately it turns out that shadowmasks in beta 5 are broken in forward and deferred.
and not only on the terrain but also when it comes to the lit shader. although the lit shader looks a bit better.

  • terrain does not pick up the shadowmask at all but goes fully black
  • lit does - at least right after the transition from real time to shadowmasks
  • both drop shadows completely at a certain distance.
  • this happens in forward and deferred in beta 5 now

bug filed (case 1354966)

7383206--901016--shadowmask.gif

Thanks a lot for the report and for bringing this up! We’re looking into it.

Using Linux. Works fine on OpenGL Core, but on Vulkan it has the same issue.