Jump to content
  • Advertisement
Sign in to follow this  
opossum

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

This topic is 2700 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!