diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-29 00:08:39 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-29 00:08:54 +0300 |
commit | 42dd888b98b598c240f78302b857fa60add08ca5 (patch) | |
tree | ec50b6728a79d601025dc8f2e9c715890a04dce2 /source/blender/nodes | |
parent | d027df3add87a1f0a3356d21344a0a160c8ce43d (diff) |
Fix T62178 Eevee: Texture Box mapping not matching Cycles if object is scaled
The wrong transformation was used. Add a new matrix specially for this case.
This also fix the Node texture coordinate that was suffering the same issue.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_image.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c index ba5d34a445f..3491a28fa8f 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c @@ -123,12 +123,9 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, bNode *node, bNodeExecDat GPU_stack_link(mat, node, gpu_node_name, in, out, GPU_image(ima, iuser, isdata)); break; case SHD_PROJ_BOX: - GPU_link(mat, "direction_transform_m4v3", GPU_builtin(GPU_VIEW_NORMAL), - GPU_builtin(GPU_INVERSE_VIEW_MATRIX), - &norm); - GPU_link(mat, "direction_transform_m4v3", norm, - GPU_builtin(GPU_INVERSE_OBJECT_MATRIX), - &norm); + GPU_link(mat, "mat3_mul", GPU_builtin(GPU_VIEW_NORMAL), + GPU_builtin(GPU_INVERSE_NORMAL_MATRIX), + &norm); GPU_link(mat, gpu_node_name, in[0].link, norm, GPU_image(ima, iuser, isdata), |