diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-18 16:49:22 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-18 16:49:22 +0400 |
commit | 3e83fd441d84617855dfdcfab50fd8f4fb041f00 (patch) | |
tree | 4df496bf5da260f51036108a3ea21fa9a4e2201e /intern/cycles/kernel/svm/svm_tex_coord.h | |
parent | 76f28921dc9757da9ba04b195dd66acda2e4acf2 (diff) |
Fix #31486: cycles texture coordinate reflection output has wrong direction.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_tex_coord.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_tex_coord.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/svm/svm_tex_coord.h b/intern/cycles/kernel/svm/svm_tex_coord.h index aa924bcc38b..9952557d614 100644 --- a/intern/cycles/kernel/svm/svm_tex_coord.h +++ b/intern/cycles/kernel/svm/svm_tex_coord.h @@ -87,7 +87,7 @@ __device void svm_node_tex_coord(KernelGlobals *kg, ShaderData *sd, float *stack } case NODE_TEXCO_REFLECTION: { if(sd->object != ~0) - data = sd->I - 2.0f*dot(sd->N, sd->I)*sd->N; + data = 2.0f*dot(sd->N, sd->I)*sd->N - sd->I; else data = sd->I; break; @@ -136,7 +136,7 @@ __device void svm_node_tex_coord_bump_dx(KernelGlobals *kg, ShaderData *sd, floa } case NODE_TEXCO_REFLECTION: { if(sd->object != ~0) - data = sd->I - 2.0f*dot(sd->N, sd->I)*sd->N; + data = 2.0f*dot(sd->N, sd->I)*sd->N - sd->I; else data = sd->I; break; @@ -188,7 +188,7 @@ __device void svm_node_tex_coord_bump_dy(KernelGlobals *kg, ShaderData *sd, floa } case NODE_TEXCO_REFLECTION: { if(sd->object != ~0) - data = sd->I - 2.0f*dot(sd->N, sd->I)*sd->N; + data = 2.0f*dot(sd->N, sd->I)*sd->N - sd->I; else data = sd->I; break; |