PDA

View Full Version : texture coordinates issue !



junioryz
09-21-2009, 02:27 AM
Is it somehow possible to set 0,0 as the top left of a texture coordinate sytem?? as this would pretty much solve a problem i'm having with spritesheets.

Basically 0,0 should get the UPPER/top left section of a texture so if i said

0,0 // I'd like this at the top left
0.5,0
0.5,0.5
0,0.5

I'd like the coordinates above to get the top left portion of a texture as i show below.

http://img441.imageshack.us/i/tileset512.jpg/ - i know il get BL from this texture BUT if the texture coordinate system started from the TOP LEFT( as 0,0) it should get me TL and that's what I want as i cant make my spritesheet work properly.

Thanks

todayman
09-21-2009, 06:48 AM
In pre-3.0, there is a texture matrix you can modifiy. Otherwise, you could certainly make that conversion in your shaders.