MojoMagic
02-21-2004, 07:33 AM
Hi guys,
I've only been using vertex programs for about 12 hours now... So bare with me.
My current goal is to start with a vertex of coordinate (0,0,1).
The vertex program will accept only a pair of texture coordinates. From this I want to use the XTestureCoord to rotate the vertex around the X-axis and same with the Y.
In other words:
1. Defined initial position of vertex (0,0,1).
2.Supplied texture coordinates.
3.rescale texcoord range from 0->1 to -0.5->0.5.
4.Rotate X axis by XTex*90degrees. (ie: somewhere along the 90degree arc - +/-45degrees.
5.Rotate Y axis by YTex*90degrees.
6.Output result as both the new position and the new normal. (Will be unit lenth I presume)
I conceptually understand everything I need EXCEPT steps 4/5. How would I do this? I'm not even sure where to start.
Thanks in advance.
I've only been using vertex programs for about 12 hours now... So bare with me.
My current goal is to start with a vertex of coordinate (0,0,1).
The vertex program will accept only a pair of texture coordinates. From this I want to use the XTestureCoord to rotate the vertex around the X-axis and same with the Y.
In other words:
1. Defined initial position of vertex (0,0,1).
2.Supplied texture coordinates.
3.rescale texcoord range from 0->1 to -0.5->0.5.
4.Rotate X axis by XTex*90degrees. (ie: somewhere along the 90degree arc - +/-45degrees.
5.Rotate Y axis by YTex*90degrees.
6.Output result as both the new position and the new normal. (Will be unit lenth I presume)
I conceptually understand everything I need EXCEPT steps 4/5. How would I do this? I'm not even sure where to start.
Thanks in advance.