UnityGame/Library/PackageCache/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Geometry.shader

55 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-10-27 10:53:47 +03:00
Shader "Hidden/Shadow2DShadowGeometry"
{
Properties
{
[HideInInspector] _ShadowColorMask("__ShadowColorMask", Int) = 1
}
SubShader
{
Tags { "RenderType"="Opaque" }
Cull Off
BlendOp Add
Blend One One
ZWrite Off
ZTest Always
// Process the shadow
Pass
{
Name "Draw Geometry Shadow (R)"
ColorMask R
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(1,1,1,1);
}
ENDHLSL
}
}
}