我使用的是 GeForce GTX 670,我真的仅限于 8 个布局说明符吗?
我真的认为它会不止于此......我的 GL_MAX_IMAGE_UNITS 是 30k+
下面是我的计算着色器中给出错误的一些示例代码:
layout (local_size_x = 256) in;
layout (rgba32f, binding = 0) uniform image1D a;
layout (rgba32f, binding = 1) uniform image1D b;
layout (rgba32f, binding = 2) uniform image1D c;
layout (rgba32f, binding = 3) uniform image1D d;
layout (rgba32f, binding = 4) uniform image1D e;
layout (rgba32f, binding = 5) uniform image1D f;
layout (rgba32f, binding = 6) uniform image1D g;
layout (rgba32f, binding = 7) uniform image1D h;
layout (rgba32f, binding = 8) uniform image1D i;
void main(void)
{
}
如果我使用“位置”而不是“绑定”,着色器将编译,但不会写入任何纹理......