29 output.bind_as_image(shader,
"output_img");
50 Result *result_to_flood = &initial_flooded_result;
53 Result *result_after_flooding = &intermediate_result;
63 while (step_size != 0) {
65 std::swap(result_to_flood, result_after_flooding);
71 result_after_flooding->
release();
72 output.steal_data(*result_to_flood);
MINLINE int power_of_2_max_i(int n)
void GPU_shader_uniform_1i(GPUShader *sh, const char *name, int value)
void GPU_shader_bind(GPUShader *shader)
struct GPUShader GPUShader
void unbind_as_texture() const
const Domain & domain() const
void allocate_texture(Domain domain, bool from_pool=true)
static ResultType type(eGPUTextureFormat format)
void bind_as_texture(GPUShader *shader, const char *texture_name) const
T max(const T &a, const T &b)
void jump_flooding(Context &context, Result &input, Result &output)
static void jump_flooding_pass(Context &context, Result &input, Result &output, int step_size)
void compute_dispatch_threads_at_least(GPUShader *shader, int2 threads_range, int2 local_size=int2(16))