Skip to content

Commit 0092ca3

Browse files
[HDRP] Improves robustness of detail normal mapping when scale = 0 (and not using surface gradients) (#6980)
* Changed the way normal unpacking AG is performed. * Updated changelog. * Went for less drastic changes, to minimize unwanted side effects. Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent 58d6a3c commit 0092ca3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
140140
- Fixed issue in APV with scenes saved only once when creating them.
141141
- Fixed probe volume baking not generating any probes on mac.
142142
- Fix a few UX issues in APV.
143+
- Fixed issue with detail normals when scale is null (case 1399548).
143144

144145
## [14.0.0] - 2021-11-17
145146

com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataIndividualLayer.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ float3 ADD_IDX(GetNormalTS)(FragInputs input, LayerTexCoord layerTexCoord, float
125125
#ifdef SURFACE_GRADIENT
126126
normalTS += detailNormalTS * detailMask;
127127
#else
128-
normalTS = lerp(normalTS, BlendNormalRNM(normalTS, detailNormalTS), detailMask); // todo: detailMask should lerp the angle of the quaternion rotation, not the normals
128+
normalTS = lerp(normalTS, BlendNormalRNM(normalTS, normalize(detailNormalTS)), detailMask); // todo: detailMask should lerp the angle of the quaternion rotation, not the normals
129129
#endif
130130
#endif
131131
#else

0 commit comments

Comments
 (0)