How to rotate a texture in a shader, Android
问题 So I have a texture I want to rotate given the angle rotation . Here are my UV coordinates float[] landscapeVerts = { // X, Y, Z, U, V -ratio, -1.0f, z_0, 1.0f, 0.0f, ratio, -1.0f, z_0, 0.0f, 0.0f, -ratio, 1.0f, z_0, 1.0f, 1.0f, ratio, 1.0f, z_0, 0.0f, 1.0f, }; I want to rotate just the UV part. So I built the following matrix to accomplish this in the shader. Matrix.setIdentityM(mProjMatrix, 0); //start with identity matrix Matrix.translateM(mProjMatrix,0,-0.5f,-0.5f,0.0f); // move center to