diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-19 22:32:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-19 22:32:56 +0400 |
commit | 5c48eb3bb9c42ba06f40d7b6d1c83b76d90d6a67 (patch) | |
tree | 091dd4e1020a5f20f3cd1837aa6e125792f7c3ba /source/blender/compositor/operations/COM_OpenCLKernels.cl | |
parent | aa40fcb0a72452a0a69c3b54b008678383a0119f (diff) |
change to variable size bokeh blue, dont blur larger areas then the current pixel defines.
caused nasty looking errors with DOF.
Diffstat (limited to 'source/blender/compositor/operations/COM_OpenCLKernels.cl')
-rw-r--r-- | source/blender/compositor/operations/COM_OpenCLKernels.cl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_OpenCLKernels.cl b/source/blender/compositor/operations/COM_OpenCLKernels.cl index 8cc25fc3360..d7a81001531 100644 --- a/source/blender/compositor/operations/COM_OpenCLKernels.cl +++ b/source/blender/compositor/operations/COM_OpenCLKernels.cl @@ -112,7 +112,7 @@ __kernel void defocusKernel(__read_only image2d_t inputImage, __read_only image2 float dx = nx - realCoordinate.s0; if (dx != 0 || dy != 0) { inputCoordinate.s0 = nx - offsetInput.s0; - size = read_imagef(inputSize, SAMPLER_NEAREST, inputCoordinate).s0 * scalar; + size = min(read_imagef(inputSize, SAMPLER_NEAREST, inputCoordinate).s0 * scalar, size_center); if (size > threshold) { if (size >= fabs(dx) && size >= fabs(dy)) { float2 uv = {256.0f + dx * 255.0f / size, |