Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Custom/TransparentBlend" {
- Properties
- {
- _Tex1 ("Base (RGB) Alpha (A)", 2D) = "white" {}
- _Tex2 ("Base (RGB) Alpha (A)", 2D) = "white" {}
- }
- SubShader
- {
- Tags {"Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout"}
- LOD 200
- CGPROGRAM
- #pragma surface surf Lambert alphatest
- sampler2D _Tex1;
- sampler2D _Tex2;
- struct Input {
- float2 uv_Tex1;
- float4 color: COLOR;
- };
- void surf (Input IN, inout SurfaceOutput o) {
- float4 tex1 = tex2D(_Tex1, IN.uv_Tex1);
- float4 tex2 = tex2D(_Tex2, IN.uv_Tex1);
- o.Albedo = IN.color.rgb * tex1 + (1.0 - IN.color.rgb) * tex2;
- o.Alpha = IN.color.a;
- }
- ENDCG
- }
- Fallback "Diffuse"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement