I’ve looked some more into this. Please feel free to comment on my math (granted it’s quite poor).

OK, to quote the Red Book:

glRotatef(a,0,1,0) results in :

| cos a, 0, sin a, 0 |

| 0, 1, 0, 0 |

|-sin a, 0, cos a, 0 |

| 0, 0, 0, 1 |

Therefore glRotatef(90,0,1,0) results in :

| 0, 0, 1, 0 |

| 0, 1, 0, 0 |

|-1, 0, 0, 0 |

| 0, 0, 0, 1 |

(This is the matrix I would initialling be sending to my vertex_program.)

Then the vertex_program uses texcoord.x (S) [0->1] and subtracts 0.5 there-by giving a range of [-0.5->0.5].

We take this new S and, in theory, rotate our matrix by it to obtain a vertex specific rotation of [-45deg->45deg].

Problem: This doesn’t look like it’ll work.

I say this because if the final S = 0, then the resulting matrix is NOT an identity matrix as I would have expected… Since a rotation of 0deg is essentially no rotation at all.

Am I barking up the wrong tree? Am I even in the right yard?