Advertisement
Guest User

ObjectShader

a guest
May 25th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Shader "Custom/HiddenShader1" {
  2. Properties {
  3. _Color ("Color", Color) = (1,1,1,1)
  4. _StencilVal ("stencilVal", Int) = 1
  5. _StencilComp ("stencilComp", Int) = 0
  6. }
  7. SubShader {
  8. Lighting On
  9. Tags { "RenderType"="Opaque" "Queue"="Geometry"}
  10.  
  11. ZWrite On
  12. Stencil {
  13. Ref [_StencilVal]
  14. Comp Always
  15. Pass Replace
  16. }
  17.  
  18. LOD 200
  19.  
  20. CGPROGRAM
  21. #pragma surface surf Lambert
  22.  
  23. sampler2D _MainTex;
  24. fixed4 _Color;
  25.  
  26. struct Input {
  27. float2 uv_MainTex;
  28. };
  29.  
  30. void surf (Input IN, inout SurfaceOutput o) {
  31. fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
  32. o.Albedo = c.rgb;
  33. o.Alpha = c.a;
  34. }
  35. ENDCG
  36. }
  37.  
  38. FallBack "VertexLit"
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement