diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-22 01:52:44 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-22 02:13:18 +0300 |
commit | 27109fd209ca572445d9ec27b7f220b01001bf5b (patch) | |
tree | 7af8493ccac2df48b3caa101b042d19b40c0f760 | |
parent | cc1b193ddf3868ff508b82d42d36f7e769730323 (diff) |
Eevee: Normalize Tangents after transform to world space
Fix T62621 without breaking everything else.
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 377795b7e44..ccc2b7f8ae5 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -1776,7 +1776,7 @@ void tangent_orco_z(vec3 orco_in, out vec3 orco_out) void node_tangentmap(vec4 attr_tangent, mat4 toworld, out vec3 tangent) { - tangent = (toworld * vec4(attr_tangent.xyz, 0.0)).xyz; + tangent = normalize((toworld * vec4(attr_tangent.xyz, 0.0)).xyz); } void node_tangent(vec3 N, vec3 orco, mat4 objmat, mat4 toworld, out vec3 T) |