Add option to reflect buffer blocks & variables separately to uniforms

* Also note the uniform indices of atomic counter buffers
This commit is contained in:
baldurk
2019-01-30 14:18:43 +00:00
parent 4a2aa82236
commit 657acc0c40
15 changed files with 158 additions and 29 deletions

View File

@@ -19,6 +19,11 @@ buffer MultipleArrays {
float f[5];
} multiarray;
uniform UBO {
VertexInfo verts[2];
float flt[8];
} ubo;
out float outval;
void main()
@@ -30,6 +35,8 @@ void main()
f += multiarray.tri[gl_InstanceID].v[0].position[0];
f += multiarray.vert[gl_InstanceID].position[0];
f += multiarray.f[gl_InstanceID];
f += ubo.verts[gl_InstanceID].position[0];
f += ubo.flt[gl_InstanceID];
TriangleInfo tlocal[5] = t;
outval = f;
}