Hello,
I’m using planes and quads for backgrounds to my GUI panels within my actual scene. Because of this, the object is taking on lighting behaviours, which I do not want.
Is there away to tell the game object/shader to completely ignore lighting? Because right now, I’m using a directional lightly specifically for my GUIs, which I do not want.
I want to be able to use the absolute colour I have defined in the material shader.
If it helps, I have this shader that allows you to apply an absolute textures to a game object that doesn’t take on any lighting (used for GUI too):
Shader "GUI/Texture Only" {
Properties {
_Color ("Main Color", Color) = (.5,.5,.5,1)
_MainTex ("Texture", 2D) = ""
}
SubShader {Pass { // iPhone 3GS and later
GLSLPROGRAM
varying mediump vec2 uv;
#ifdef VERTEX
void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
uv = gl_MultiTexCoord0.xy;
}
#endif
#ifdef FRAGMENT
uniform lowp sampler2D _MainTex;
void main() {
gl_FragColor = texture2D(_MainTex, uv);
}
#endif
ENDGLSL
}}
SubShader {Pass { // pre-3GS devices, including the September 2009 8GB iPod touch
SetTexture[_MainTex]
}}
}