Search code examples
opengl3dtexture-mapping

Render face of cube map to a quad


I have a cube map texture in OpenGL, and I'd like to render one face of the cube to a single quad. What texture coordinates should I use? To be concrete, what coordinates should I pick to render the "GL_TEXTURE_CUBE_MAP_POSITIVE_X" face? Or if I shouldn't explicitly define coordinates, how should I use texture coordinate generation in this instance?


Solution

  • The texture coordinates you want are (1, +/-1, +/-1)