rise-and-swine/Assets/Shader/Depth MaskUnlit Transparent ZAlways.shader

42 lines
1,012 B
Text
Raw Normal View History

2023-02-25 23:04:03 -05:00
Shader "Depth Mask/Unlit Transparent ZAlways" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
LOD 100
Tags { "IGNOREPROJECTOR" = "true" "QUEUE" = "Transparent+6" "RenderType" = "Transparent" }
Pass {
LOD 100
Tags { "IGNOREPROJECTOR" = "true" "QUEUE" = "Transparent+6" "RenderType" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha
ZTest Always
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata {
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
};
struct v2f {
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert(appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
sampler2D _MainTex;
fixed4 frag(v2f i) : SV_Target
{
return tex2D(_MainTex, i.texcoord);
}
ENDCG
}
}
}