Hi, I have a little problem with shaders I discovered when was playing with an edited version of a martinsh’s shader. I simplify It:
Those three cubes share the same material, so they shared the same shader. The shader just change the color to red.
As you can see, two cubes are not colored, and their shading change: there’s a hemi lamp (the vierport is set to GLSL), This is as it look without the shader:
Another weird thing is That if you move the camera (viewport) sometimes the colored cube is other.
The problem is not related to shared materials, because when you duplicate the mesh (but not the material), everything looks right.
Also if you leave the three cubes like that, and copy just one duplicating the mesh, and leaving the other three cubes sharing the mesh. Everything looks right. Apparently, you have to leave two object to share the material, even if that object is in a hidden layer.
So, I can fix it by leaving another mesh (in another layer, or actual layer) share the material of the object with the shader, but Is This considered a bug?
File:
shader problem.blend (86.2 KB)
What is happening?