- Home /
ex2D shader fix
Hi!
Im very new to shader programming, hope you guys could give me some clue with this problem.
Im working with ex2D and looks very good, I have an animated/transparent material. (it's a ninja running)
but if I put a Directional Light, this material is not affected by the light.
How can I get this material affected by directional lighting?
here is the source code of the ex2D shader.
 Shader "ex2D/Alpha Blended" {
     Properties {
         _MainTex ("Atlas Texture", 2D) = "white" {}
        _Color ("Main Color", Color) = (1,1,1,0)
        _Emissive ("Emmisive Color", Color) = (0,0,0,0)
         
         
     }
 
     SubShader {
         Tags { 
             "Queue"="Transparent" 
             "IgnoreProjector"="True" 
             "RenderType"="Transparent" 
         }
         Cull Off 
         Lighting Off
         ZWrite Off 
         Fog { Color (0,0,0,0) }
         Blend SrcAlpha OneMinusSrcAlpha
         
 
         BindChannels {
             Bind "Color", color
             Bind "Vertex", vertex
             Bind "TexCoord", texcoord
         }
 
         
         Pass {
             SetTexture [_MainTex] {
                 combine texture * primary    
             }
         }
     }
 }
 
Have a good one!
Answer by Julien-Lynge · Jun 28, 2013 at 05:12 PM
The line "Lighting Off" might have something to do with it.
I'd suggest reading the documentation on Unity's ShaderLab - everything here is covered rather extensively in the documentation.
Thanks for your answer! but when I turn that line to On, the character is painted in black, I can see the animated black siluete :)
Your answer
 
 
             Follow this Question
Related Questions
How to make my shader have a variable transparency 1 Answer
Transparency from light shader 1 Answer
Receiving Shadows On a Tranparent Shader 1 Answer
Toon Lighted Alpha 1 Answer
GrabPass and Transparent geometry 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                