Compositor: Use original variable size in Blur node

Currently, the CPU compositor smoothes its input size in variable size
mode. It is unclear why this is the case, but it seems the logic is that
sharp transitions in the size input are undesirable. Alternatively, this
is similar to the morphological blurring step in the Defocus node. But
it does not use standard weights and it is not morphological in nature
at all.

This patch removes the smoothing step and uses the original size
provided by the user. Looking at resources online, it seems users almost
always expect the size inputs to be used directly, so there is no reason
for force smooth their inputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/118757
This commit is contained in:
Omar Emara 2024-02-29 10:57:18 +01:00 committed by Omar Emara
parent e67059d504
commit aa17aca9ec
2 changed files with 2 additions and 24 deletions

View File

@ -54,35 +54,13 @@ void BlurNode::convert_to_operations(NodeConverter &converter,
converter.map_input_socket(get_input_socket(1), clamp->get_input_socket(0));
converter.add_link(zero->get_output_socket(), clamp->get_input_socket(1));
GaussianAlphaXBlurOperation *operationx = new GaussianAlphaXBlurOperation();
operationx->set_data(data);
operationx->set_quality(quality);
operationx->set_size(1.0f);
operationx->set_falloff(PROP_SMOOTH);
operationx->set_subtract(false);
operationx->set_extend_bounds(extend_bounds);
converter.add_operation(operationx);
converter.add_link(clamp->get_output_socket(), operationx->get_input_socket(0));
GaussianAlphaYBlurOperation *operationy = new GaussianAlphaYBlurOperation();
operationy->set_data(data);
operationy->set_quality(quality);
operationy->set_size(1.0f);
operationy->set_falloff(PROP_SMOOTH);
operationy->set_subtract(false);
operationy->set_extend_bounds(extend_bounds);
converter.add_operation(operationy);
converter.add_link(operationx->get_output_socket(), operationy->get_input_socket(0));
GaussianBlurReferenceOperation *operation = new GaussianBlurReferenceOperation();
operation->set_data(data);
operation->set_quality(quality);
operation->set_extend_bounds(extend_bounds);
converter.add_operation(operation);
converter.add_link(operationy->get_output_socket(), operation->get_input_socket(1));
converter.add_link(clamp->get_output_socket(), operation->get_input_socket(1));
output_operation = operation;
input_operation = operation;

@ -1 +1 @@
Subproject commit 132949d18d3473ee378170e153cab16e0e56f260
Subproject commit c642b3b34558919fb69d1277463c96e16bc5253c