Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: proper cube map texture mapping

  1. #1
    Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    The Netherlands

    proper cube map texture mapping

    I've always found it annoying that the cube map texture coordinate arrangement works different than everything else in GL. This was done to match DirectX and RenderMan when it was first introduced. But it requires hacks in texture loaders to swap faces, and unnecessary/ugly code in shaders to flip vector axis. From personal experience, processing of pre-rendered cubemaps is still a hassle anyway (IBL and such), rendering moot the intention of the chosen arrangement to alleviate complexity.

    See also: (skip to "Mapping Texture Coordinates to...")

    It seems like an appropriate time to have this fixed. An extension should be trivial to implement and could be widely supported.

    I'll leave the API to your imagination. I would suggest, however, not to copy the mistake from GL_TEXTURE_CUBE_MAP_SEAMLESS to make it a global state; it should be part of the texture object (e.g. set with glTexParameter).

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    There's already an API for this: it's called a texture matrix.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts