Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "FOW/Fade In" {
- Properties {
- _FOW ("Fog of war texture", 2D) = "white" {}
- }
- SubShader {
- Tags { "RenderType"="Opaque" }
- LOD 200
- CGPROGRAM
- #pragma surface surf Lambert
- sampler2D _FOW;
- struct Input {
- float2 uv_MainTex;
- };
- void surf( Input IN, inout SurfaceOutput o ) {
- float lastFog = tex2D( _FOW, IN.uv_MainTex ).a;
- if( lastFog < 0.5 ) {
- o.Alpha = lastFog + 0.05;
- }
- o.Alpha = 1;
- }
- ENDCG
- }
- Fallback "Diffuse"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement