Quantcast
Viewing all articles
Browse latest Browse all 97

Transparent/Diffuse Texture that includes fullforwardShadow

I managed to get a Diffuse fullforwardShadow Working, However I have some textures that are transparent. How could i modify this code to handle this? Shader "Custom/DiffuseForward" { Properties { _MainTex ("Main Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM #pragma surface surf Lambert fullforwardshadows //#pragma target 3.0 uniform sampler2D _MainTex; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { half4 c = tex2D (_MainTex, IN.uv_MainTex); o.Albedo = c.rgb; o.Alpha = c.a; } ENDCG } FallBack "Diffuse" }

Viewing all articles
Browse latest Browse all 97

Trending Articles