Re: [Algorithms] negative UV coords
Brought to you by:
vexxed72
|
From: Jon W. <jw...@gm...> - 2008-07-27 19:11:45
|
Jason Hughes wrote: > In this one specific case, where the U or V has been negated (but not > both), and the texture addressing mode is set to wrap, yes the texture > is mirrored. That is only true when you have MIRROR texture addressing mode turned on. This is easy to verify in your modeling tool, which assumes WRAP: the texture is tiled continuously in all directions, including the negative directions. However, the texture MAP may be mirrored on the SCREEN if your texture coordinate gradients don't match your texture memory lay-out and triangle mapping. Most people think that in Direct3D, V goes down-to-up, and in OpenGL, V goes up-to-down. However, that's just an artifact of D3D typically loading BMP textures, and OpenGL typically loading JPG or PNG textures (in the samples that are around). The actual definition is simple: V grows in the direction of the data you pass to the texture. If you pass data with the bottom-most scanline first, V grows upwards. If you pass data with the topmost scanline first, V grows downwards. Sincerely, jw |