Singularity/Library/PackageCache/com.unity.render-pipelines..../Shaders/2D/Shadow2D-Unshadow-Geometry....

107 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

2024-05-06 14:45:45 -04:00
Shader "Hidden/Shadow2DUnshadowGeometry"
{
Properties
{
}
SubShader
{
Tags { "RenderType"="Transparent" }
Cull Off
ZWrite Off
ZTest Always
Pass
{
//Bit 0: Composite Shadow Bit, Bit 1: Global Shadow Bit, Bit2: Caster Mask Bit
Stencil
{
Ref 4
ReadMask 4
WriteMask 4
Comp NotEqual
Pass Replace
Fail Keep
}
ColorMask 0
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes
{
float4 vertex : POSITION;
};
struct Varyings
{
float4 vertex : SV_POSITION;
};
Varyings vert (Attributes v)
{
Varyings o;
o.vertex = TransformObjectToHClip(v.vertex.xyz);
return o;
}
half4 frag(Varyings i) : SV_Target
{
return half4(0,0,0,0);
}
ENDHLSL
}
Pass
{
//Bit 0: Composite Shadow Bit, Bit 1: Global Shadow Bit, Bit2: Caster Mask Bit
Stencil
{
Ref 4
ReadMask 4
WriteMask 4
Comp Equal
Pass Zero
Fail Keep
}
ColorMask 0
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes
{
float4 vertex : POSITION;
};
struct Varyings
{
float4 vertex : SV_POSITION;
};
Varyings vert(Attributes v)
{
Varyings o;
o.vertex = TransformObjectToHClip(v.vertex.xyz);
return o;
}
half4 frag(Varyings i) : SV_Target
{
return half4(0,0,0,0);
}
ENDHLSL
}
}
}