Evak
16-07-2007 04:12:02
I have a shader that blends two sets of textures using vertex colors. I have the covering texture and the texture and the texture underneath blended using the vertex color.
untill now I only used 1 UV and all was fine, I decided to put the two different surfaces on different UV channels using the regular texture units in the .material file, but the 2nd UV channel seems to be ignored. Now I'm uncertain whether I am supposed to set the UV channel being used in the ogre .material texture unit, or in the shader itself.
So, Do I set the UV channel in my 2nd material file or my shader source code?
Here's the result of a quick test where I use 2 UV's set in ofusions texture units.
LEFT Side, material with one UV channel shared by both sets of terrain textures.
RIGHT Side: material with 2 UV channels, the sandy texture uses a second UV tiled 10x more than the striped texture. As you can see, the UV coordinates are not changed, but some weird effect happens with the lighting, so the material is much darker with an off bright highlight.
Anyone know why the 2 UV's don't work, and whats wrong?
untill now I only used 1 UV and all was fine, I decided to put the two different surfaces on different UV channels using the regular texture units in the .material file, but the 2nd UV channel seems to be ignored. Now I'm uncertain whether I am supposed to set the UV channel being used in the ogre .material texture unit, or in the shader itself.
So, Do I set the UV channel in my 2nd material file or my shader source code?
Here's the result of a quick test where I use 2 UV's set in ofusions texture units.
LEFT Side, material with one UV channel shared by both sets of terrain textures.
RIGHT Side: material with 2 UV channels, the sandy texture uses a second UV tiled 10x more than the striped texture. As you can see, the UV coordinates are not changed, but some weird effect happens with the lighting, so the material is much darker with an off bright highlight.
Anyone know why the 2 UV's don't work, and whats wrong?