Last active
December 4, 2018 04:20
-
-
Save sbmjob/45bd2058b98846fd66dfc1130f08ae70 to your computer and use it in GitHub Desktop.
This file contains 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/Mask_Transparent_ForWeb" | |
{ | |
Properties { | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags | |
{ | |
"Queue" = "Transparent" | |
"IgnoreProjector" = "True" | |
"RenderType" = "Transparent" | |
} | |
LOD 200 | |
// Show back | |
Cull Off | |
CGPROGRAM | |
// Physically based Standard lighting model, and enable shadows on all light types | |
#pragma surface surf Standard alpha:fade | |
#pragma target 3.0 | |
sampler2D _MainTex; | |
struct Input { | |
float2 uv_MainTex; | |
}; | |
void surf (Input IN, inout SurfaceOutputStandard o) { | |
// Albedo comes from a texture tinted by color | |
fixed2 scrolledUV = IN.uv_MainTex; | |
fixed yScrollValue = 1.0 * _Time; | |
scrolledUV += fixed2(0,yScrollValue); | |
fixed4 c = tex2D (_MainTex, scrolledUV); | |
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