Fix #109679: Normal map strength is applied incorrectly #109763

Merged
Brecht Van Lommel merged 7 commits from kaspian.jakobssongmail.com/blender:fix-normals into main 2023-07-17 20:06:50 +02:00

7 Commits

Author SHA1 Message Date
Brecht Van Lommel 1d41f45e61 Merge branch 'main' into fix-normals
buildbot/vexp-code-patch-coordinator Build done. Details
2023-07-12 18:21:56 +02:00
Brecht Van Lommel 58cbcf1273 Merge branch 'main' into HEAD
buildbot/vexp-code-patch-coordinator Build done. Details
2023-07-12 17:07:02 +02:00
Kaspian Jakobsson 61bbfd883f Formatting
buildbot/vexp-code-patch-coordinator Build done. Details
2023-07-07 22:17:45 +02:00
Kaspian Jakobsson 995676ae33 Formatting and commenting code 2023-07-07 22:16:58 +02:00
Kaspian Jakobsson 5311419496 Add Cycles and OSL support for tangent normal map fix
This applies the same fix as for Eevee, i.e. the scaled normals
are applied before transforming from tangent space to world space.
Previous behavior is retained for all normals which aren't in tangent
space.
2023-07-07 21:53:10 +02:00
Kaspian Jakobsson 65ce55fd29 Fix normals strength from worldspace to tangent space
Previously the normal strength was modified in world space instead of
tangent space. The node returns directly after, but keeps the old
method in order to not break ex. object space normals strength
2023-07-07 21:14:15 +02:00
Kaspian Jakobsson 8887b519e8 Fix #109679: Normal strength is applied incorrectly
Previously the normal strength calculations were linearly extrapolating
the supplied normal map respect to different scaling in the xy resp.
z-axis. This new method takes this into account and applies it in the
correct way.

The calculations are identical to the ones presented in #109679 but
translated into glsl.

Please see #109679 for more information and background.
2023-07-05 23:29:38 +02:00