3 #pragma MSP stage(compute)
4 layout(local_size_x=8, local_size_y=8) in;
6 uniform sampler2D bottom;
7 layout(r32f) uniform image2D surface_out;
8 layout(rg32f) uniform image2D velocity_out;
12 ivec2 coord = ivec2(gl_GlobalInvocationID.xy);
13 float surface = max(texelFetch(bottom, coord, 0).x, 0.0);
14 imageStore(surface_out, coord, vec4(surface, 0.0, 0.0, 0.0));
15 imageStore(velocity_out, coord, vec4(0.0));