zeboidlund
zeboidlund

Reputation: 10137

Am I specifying my coordinates properly for a cube map?

So far, my understanding of cube mapping has been that 3D texture coordinates need to be specified for each vertex used within a cube, as opposed to (u,v) coordinates for 2D textures.

Some Assumptions

Which of these assumptions are correct and incorrect? If any are incorrect, please specify why.

Edit

While not necessary, what would be appreciated is an example or, rather, an idea of what the recommended way of going about it would be - using programmable pipeline.

Upvotes: 1

Views: 1686

Answers (1)

datenwolf
datenwolf

Reputation: 162164

Cubemaps are textures that consist of 6 quadratic textures arranged in a cube topology. The only key quantity of cubemap texture coordinates is their direction. In a cubemap its texels are addressed by the direction of a vector originating in the cube's center. It doesn't matter which length the texture coordinate vector has. Say you got two cube map texture coordinates

(1, 1, 0.5)

and

(2, 2, 1)

they both address the same cubemap texel.

Upvotes: 3

Related Questions