Created
July 10, 2015 16:48
-
-
Save miguel12345/dffb59db65bf744fbae3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Custom/SeeThrough" { | |
| Properties { | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _NormalColor ("Normal Color", Color) = (1.0,0.0,0.0) | |
| _SeeThroughColor ("See-trough Color", Color) = (0.0,1.0,0.0) | |
| } | |
| SubShader { | |
| Tags { "Queue"="Overlay" } | |
| LOD 200 | |
| Cull Back | |
| CGPROGRAM | |
| #pragma surface surf Lambert | |
| sampler2D _MainTex; | |
| half3 _NormalColor; | |
| struct Input { | |
| float2 uv_MainTex; | |
| }; | |
| void surf (Input IN, inout SurfaceOutput o) { | |
| half4 c = tex2D (_MainTex, IN.uv_MainTex); | |
| o.Albedo = _NormalColor; | |
| o.Alpha = c.a; | |
| } | |
| ENDCG | |
| Cull Back | |
| ZTest Greater | |
| CGPROGRAM | |
| #pragma surface surf Lambert | |
| sampler2D _MainTex; | |
| half3 _SeeThroughColor; | |
| struct Input { | |
| float2 uv_MainTex; | |
| }; | |
| void surf (Input IN, inout SurfaceOutput o) { | |
| half4 c = tex2D (_MainTex, IN.uv_MainTex); | |
| o.Albedo = _SeeThroughColor; | |
| o.Alpha = c.a; | |
| } | |
| ENDCG | |
| } | |
| FallBack "Diffuse" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment