1#version 450 core 2#define PRECISION ${PRECISION} 3#define FORMAT ${FORMAT} 4 5layout(std430) buffer; 6 7/* Qualifiers: layout - storage - precision - memory */ 8 9layout(set = 0, binding = 0, FORMAT) uniform PRECISION image3D uOutput; 10layout(set = 0, binding = 1) uniform PRECISION sampler3D uInput0; 11layout(set = 0, binding = 2) uniform PRECISION sampler3D uInput1; 12layout(set = 0, binding = 3) uniform PRECISION sampler3D uInput2; 13layout(set = 0, binding = 4) uniform PRECISION sampler3D uInput3; 14layout(set = 0, binding = 5) uniform PRECISION restrict Block { 15 ivec3 size; 16 int z; 17} uBlock; 18 19layout(local_size_x_id = 0, local_size_y_id = 1, local_size_z_id = 2) in; 20 21void main() { 22 const ivec3 posIn = ivec3(gl_GlobalInvocationID); 23 24 if (all(lessThan(posIn, uBlock.size.xyz))) { 25 imageStore( 26 uOutput, 27 ivec3(posIn.x, posIn.y, uBlock.z), 28 vec4( 29 texelFetch(uInput0, posIn, 0).x, 30 texelFetch(uInput1, posIn, 0).x, 31 texelFetch(uInput2, posIn, 0).x, 32 texelFetch(uInput3, posIn, 0).x 33 )); 34 } 35} 36