1 #pragma MSP stage(compute)
2 layout(local_size_x=8, local_size_y=8) in;
4 uniform sampler2D variance_in;
5 layout(r16f) uniform image2D variance_out;
9 ivec2 coord = ivec2(gl_GlobalInvocationID.xy)+ivec2(1, 4);
11 for(int i=-3; i<=3; ++i)
12 variance += texelFetch(variance_in, coord+ivec2(0, i), 0).x;
13 imageStore(variance_out, coord, vec4(variance/7.0, 0.0, 0.0, 0.0));