Sign in to follow this  
opossum

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

Recommended Posts

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)

Share this post


Link to post
Share on other sites
[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?[/size][/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this