diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-08-25 16:37:27 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-08-25 16:40:40 +0300 |
commit | ae04e27bfa579d04c0c78705e1aa57f57f309fd1 (patch) | |
tree | 1e48446eece4922ba9097aba28484621c59d5937 /source/blender/gpu/shaders | |
parent | 52778ce625221b1d84bca0169acdc244e6c6c74c (diff) |
Revert "material Glsl: Fix tangent with new orco."
This reverts commit 3888227a7bfdb6b3867680ea237152d2929e1bc5.
This "Fix" was made while ORCO was broken. Now that orco itself is fixed
this is no longer required, otherwise Tangent node produces different
results in Cycles and Eevee.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 17fc5e3dd92..b205c90cc79 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -3092,17 +3092,17 @@ void node_uvmap(vec3 attr_uv, out vec3 outvec) void tangent_orco_x(vec3 orco_in, out vec3 orco_out) { - orco_out = orco_in.xzy * vec3(0.0, -0.25, 0.25); + orco_out = vec3(0.0, (orco_in.z - 0.5) * -0.5, (orco_in.y - 0.5) * 0.5); } void tangent_orco_y(vec3 orco_in, out vec3 orco_out) { - orco_out = orco_in.zyx * vec3(-0.25, 0.0, 0.25); + orco_out = vec3((orco_in.z - 0.5) * -0.5, 0.0, (orco_in.x - 0.5) * 0.5); } void tangent_orco_z(vec3 orco_in, out vec3 orco_out) { - orco_out = orco_in.yxz * vec3(-0.25, 0.25, 0.0); + orco_out = vec3((orco_in.y - 0.5) * -0.5, (orco_in.x - 0.5) * 0.5, 0.0); } void node_tangentmap(vec4 attr_tangent, mat4 toworld, out vec3 tangent) |