Cubemaps

After finding a bug in our render engine, I figure out that cubemaps texture coordinate generation is quite unusual.
Note on cubemap format : texcoord(0,0) is in upper right corner of POSITIVE_X i.e. texCoords3f(1,1,1) maps on pixel(0,0) of image POSITIVE_X, texCoords(1,1,-1) maps on (1, 0) and (1, -1, -1) maps on (0,1)
Cube map layout is hence :

from
Wolfgang Draxinger
:”Cube maps use a top bottom scanline ordering
instead of the bottom up scanline ordering of the normal
textures. But this also implies, that cube maps internally
use a left handed coordinate system”

See http://www.informit.com/articles/article.aspx?p=770639&seqNum=4 and
http://developer.nvidia.com/cube-map-ogl-tutorial

Leave a Reply