diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-12 13:17:21 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-12 13:17:21 +0400 |
commit | 3945979f2b69b2f73f41c0f59b6a40ab13e4a56c (patch) | |
tree | 13087d944aefe26bb09a458ec4543df3b8b27af2 /intern/cycles | |
parent | f06370dd446039227f6045041a3aeb04f0d378cf (diff) |
Fix #33486: cycles CPU image textures were offset wrong by half a pixel compared
to OpenGL/CUDA/OSL rendering.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/kernel_compat_cpu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h index 45f653a686c..01bb78e8e1c 100644 --- a/intern/cycles/kernel/kernel_compat_cpu.h +++ b/intern/cycles/kernel/kernel_compat_cpu.h @@ -112,8 +112,8 @@ template<typename T> struct texture_image { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); int ix, iy, nix, niy; - float tx = frac(x*width, &ix); - float ty = frac(y*height, &iy); + float tx = frac(x*width - 0.5f, &ix); + float ty = frac(y*height - 0.5f, &iy); if(periodic) { ix = wrap_periodic(ix, width); |