Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Custom/Outline Mask" {
- Properties {
- [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest("ZTest", Float) = 0
- }
- SubShader {
- Tags {
- "Queue" = "Transparent+100"
- "RenderType" = "Transparent"
- }
- Pass {
- Name "Mask"
- Cull Off
- ZTest [_ZTest]
- ZWrite Off
- ColorMask 0
- Stencil {
- Ref 1
- Pass Replace
- }
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- struct appdata {
- float4 vertex : POSITION;
- };
- struct v2f {
- float4 position : SV_POSITION;
- };
- v2f vert(appdata input) {
- v2f output;
- output.position = UnityObjectToClipPos(input.vertex);
- return output;
- }
- fixed4 frag(v2f input) : SV_Target {
- return 0;
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement