1#version 450 2 3layout(rgba32f, binding = 1) uniform image2D i2D; 4layout(r32i, binding = 12) uniform iimage2D ii2D; 5layout(r32ui, binding = 12) uniform uimage2D ui2D; 6 7layout(rgba32f, binding = 9) uniform image2DMS i2DMS; 8layout(r32i, binding = 13) uniform iimage2DMS ii2DMS; 9layout(r32ui, binding = 13) uniform uimage2DMS ui2DMS; 10 11flat in ivec2 ic2D; 12flat in uint value; 13 14out vec4 fragData; 15 16void main() 17{ 18 vec4 v = vec4(0.0); 19 ivec4 iv = ivec4(0.0); 20 uvec4 uv = uvec4(0.0); 21 22 v += imageLoad(i2D, ic2D); 23 imageStore(i2D, ic2D, v); 24 v += imageLoad(ii2D, ic2D); 25 imageStore(ii2D, ic2D, iv); 26 v += imageLoad(ui2D, ic2D); 27 imageStore(ui2D, ic2D, uv); 28 29 v += imageLoad(i2DMS, ic2D, 1); 30 imageStore(i2DMS, ic2D, 2, v); 31 v += imageLoad(ii2DMS, ic2D, 1); 32 imageStore(ii2DMS, ic2D, 2, iv); 33 v += imageLoad(ui2DMS, ic2D, 1); 34 imageStore(ui2DMS, ic2D, 2, uv); 35 36 fragData = v; 37} 38 39