Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "StencilUnlit"
- {
- Properties
- {
- _Color("Color", Color) = (1,1,1,1)
- [IntRange] _StencilID ("Stencil ID", Range(0, 255)) = 0
- }
- SubShader
- {
- Tags
- {
- "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"
- }
- LOD 100
- Stencil
- {
- Ref [_StencilID]
- Comp Equal
- }
- Pass
- {
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- #include "UnityCG.cginc"
- struct appdata
- {
- float4 vertex : POSITION;
- float2 uv : TEXCOORD0;
- };
- struct v2f
- {
- float2 uv : TEXCOORD0;
- float4 vertex : SV_POSITION;
- };
- half4 _Color;
- v2f vert(appdata v)
- {
- v2f o;
- o.vertex = UnityObjectToClipPos(v.vertex);
- o.uv = v.uv;
- return o;
- }
- fixed4 frag(v2f i) : SV_Target
- {
- return _Color;
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement