Fix shader bug
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 87205e074e30ad64181478668a074bdc
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -165,6 +165,7 @@ Shader "Cainos/Pixel Art Platformer - Village House/Sprite Shadow Mask - 2D Lit"
|
|||||||
UNITY_SETUP_INSTANCE_ID( IN );
|
UNITY_SETUP_INSTANCE_ID( IN );
|
||||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||||
float3 positionWS = IN.positionWS.xyz;
|
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;
|
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);
|
InitializeSurfaceData(Color.rgb, Color.a, Mask, surfaceData);
|
||||||
InputData2D inputData;
|
InputData2D inputData;
|
||||||
InitializeInputData(IN.texCoord0.xy, half2(IN.screenPosition.xy / IN.screenPosition.w), 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);
|
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 );
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||||
|
|
||||||
float3 positionWS = IN.positionWS.xyz;
|
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;
|
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);
|
InitializeInputData(positionWS.xy, half2(IN.texCoord0.xy), inputData);
|
||||||
half4 debugColor = 0;
|
half4 debugColor = 0;
|
||||||
|
|
||||||
SETUP_DEBUG_DATA_2D(inputData, positionWS);
|
SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS);
|
||||||
|
|
||||||
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user