diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-28 15:48:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-28 15:48:40 +0300 |
commit | 1ec59c8e067f4af213d61e114de97334ce9f3e77 (patch) | |
tree | f690b0ea07b85750e1c995df362ca2a86da7c9ce /intern/cycles/kernel/kernel_image_opencl.h | |
parent | 06034b147aab1c80ad959d88a69b493cd5891e9c (diff) |
Revert "Cycles: Fix image textures were completely broken since recent unlimited textures commit"
This reverts commit 8f4166ee495531fa38b676b0a5ef4c482e89f9a5.
The fix was not correct for cases when we've got float textures.
Diffstat (limited to 'intern/cycles/kernel/kernel_image_opencl.h')
-rw-r--r-- | intern/cycles/kernel/kernel_image_opencl.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_image_opencl.h b/intern/cycles/kernel/kernel_image_opencl.h index a5c5a73ddb0..ddf56f119a8 100644 --- a/intern/cycles/kernel/kernel_image_opencl.h +++ b/intern/cycles/kernel/kernel_image_opencl.h @@ -66,8 +66,7 @@ ccl_device_inline float svm_image_texture_frac(float x, int *ix) ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, float y) { - const int texture_id = kernel_tex_index(id); - uint4 info = kernel_tex_fetch(__tex_image_packed_info, texture_id*2); + uint4 info = kernel_tex_fetch(__tex_image_packed_info, id*2); uint width = info.x; uint height = info.y; uint offset = info.z; @@ -144,12 +143,11 @@ ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, fl ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x, float y, float z) { - const int texture_id = kernel_tex_index(id); - uint4 info = kernel_tex_fetch(__tex_image_packed_info, texture_id*2); + uint4 info = kernel_tex_fetch(__tex_image_packed_info, id*2); uint width = info.x; uint height = info.y; uint offset = info.z; - uint depth = kernel_tex_fetch(__tex_image_packed_info, texture_id*2+1).x; + uint depth = kernel_tex_fetch(__tex_image_packed_info, id*2+1).x; /* Image Options */ uint interpolation = (info.w & (1 << 0)) ? INTERPOLATION_CLOSEST : INTERPOLATION_LINEAR; |