Fix blur processing in keyign node in GPU compositor
Align the blur filter with the CPU compositor, which uses box filter. The pre filter was already using box filter, while the post filter was using gaussian filter. Additionally, GPU compositor was doing twice amount of blur due to the mismatch between radius and size semantic: node setting is in size, while the separable blur expects radius. Pull Request: https://projects.blender.org/blender/blender/pulls/117454
This commit is contained in:
@@ -136,7 +136,8 @@ class KeyingOperation : public NodeOperation {
|
||||
Result chroma = extract_input_chroma();
|
||||
|
||||
Result blurred_chroma = context().create_temporary_result(ResultType::Color);
|
||||
symmetric_separable_blur(context(), chroma, blurred_chroma, float2(blur_size), R_FILTER_BOX);
|
||||
symmetric_separable_blur(
|
||||
context(), chroma, blurred_chroma, float2(blur_size) / 2, R_FILTER_BOX);
|
||||
chroma.release();
|
||||
|
||||
Result blurred_input = replace_input_chroma(blurred_chroma);
|
||||
@@ -289,7 +290,8 @@ class KeyingOperation : public NodeOperation {
|
||||
}
|
||||
|
||||
Result blurred_matte = context().create_temporary_result(ResultType::Float);
|
||||
symmetric_separable_blur(context(), input_matte, blurred_matte, float2(blur_size));
|
||||
symmetric_separable_blur(
|
||||
context(), input_matte, blurred_matte, float2(blur_size) / 2, R_FILTER_BOX);
|
||||
|
||||
return blurred_matte;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user