The Extend Bounds input has no effect when the Fast Gaussian filter is used. Similarly, it has no effect if the Bokeh Blur node is using variable size. This is a known limitation and was just not implemented. So to fix this, we implement a general solution that works globally across the node by pre-padding the inputs of the blur. This uses more memory but also speeds up the base case when Extend Bounds is disabled, while also reducing the binary size due to fewer blur specializations. The variable size Bokeh Blur test was updated since it Extend Bounds was silently ignored. Pull Request: https://projects.blender.org/blender/blender/pulls/140192
17 lines
415 B
GLSL
17 lines
415 B
GLSL
/* SPDX-FileCopyrightText: 2025 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "gpu_shader_compositor_texture_utilities.glsl"
|
|
|
|
void main()
|
|
{
|
|
int2 texel = int2(gl_GlobalInvocationID.xy);
|
|
if (zero_pad) {
|
|
imageStore(output_img, texel, texture_load(input_tx, texel - size, float4(0.0f)));
|
|
}
|
|
else {
|
|
imageStore(output_img, texel, texture_load(input_tx, texel - size));
|
|
}
|
|
}
|