Jump to content
  • Advertisement
Sign in to follow this  
frankyz

Texture rotation on a point sprite

This topic is 4635 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

Hi all, does anyone know how to rotate a texture on a point sprite. Is there a way or so you can get the texture coordinates and adjust them or something like that?? Grtz Frank

Share this post


Link to post
Share on other sites
Advertisement
I was wondering the exact same thing some time ago. I tried using the texture transform matrices on the device, but I couln't get those working at all with point sprites. You might be able to write a pixel shader that rotates the UV coordinates around 0.5;0.5 to solve the problem, but I don't know how point sprites are handled in shaders so it's just a guess.

I ended up using billboards when I needed rotating textures, so I can't verify if the shader idea actually works. Anyway, the billboard approach is quite easy to set up and it gives you a bit more freedom, like no restriction on the size, so it might be worth considering too.

Hope this helps... a bit :)

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!