Sprite Sheet Help

Started by wxwsk8er, January 11, 2015, 19:10:10

Previous topic - Next topic

wxwsk8er


abcdef

you will need to post some code where where you create the texture data and where you bind it, your code doesn't seem to relate to where the problem lies.

bogieman987

What about setting the UV coordinates so that they only encompass the necessary part of the sprite sheet?

So since the sprite sheet is 16x16 blocks, a box is only a small 0.0625 height/width in terms of UV co-ordinates, not pixels.

With that, the top left square would have the following co-ordinates:
X - Y
Top Left: 0.0 - 1.0
Top Right: 0.0625 - 1.0
Bottom Left: 0.0 - 0.9375
Bottom Right: 0.0625 - 0.9375
I believe.
Will soon be an Oracle Certified Associate :D