Skip to content

Commit 62ca66d

Browse files
committed
fixing shader compilation error and renaming define for fb fetch idx
1 parent b5a042f commit 62ca66d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

com.unity.render-pipelines.universal/Editor/Decal/DecalPass.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ Pass
6464
float4 _SelectionID;
6565
#endif
6666
#if _RENDER_PASS_ENABLED
67-
#define DEPTH_COPY 0
68-
FRAMEBUFFER_INPUT_FLOAT(DEPTH_COPY);
67+
#define GBUFFER3 0
68+
FRAMEBUFFER_INPUT_HALF(GBUFFER3);
6969
#endif
7070
// Includes
7171
$splice(PreGraphIncludes)

com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPassDecal.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ void Frag(PackedVaryings packedInput,
182182
#if defined(DECAL_PROJECTOR)
183183
#if UNITY_REVERSED_Z
184184
#if _RENDER_PASS_ENABLED
185-
float depth = LOAD_FRAMEBUFFER_INPUT(DEPTH_COPY, input.positionCS.xy);
185+
float depth = LOAD_FRAMEBUFFER_INPUT(GBUFFER3, input.positionCS.xy);
186186
#else
187187
float depth = LoadSceneDepth(input.positionCS.xy);
188188
#endif
189189
#else
190190
#if _RENDER_PASS_ENABLED
191-
float depth = lerp(UNITY_NEAR_CLIP_VALUE, 1, LOAD_FRAMEBUFFER_INPUT(DEPTH_COPY, input.positionCS.xy));
191+
float depth = lerp(UNITY_NEAR_CLIP_VALUE, 1, LOAD_FRAMEBUFFER_INPUT(GBUFFER3, input.positionCS.xy));
192192
#else
193193
// Adjust z to match NDC for OpenGL
194194
float depth = lerp(UNITY_NEAR_CLIP_VALUE, 1, LoadSceneDepth(input.positionCS.xy));

0 commit comments

Comments
 (0)