20 GPUShader *shader = context.get_shader(
"compositor_convert_color_to_alpha");
26 output.bind_as_image(shader,
"output_img");
39 output.store_pixel(texel, float4(input.load_pixel(texel).w));
45 if (context.use_gpu()) {
void GPU_shader_bind(GPUShader *shader)
struct GPUShader GPUShader
void unbind_as_texture() const
const Domain & domain() const
void bind_as_texture(GPUShader *shader, const char *texture_name) const
static void extract_alpha_cpu(Result &input, Result &output)
void parallel_for(const int2 range, FunctionRef< void(int2)> function)
static void extract_alpha_gpu(Context &context, Result &input, Result &output)
void extract_alpha(Context &context, Result &input, Result &output)
void compute_dispatch_threads_at_least(GPUShader *shader, int2 threads_range, int2 local_size=int2(16))
VecBase< int32_t, 2 > int2