• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 310 es
2layout(local_size_x = 1) in;
3
4struct Foo
5{
6    mat4 m;
7};
8
9layout(std430, binding = 0) readonly buffer SSBO
10{
11    Foo in_data[];
12};
13
14layout(std430, binding = 1) writeonly buffer SSBO2
15{
16    Foo out_data[];
17};
18
19void main()
20{
21    uint ident = gl_GlobalInvocationID.x;
22    out_data[ident].m = in_data[ident].m * in_data[ident].m;
23}
24
25