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
path: root/intern
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2016-06-21 01:49:25 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2016-06-21 01:49:25 +0300
commit29ce3dfeb6a8b0e85c477e7b917b50a6eaca8024 (patch)
tree974efe3bea86514027654cc126b68a8fa03f0a05 /intern
parent93c6cf496edff358c919d62295c031fc5eebb155 (diff)
Fix T48691: Cycles - OpenCL - HDR Image mapping does not match CUDA rendering
The OpenCL texture code didn't offset the coordinates by half a pixel like the CPU code does.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/svm/svm_image.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h
index 3d9ab405849..aa9c07c867e 100644
--- a/intern/cycles/kernel/svm/svm_image.h
+++ b/intern/cycles/kernel/svm/svm_image.h
@@ -93,8 +93,8 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y,
r = svm_image_texture_read(kg, id, offset + ix + iy*width);
}
else { /* We default to linear interpolation if it is not closest */
- float tx = svm_image_texture_frac(x*width, &ix);
- float ty = svm_image_texture_frac(y*height, &iy);
+ float tx = svm_image_texture_frac(x*width - 0.5f, &ix);
+ float ty = svm_image_texture_frac(y*height - 0.5f, &iy);
if(periodic) {
ix = svm_image_texture_wrap_periodic(ix, width);