RGBA32F 纹理格式和使用 OpenGL ES 3.0 的纹理映射问题

Issue with RGBA32F texture format and mipmapping using OpenGL ES 3.0

当我使用glGenerateMipmap()RGBA32F 纹理生成mipmap 时,总是出现INVALID_OPERATION 错误。绑定贴图或设置多种贴图参数无效

根据 OpenGL ES 3.0 规范,我发现 RGBA32F 不可过滤。那么这是错误的原因吗?

不幸的是,我在函数 glGenerateMipmap 的 api 文档中找不到任何 "supported texture formats" 提示。如果是这样,那么为什么 RGBA16F 工作正常但 32 位浮点数不工作?

谢谢~

来自 OpenGL ES 3.0 specification,第 3.8.10.5 节:

If the levelbase array was not specified with an unsized internal format from table 3.3 or a sized internal format that is both color-renderable and texture-filterable according to table 3.13, an INVALID_OPERATION error is generated. (emphasis added)

您已经声明 RGBA32F 不可纹理过滤,而 RGBA16F 是,这就是为什么它在后一种情况下有效但在第一种情况下无效的原因。

另外 the docs 在错误列表中明确提及:

GL_INVALID_OPERATION is generated if the levelbaselevelbase array was not specified with an unsized internal format or a sized internal format that is both color-renderable and texture-filterable.