1#version 440 core 2 3struct VertexInfo { 4 float position[3]; 5 float normal[3]; 6}; 7 8struct TriangleInfo { 9 VertexInfo v[3]; 10}; 11 12buffer VertexCollection { 13 TriangleInfo t[5]; 14 uint padding[10]; 15}; 16 17buffer MultipleArrays { 18 TriangleInfo tri[5]; 19 VertexInfo vert[5]; 20 float f[5]; 21} multiarray; 22 23buffer ArrayedBind { 24 float a; 25 float b; 26} buffers[3]; 27 28uniform UBO { 29 VertexInfo verts[2]; 30 float flt[8]; 31 uvec4 unused; 32 float uniform_multi[4][3][2]; 33} ubo; 34 35uniform float uniform_multi[4][3][2]; 36 37struct OutputStruct { 38 float val; 39 vec3 a; 40 vec2 b[4]; 41 mat2x2 c; 42}; 43 44out OutputStruct outval; 45out float outarr[3]; 46 47void main() 48{ 49 float f; 50 f += t[0].v[0].position[0]; 51 f += t[gl_InstanceID].v[gl_InstanceID].position[gl_InstanceID]; 52 f += t[gl_InstanceID].v[gl_InstanceID].normal[gl_InstanceID]; 53 f += multiarray.tri[gl_InstanceID].v[0].position[0]; 54 f += multiarray.vert[gl_InstanceID].position[0]; 55 f += multiarray.f[gl_InstanceID]; 56 f += ubo.verts[gl_InstanceID].position[0]; 57 f += ubo.flt[gl_InstanceID]; 58 f += ubo.uniform_multi[0][0][0]; 59 f += uniform_multi[gl_InstanceID][gl_InstanceID][gl_InstanceID]; 60 f += buffers[gl_InstanceID].b; 61 TriangleInfo tlocal[5] = t; 62 outval.val = f; 63 outarr[2] = f; 64} 65