PDA

View Full Version : texturing coordinates issuse



11-08-2003, 10:44 AM
hi!

i have a texture 256 * 512 pixels big
but i would like to UV map a specific pixel
point to the vertex, but problem is here,
because UV mapping is done with floating point numbers from 0.0 to 1.0

i know pixel position and image size,
how do i calculate the actual uv "friendly"
value?

chxfryer
11-08-2003, 11:58 AM
say you want (10,100).

10 * (1.0f / 512),100 * (1.0f / 256)
or simplier 10/512,100/256