Advertisement
tonynogo

Demo 16 - Object to pit

Jul 6th, 2017
6,333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Shader "Custom/ObjectToPit" {
  2.     Properties {
  3.         _MainTex ("Base (RGB)", 2D) = "white" {}
  4.     }
  5.     SubShader {
  6.         Tags { "RenderType"="Opaque" }
  7.        
  8.         Stencil {
  9.             Ref 1
  10.             Comp NotEqual
  11.             Pass keep
  12.         }
  13.  
  14.         CGPROGRAM
  15.         #pragma surface surf Lambert
  16.  
  17.         sampler2D _MainTex;
  18.  
  19.         struct Input {
  20.             float2 uv_MainTex;
  21.         };
  22.  
  23.         void surf (Input IN, inout SurfaceOutput o) {
  24.             half4 c = tex2D (_MainTex, IN.uv_MainTex);
  25.             o.Albedo = c.rgb;
  26.             o.Alpha = c.a;
  27.         }
  28.         ENDCG
  29.     }
  30.     FallBack "Diffuse"
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement