From e8e8ceaea2d8aa04d2216dbac82a0a907f8c435d Mon Sep 17 00:00:00 2001 From: Monique Dewanchand Date: Tue, 10 Jul 2012 20:33:24 +0000 Subject: fix for Tiles bug - opencl: [#31981] Bokeh Blur Node - Size input socket does not accept input from Value Input node, Values smaller than 0.1 will produce black output --- source/blender/compositor/operations/COM_OpenCLKernels.cl | 2 +- source/blender/compositor/operations/COM_OpenCLKernels.cl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/operations/COM_OpenCLKernels.cl b/source/blender/compositor/operations/COM_OpenCLKernels.cl index 1f3b28f15d3..f9b6d34bfc3 100644 --- a/source/blender/compositor/operations/COM_OpenCLKernels.cl +++ b/source/blender/compositor/operations/COM_OpenCLKernels.cl @@ -21,7 +21,7 @@ __kernel void bokehBlurKernel(__read_only image2d_t boundingBox, __read_only ima tempBoundingBox = read_imagef(boundingBox, SAMPLER_NEAREST, coords).s0; - if (tempBoundingBox > 0.0f) { + if (tempBoundingBox > 0.0f && radius > 0 ) { const int2 bokehImageDim = get_image_dim(bokehImage); const int2 bokehImageCenter = bokehImageDim/2; const int2 minXY = max(realCoordinate - radius, zero); diff --git a/source/blender/compositor/operations/COM_OpenCLKernels.cl.h b/source/blender/compositor/operations/COM_OpenCLKernels.cl.h index 1c223a527ca..2c9ec76501d 100644 --- a/source/blender/compositor/operations/COM_OpenCLKernels.cl.h +++ b/source/blender/compositor/operations/COM_OpenCLKernels.cl.h @@ -23,7 +23,7 @@ const char * clkernelstoh_COM_OpenCLKernels_cl = "/// This file contains all ope "\n" \ " tempBoundingBox = read_imagef(boundingBox, SAMPLER_NEAREST, coords).s0;\n" \ "\n" \ -" if (tempBoundingBox > 0.0f) {\n" \ +" if (tempBoundingBox > 0.0f && radius > 0 ) {\n" \ " const int2 bokehImageDim = get_image_dim(bokehImage);\n" \ " const int2 bokehImageCenter = bokehImageDim/2;\n" \ " const int2 minXY = max(realCoordinate - radius, zero);\n" \ -- cgit v1.2.3