- Home /
Problem with shadow casting when assign my shader
Hi, When i assign my shader to a GameObject, it doesn't receive and doesn't cast shadows while before assigning shader,the GameObject worked properly with shadows. For example a shader like this:
 Shader "Examples/2 Alpha Blended Textures" {
     Properties {
         _MainTex ("Base (RGB)", 2D) = "white" {}
         _BlendTex ("Alpha Blended (RGBA) ", 2D) = "white" {}
     }
     SubShader {
         Pass {
             // Apply base texture
             SetTexture [_MainTex] {
                 combine texture
             }
             // Blend in the alpha texture using the lerp operator
             SetTexture [_BlendTex] {
                 combine texture lerp (texture) previous
             }
         }
     }
 }
How do I correct it? Thanks
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Jessy · Dec 28, 2011 at 06:57 PM
That shader is written in pure ShaderLab; it is known as a "fixed function" shader. You can't do shadows with that. Learn about surface shaders.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                