Skip to content

Commit 5a9fdfc

Browse files
authored
Task/fix urp error2022.11 (#285)
* Fixed: URP shader comple errors in 2022.2.11f1. * updated how to use the macro. * did it again. * Tentative fix. * fixed: system requirements.md.
1 parent 602ca84 commit 5a9fdfc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

com.unity.toonshader/Documentation~/System-Requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ The **Unity Toon Shader** is compatible with all the render pipelines, the **Bui
1717
| ---- | ---- | ---- |
1818
| 0.7.x | 2019.4 | 2022.2 |
1919
| 0.8.x | 2020.3.25, 2021.3 | 2022.2 |
20-
| 0.9.x | 2020.3.45, 2021.3.19,2022.2.8 | 2022.2 |
20+
| 0.9.x | 2020.3.45, 2021.3.19,2022.2.11,2023.1 | 2023.1 |
2121

2222

com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
# endif
2626
#endif
2727

28+
#if (UNITY_VERSION >= 202229) && (UNITY_VERSION < 202310)
29+
#define sampler_MainLightShadowmapTexture sampler_LinearClampCompare
30+
#define sampler_AdditionalLightsShadowmapTexture sampler_LinearClampCompare
31+
#endif
2832

2933
#if USE_FORWARD_PLUS && defined(LIGHTMAP_ON) && defined(LIGHTMAP_SHADOW_MIXING)
3034
#define FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK if (_AdditionalLightsColor[lightIndex].a > 0.0h) continue;
@@ -229,6 +233,8 @@
229233
#elif defined(_MAIN_LIGHT_SHADOWS_SCREEN)
230234
return SampleScreenSpaceShadowmap(shadowCoord);
231235
#endif
236+
237+
232238
return SampleShadowmap(TEXTURE2D_ARGS(_MainLightShadowmapTexture, sampler_MainLightShadowmapTexture), shadowCoord, shadowSamplingData, shadowParams, false);
233239
}
234240

0 commit comments

Comments
 (0)