uniform sampler2D surface_in;
uniform sampler2D velocity_in;
-uniform sampler2D clamping_in;
uniform sampler2D bottom_in;
layout(r32f) uniform image2D surface_out;
layout(rg32f) uniform image2D velocity_out;
-layout(r32f) uniform image2D clamping_out;
-float get_depth(ivec2 coord)
+vec2 get_depth(ivec2 coord)
{
- return texelFetch(surface_in, coord, 0).x-texelFetch(bottom_in, coord, 0).x;
+ float surface = texelFetch(surface_in, coord, 0).x;
+ float bottom = texelFetch(bottom_in, coord, 0).x;
+ return vec2(surface, surface-bottom);
+}
+
+vec4 get_data(ivec2 coord)
+{
+ vec2 velocity = texelFetch(velocity_in, coord, 0).xy;
+ return vec4(velocity, get_depth(coord));
}