1#version 450 core 2 3struct MyStruct 4{ 5 vec2 foo[2]; 6 bool sb; 7}; 8 9layout(binding = 0, std430) buffer SSBO0 10{ 11 MyStruct a; 12} inBuf; 13 14layout(binding = 1, std430) buffer SSBO1 15{ 16 MyStruct b; 17} outBuf; 18 19layout(binding = 2, std140) uniform UBO 20{ 21 MyStruct c; 22} uBuf; 23 24struct Nested { 25 float f; 26 MyStruct S[2]; 27}; 28 29layout(binding = 2, std140) uniform UBON 30{ 31 Nested N1; 32} uBufN; 33 34layout(binding = 1, std430) buffer SSBO1N 35{ 36 Nested N2; 37} outBufN; 38 39void main() 40{ 41 MyStruct t = inBuf.a; 42 outBuf.b = t; 43 t = uBuf.c; 44 outBuf.b = t; 45 46 Nested n = uBufN.N1; 47 outBufN.N2 = n; 48} 49