Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-15 19:55:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-15 19:55:37 +0400
commit927fc897cf8d7e6c18571dee2b79b596b5aaffa7 (patch)
treedbe493cf8e69ec25bc6b83c43c5630cf96fc401e /source/blender/compositor/operations/COM_OpenCLKernels.cl
parent2ca89f7add1949295ac58de6697534d44508bca3 (diff)
minor optimizations for dilate
Diffstat (limited to 'source/blender/compositor/operations/COM_OpenCLKernels.cl')
-rw-r--r--source/blender/compositor/operations/COM_OpenCLKernels.cl2
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 e1f175b318a..0f8e543de7f 100644
--- a/source/blender/compositor/operations/COM_OpenCLKernels.cl
+++ b/source/blender/compositor/operations/COM_OpenCLKernels.cl
@@ -68,9 +68,9 @@ __kernel void dilateKernel(__read_only image2d_t inputImage, __write_only image
int2 inputXy;
for (ny = minXY.y, inputXy.y = ny - offsetInput.y ; ny < maxXY.y ; ny ++, inputXy.y++) {
+ const float deltaY = (realCoordinate.y - ny);
for (nx = minXY.x, inputXy.x = nx - offsetInput.x; nx < maxXY.x ; nx ++, inputXy.x++) {
const float deltaX = (realCoordinate.x - nx);
- const float deltaY = (realCoordinate.y - ny);
const float measuredDistance = deltaX*deltaX+deltaY*deltaY;
if (measuredDistance <= distanceSquared) {
value = max(value, read_imagef(inputImage, SAMPLER_NEAREST, inputXy).s0);