Skip to content

Commit 9874e1a

Browse files
committed
remove positionCS
(cherry picked from commit d597e61)
1 parent 0c1b842 commit 9874e1a

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ half3 GetLightColor(UtsLight light
356356
utslight.type = 0
357357

358358

359-
int DetermineUTS_MainLightIndex(float3 posW, float4 shadowCoord, float4 positionCS) {
359+
int DetermineUTS_MainLightIndex(float3 posW, float4 shadowCoord) {
360360
UtsLight mainLight;
361361
INIT_UTSLIGHT(mainLight);
362362

@@ -381,7 +381,7 @@ int DetermineUTS_MainLightIndex(float3 posW, float4 shadowCoord, float4 position
381381
return mainLightIndex;
382382
}
383383

384-
UtsLight GetMainUtsLightByID(int index, float3 posW, float4 shadowCoord, float4 positionCS) {
384+
UtsLight GetMainUtsLightByID(int index, float3 posW, float4 shadowCoord) {
385385
UtsLight mainLight;
386386
INIT_UTSLIGHT(mainLight);
387387
if (index == MAINLIGHT_NOT_FOUND)
@@ -454,9 +454,9 @@ VertexOutput vert(VertexInput v) {
454454
#endif
455455

456456
#if defined(_MAIN_LIGHT_SHADOWS) && !defined(_RECEIVE_SHADOWS_OFF)
457-
o.mainLightID = DetermineUTS_MainLightIndex(o.posWorld.xyz, o.shadowCoord, positionCS);
457+
o.mainLightID = DetermineUTS_MainLightIndex(o.posWorld.xyz, o.shadowCoord);
458458
#else
459-
o.mainLightID = DetermineUTS_MainLightIndex(o.posWorld.xyz, 0, positionCS);
459+
o.mainLightID = DetermineUTS_MainLightIndex(o.posWorld.xyz, 0);
460460
#endif
461461

462462
return o;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0
110110
inputData.viewDirectionWS, i.posWorld.xyz, inputData.normalizedScreenSpaceUV);
111111
envColor *= 1.8f;
112112

113-
UtsLight mainLight = GetMainUtsLightByID(i.mainLightID, i.posWorld.xyz, inputData.shadowCoord, i.positionCS);
113+
UtsLight mainLight = GetMainUtsLightByID(i.mainLightID, i.posWorld.xyz, inputData.shadowCoord);
114114

115115
#if defined(_LIGHT_LAYERS)
116116
uint meshRenderingLayers = GetMeshRenderingLayer();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void frag(VertexOutput i, out float4 finalRGBA : SV_Target0
122122
inputData.viewDirectionWS, i.posWorld.xyz, inputData.normalizedScreenSpaceUV);
123123
envColor *= 1.8f;
124124

125-
UtsLight mainLight = GetMainUtsLightByID(i.mainLightID, i.posWorld.xyz, inputData.shadowCoord, i.positionCS);
125+
UtsLight mainLight = GetMainUtsLightByID(i.mainLightID, i.posWorld.xyz, inputData.shadowCoord);
126126

127127
#if defined(_LIGHT_LAYERS)
128128
uint meshRenderingLayers = GetMeshRenderingLayer();

0 commit comments

Comments
 (0)