30 switch (input.
type()) {
32 return "compositor_realize_on_domain_bicubic_color";
34 return "compositor_realize_on_domain_bicubic_vector";
36 return "compositor_realize_on_domain_bicubic_float";
45 switch (input.
type()) {
47 return "compositor_realize_on_domain_color";
49 return "compositor_realize_on_domain_vector";
51 return "compositor_realize_on_domain_float";
68 const float3x3 &input_transformation,
72 if (input_domain == domain) {
87 input_translate += std::numeric_limits<float>::epsilon() * 10e3f;
105 const bool use_bilinear =
ELEM(
120 output.allocate_texture(domain);
121 output.bind_as_image(shader,
"domain_img");
#define BLI_assert_unreachable()
void GPU_shader_uniform_mat3_as_mat4(GPUShader *sh, const char *name, const float data[3][3])
void GPU_shader_bind(GPUShader *shader)
void GPU_texture_extend_mode_y(GPUTexture *texture, GPUSamplerExtendMode extend_mode)
void GPU_texture_extend_mode_x(GPUTexture *texture, GPUSamplerExtendMode extend_mode)
@ GPU_SAMPLER_EXTEND_MODE_REPEAT
@ GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER
void GPU_texture_filter_mode(GPUTexture *texture, bool use_filter)
struct GPUShader GPUShader
void pass_through(Result &target)
void unbind_as_texture() const
const Domain & domain() const
static ResultType type(eGPUTextureFormat format)
void bind_as_texture(GPUShader *shader, const char *texture_name) const
CartesianBasis invert(const CartesianBasis &basis)
MatBase< T, NumCol, NumRow > translate(const MatBase< T, NumCol, NumRow > &mat, const VectorT &translation)
static const char * get_realization_shader(Result &input, const RealizationOptions &realization_options)
void compute_dispatch_threads_at_least(GPUShader *shader, int2 threads_range, int2 local_size=int2(16))
void realize_on_domain(Context &context, Result &input, Result &output, const Domain &domain, const float3x3 &input_transformation, const RealizationOptions &realization_options)
VecBase< float, 2 > float2
MatBase< float, 3, 3 > float3x3
const c_style_mat & ptr() const
Interpolation interpolation