In 3.5 I had slightly modified the Vertex Lit Blended to receive Light So that if all the lights were off the particle effect would be completely dark. I tried to move the project over to Unity 4 and now it seems as though the vertex Lighting will not work correctly any more.
When the billboards appear to be facing the camera towards the light they show up black. When I’m on the side opposite the light with just my head lamp on them they do show.
In the inspector they only show their color if I’m in positive or negative Y.
It seems to be something with the vertex shading model, because if I change the particles to a none particle vertex shader that receives lighting I have the same problem.
This is somewhat of a thrown together shader, i’m not extremely confident in writing shaders so I’m hoping some one will be able to help.
Also If the vertex Lighting doesn’t work I was going to try to make it a surface but somewhere I read it had said that you can’t access the normal’s in a shuriken particle effect.
Other settings that might matter.
I’m using Stretched billboards
Another new thing I noticed is the “normal Direction” under the Renderer. I currently have it set to 1 but changing it didn’t seem to make a difference.
This is the shader
Shader "Particles/VertexLit Blended_Hybrid" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_MainTex ("Particle Texture", 2D) = "white" {}
}
//this is broken the shader is not picking up lghts at the right angle
//Tags {"LightMode" = "Vertex"}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
AlphaTest Greater .001
ZWrite Off
ColorMask RGB
Cull Off
Lighting On
ColorMaterial AmbientAndDiffuse
Pass
{
Material
{
Diffuse [_Color]
Ambient [_Color]
Specular [_SpecColor]
//Emission [_Emission]
}
SeparateSpecular On
SetTexture [_MainTex]
{
//Combine previous * texture
Combine texture * primary DOUBLE, texture * primary
}
}
}
}