Files
JJBB/Assets/Project/Shader/PlayerZ.shader
2024-08-23 15:49:34 +08:00

46 lines
709 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 为半透明角色写入Z值的Shader用于防止模型自己穿透自己
Shader "Zhanyou/Character/PlayerZ"
{
Category
{
Tags { "Queue"="AlphaTest+51" "IgnoreProjector"="True" }
Blend Zero Zero
Cull Back
Lighting Off
ColorMask 0
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
};
struct v2f
{
float4 vertex : SV_POSITION;
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return 0;
}
ENDCG
}
}
}
}