Skip to content

Commit

Permalink
Fixed shader compiling on URP 17
Browse files Browse the repository at this point in the history
Refer to "#4".

Fixed a shader compiling issue on URP 17.
  • Loading branch information
jiaozi158 committed Aug 28, 2024
1 parent 8d8c7c5 commit a63ee40
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Shaders/MultiPassShell/Lit-MP.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ void frag(Varyings input
inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
inputData.shadowMask = SAMPLE_SHADOWMASK(input.staticLightmapUV);

#if UNITY_VERSION >= 600000
SETUP_DEBUG_TEXTURE_DATA(inputData, UNDO_TRANSFORM_TEX(input.uv, _BaseMap));
#else
SETUP_DEBUG_TEXTURE_DATA(inputData, input.uv, _BaseMap);
#endif

#ifdef _DBUFFER
ApplyDecalToSurfaceData(input.positionCS, surfaceData, inputData);
Expand Down
4 changes: 4 additions & 0 deletions Assets/Shaders/MultiPassShell/LitGBuffer-MP.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ FragmentOutput frag(Varyings input)
inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
inputData.shadowMask = SAMPLE_SHADOWMASK(input.staticLightmapUV);

#if UNITY_VERSION >= 600000
SETUP_DEBUG_TEXTURE_DATA(inputData, UNDO_TRANSFORM_TEX(input.uv, _BaseMap));
#else
SETUP_DEBUG_TEXTURE_DATA(inputData, input.uv, _BaseMap);
#endif

#ifdef _DBUFFER
ApplyDecalToSurfaceData(input.positionCS, surfaceData, inputData);
Expand Down
4 changes: 4 additions & 0 deletions Assets/Shaders/Shell/Lit.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,11 @@ void frag(g2f input
inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
inputData.shadowMask = SAMPLE_SHADOWMASK(input.staticLightmapUV);

#if UNITY_VERSION >= 600000
SETUP_DEBUG_TEXTURE_DATA(inputData, UNDO_TRANSFORM_TEX(input.uv, _BaseMap));
#else
SETUP_DEBUG_TEXTURE_DATA(inputData, input.uv, _BaseMap);
#endif

#ifdef _DBUFFER
ApplyDecalToSurfaceData(input.positionCS, surfaceData, inputData);
Expand Down
4 changes: 4 additions & 0 deletions Assets/Shaders/Shell/LitGBuffer.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ FragmentOutput frag(g2f input)
inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
inputData.shadowMask = SAMPLE_SHADOWMASK(input.staticLightmapUV);

#if UNITY_VERSION >= 600000
SETUP_DEBUG_TEXTURE_DATA(inputData, UNDO_TRANSFORM_TEX(input.uv, _BaseMap));
#else
SETUP_DEBUG_TEXTURE_DATA(inputData, input.uv, _BaseMap);
#endif

#ifdef _DBUFFER
ApplyDecalToSurfaceData(input.positionCS, surfaceData, inputData);
Expand Down

0 comments on commit a63ee40

Please sign in to comment.