Created
June 17, 2012 18:13
-
-
Save anonymous/2945250 to your computer and use it in GitHub Desktop.
Diffuse + Noise Overlay (MULTIPLY)
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/NoiseOverlayMultiply" { | |
| Properties { | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _Overlay ("Overlay (RGBA)",2D) = "clear" {} | |
| } | |
| SubShader { | |
| Tags { "RenderType"="Opaque" } | |
| LOD 200 | |
| CGPROGRAM | |
| #pragma surface surf Lambert | |
| sampler2D _MainTex; | |
| sampler2D _Overlay; | |
| struct Input { | |
| float2 uv_MainTex; | |
| float2 uv_Overlay; | |
| }; | |
| void surf (Input IN, inout SurfaceOutput o) { | |
| half4 c = tex2D (_MainTex, IN.uv_MainTex); | |
| half4 d = tex2D (_Overlay, IN.uv_Overlay); | |
| c *= d; | |
| o.Albedo = c.rgb; | |
| 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