Sign in to follow this  
frankyz

Texture rotation on a point sprite

Recommended Posts

frankyz    122
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
remigius    1172
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

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