Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "FX/StencilMask" {
- Properties{
- _ID("Mask ID", Int) = 1
- }
- SubShader{
- Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+1" }
- ColorMask 0
- ZWrite off
- Stencil{
- Ref[_ID]
- Comp always
- Pass replace
- }
- Pass{
- CGINCLUDE
- struct appdata {
- float4 vertex : POSITION;
- };
- struct v2f {
- float4 pos : SV_POSITION;
- };
- v2f vert(appdata v) {
- v2f o;
- o.pos = UnityObjectToClipPos(v.vertex);
- return o;
- }
- half4 frag(v2f i) : SV_Target{
- return half4(1,1,1,1);
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement