From 1fc9ff4a4e9ed98ce9bedc2faca03225b7af585d Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Tue, 3 Dec 2024 12:22:15 +0200 Subject: [PATCH] Fix: Variable size Bokeh Blur node crashes The Variable size Bokeh Blur node crashes due to access to pixels outside of the image boundary. Fix this by accessing using extended boundaries. --- .../blender/nodes/composite/nodes/node_composite_bokehblur.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc b/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc index aef65165338..f02a6137938 100644 --- a/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc +++ b/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc @@ -311,7 +311,7 @@ class BokehBlurOperation : public NodeOperation { for (int y = -search_radius; y <= search_radius; y++) { for (int x = -search_radius; x <= search_radius; x++) { float candidate_size = math::max( - 0.0f, size_image.load_pixel(texel + int2(x, y)).x * base_size); + 0.0f, size_image.load_pixel_extended(texel + int2(x, y)).x * base_size); /* Skip accumulation if either the x or y distances of the candidate pixel are larger * than either the center or candidate pixel size. Note that the max and min functions