matrix [_Rotation] equivalent for surface shaders.

Is there an easy way to do something similar to matrix [_Rotation] in a surface shader? I simply want to rotate my texture properly, using un-normalized texture coords.

Do you want to rotate your UV coordinates in UV space? If so, this is best done in a vertex program, even if you do the rest in a surface shader.

oops wrote out a long post and hit the ‘reply to thread’ which nuked it. basically i can’t do vertex warping since i need the vertices to stay put for the technique i’m performing. I found a way to do it in the surface shader by passing in the pixel dimensions (width/height of the texture) as uniform values and multiplying my rotation matrix by the uv coords in pixel space, but was wondering if there was an easier way/more correct way, to access pixel dim in a shader.

Could you share how you managed to replace your Rotation as I too am having a major problem with this. My old shader was using the line:

SetTexture [_MainTex] {matrix [_Rotation] combine texture * primary double, texture}

but this broke when we updated to 3.4 and now I’m major stuck at getting it working again.