I am pretty basic with shaders. I have edited the vertex color shader on the unify wiki to fake some reflections by using a cubemap masked out by the Main textures alpha. What I want to do now is get my shader to be affected by lights. Is this possible: to have a shader using Baked vertex colors to also recieve realtime Unity vertex lights? Basically I want to combine this shader with the standard Unity VertexLit shader. I want specular highlights and realtime vertex lighting in addition to the baked vertex lighting and cubemap reflections. I am not sure how to do this. I have been looking at the unity Vertex Shader here : http://unity3d.com/support/documentation/Components/SL-Material.html I think I need to do somethign like add the Material Block but I am not sure how to properly apply it. Thanks for any advice/ help Code (csharp): Material { Diffuse [_Color] Ambient [_Color] Shininess [_Shininess] Specular [_SpecColor] Emission [_Emission] } Lighting On SeparateSpecular On My edited unify wiki shader. Code (csharp): Shader "MyVertexColors" { Properties { _MainTex ("Texture (A = Reflect)", 2D) = "" {} _Cube ("Reflection Cubemap", Cube) = "_Skybox" { TexGen CubeReflect } } Category { Tags { "Queue"="Geometry" } // Lighting Off BindChannels { Bind "Color", color Bind "Vertex", vertex Bind "TexCoord", texcoord } SubShader { Pass { SetTexture [_MainTex] { Combine texture * primary DOUBLE } SetTexture [_Cube] { combine texture * previous alpha + previous//, previous } } } } }
Are you referring to this shader? It already does combine baked vertex colors with realtime vertex lights. --Eric