OpenGL ES 2.0中的浮点纹理 [英] Floating Point Textures in OpenGL ES 2.0

查看:385
本文介绍了OpenGL ES 2.0中的浮点纹理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图弄清楚如何在GLES2中使用浮动纹理. API参考( http://www.khronos.org/opengles/sdk /docs/man/glTexImage2D.xml )说只能使用无符号的字节和短裤,但是我见过有人说它在其他地方也受支持.

I've been trying to figure out how to use float textures in GLES2. The API Reference (http://www.khronos.org/opengles/sdk/docs/man/glTexImage2D.xml) says that only unsigned bytes and shorts can be used, but i've seen people saying it is supported elsewhere.

我可以使用GL_LUMINANCE作为纹理格式,但这只会给我一个浮点值.

I could use GL_LUMINANCE as the texture format but that only gets me one float value.

如果有人有什么见识,我将不胜感激.

If anyone has some insight i'd appreciate it.

推荐答案

在OpenGL ES 2.0中,仅当实现导出 OES_texture_float_linear ,因此可以放宽此限制.另一个可能的警告是,OES_texture_float的存在并不要求实现支持使用帧缓冲对象渲染到浮点纹理.

In OpenGL ES 2.0, floating-point textures are only supported if the implementation exports the OES_texture_float extension. Note that this extension only allows nearest filtering within a texture level, and no filtering between texture levels. This restriction is loosened by the presence of OES_texture_float_linear. Another potential caveat is that the presence of OES_texture_float does not require that the implementation support rendering to floating-point textures with framebuffer objects.

您打算如何处理浮点纹理?

What are you trying to do with float textures?

这篇关于OpenGL ES 2.0中的浮点纹理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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