uv modification after computed normals map, new uv are not used

Started by
0 comments, last by opossum 13 years, 1 month ago
Hello,
I've got a problem with multiple pixel shader.

I sent a heightmap in a pixel shader, where it is blured, and used to calculate a normals texture.
I use renderTarget.GetTexture() to recover this normals texture, which is OK, and passed it to the vertex shader.

In the vertex shader, I create (grid deformation) the model with the heightmap, with some change : I converted it to metric, so the uv are changed.

In another pixel shader, I need to apply the light, using the normals texture, but it seems to don't use the news uv.
To be sure of that, I tried to use the normals map as a texture for the model, and it isn't matched with the geometry. But it's matched with the real rgb texture.
These two texture are identical, except that one is created dynamicaly by the first pixel shader, (before the uv are changed).

Have you got an idea? I can post my code if need, but it is long.

(Sorry for my english)
Advertisement
[font=arial, sans-serif][size=2]To clarify my question:
Is it possible to use other coordinates U and V than those previously used in a pixelshader to create the texture?[/font]

This topic is closed to new replies.

Advertisement