0

I have a GL_TEXTURE_3D of size 16x16x6 and I write to it in a compute shader, however I can only seem to write to the values where z=0. If I attempt to call imageStore with any coordinate where z!=0 the value doesn't appear in the texture.

What could be causing this problem?

4

1 回答 1

1

最有可能的是,您已将 3D 纹理与设置为 false 的 layered 参数绑定。检查手册页:https ://www.opengl.org/sdk/docs/man/html/glBindImageTexture.xhtml

绑定 3D 纹理时,必须使用 layered 参数,否则只能写入一层(很可能是第 0 层)。

于 2014-08-15T10:36:52.137 回答