#Rotate Texture2D in shaders
4 messages · Page 1 of 1 (latest)
rotation is usually done using a matrix multiplication. for rotation a 2x2 matrix should be enough.
you can look here how you can generate the entries based on rotation.
Introduction: Before reading this tutorial, we recommend that you thoroughly read and understand the Vector math tutorial, as this tutorial requires a knowledge of vectors. This tutorial is about t...
rotating the UV inside the vertex shader should be enough, you don't have to calculate it for each pixel. it will also then automatically use the changed uv on sampling the texture, so you don't have to do it a second time.
I'm feeling myself extremely stupid trying to figure out everything written in there.
Feel I'll just edit sprite itself than gonna spend hours trying to implement something like this in shaders.
Thank you very much for the answer!