将立方体贴图的面渲染为四边形 [英] Render face of cube map to a quad

查看:20
本文介绍了将立方体贴图的面渲染为四边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 OpenGL 中有一个立方体贴图纹理,我想将立方体的一个面渲染为单个四边形.我应该使用什么纹理坐标?具体来说,我应该选择什么坐标来渲染GL_TEXTURE_CUBE_MAP_POSITIVE_X"面?或者如果我不应该明确定义坐标,在这种情况下我应该如何使用纹理坐标生成?

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?

推荐答案

你想要的纹理坐标是(1, +/-1, +/-1)

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

这篇关于将立方体贴图的面渲染为四边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆