Fix shader bug
This commit is contained in:
@@ -165,6 +165,7 @@ Shader "Cainos/Pixel Art Platformer - Village House/Sprite Shadow Mask - 2D Lit"
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
float3 positionWS = IN.positionWS.xyz;
|
||||
float3 positionCS = IN.clipPos.xyz / IN.clipPos.w;
|
||||
|
||||
float2 uv_MainTex = IN.texCoord0.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
|
||||
@@ -183,7 +184,7 @@ Shader "Cainos/Pixel Art Platformer - Village House/Sprite Shadow Mask - 2D Lit"
|
||||
InitializeSurfaceData(Color.rgb, Color.a, Mask, surfaceData);
|
||||
InputData2D inputData;
|
||||
InitializeInputData(IN.texCoord0.xy, half2(IN.screenPosition.xy / IN.screenPosition.w), inputData);
|
||||
SETUP_DEBUG_DATA_2D(inputData, positionWS);
|
||||
SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS);
|
||||
return CombinedShapeLightShared(surfaceData, inputData);
|
||||
}
|
||||
|
||||
@@ -434,6 +435,7 @@ Shader "Cainos/Pixel Art Platformer - Village House/Sprite Shadow Mask - 2D Lit"
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
|
||||
float3 positionWS = IN.positionWS.xyz;
|
||||
float3 positionCS = IN.clipPos.xyz / IN.clipPos.w;
|
||||
|
||||
float2 uv_MainTex = IN.texCoord0.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
|
||||
@@ -446,7 +448,7 @@ Shader "Cainos/Pixel Art Platformer - Village House/Sprite Shadow Mask - 2D Lit"
|
||||
InitializeInputData(positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
||||
half4 debugColor = 0;
|
||||
|
||||
SETUP_DEBUG_DATA_2D(inputData, positionWS);
|
||||
SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS);
|
||||
|
||||
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user