blob: cfb2b0d471ffa9a03854b431e22b865922c132f7 [file] [log] [blame]
baldurk15c37f72019-01-29 12:12:59 +00001#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};
15
baldurk4a2aa822019-01-29 19:10:56 +000016buffer MultipleArrays {
17 TriangleInfo tri[5];
18 VertexInfo vert[5];
19 float f[5];
20} multiarray;
21
baldurk0af5e3e2019-01-29 16:04:44 +000022out float outval;
23
baldurk15c37f72019-01-29 12:12:59 +000024void main()
25{
26 float f;
27 f += t[0].v[0].position[0];
28 f += t[gl_InstanceID].v[gl_InstanceID].position[gl_InstanceID];
29 f += t[gl_InstanceID].v[gl_InstanceID].normal[gl_InstanceID];
baldurk4a2aa822019-01-29 19:10:56 +000030 f += multiarray.tri[gl_InstanceID].v[0].position[0];
31 f += multiarray.vert[gl_InstanceID].position[0];
32 f += multiarray.f[gl_InstanceID];
baldurk15c37f72019-01-29 12:12:59 +000033 TriangleInfo tlocal[5] = t;
baldurk0af5e3e2019-01-29 16:04:44 +000034 outval = f;
baldurk15c37f72019-01-29 12:12:59 +000035}