Skip to content

Commit d9c12ff

Browse files
Fixed Normal Map assiignation when importing FBX Materials (#6491)
Co-authored-by: sebastienlagarde <[email protected]>
1 parent 3018bb8 commit d9c12ff

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5757
- Fixed a warning because of a null texture in the lens flare pass.
5858
- Fixed a nullref when enabling raycount without ray tracing.
5959
- Fixed error thrown when layered lit material has an invalid material type.
60+
- Fixed Normal Map assiignation when importing FBX Materials.
6061

6162
## [13.1.2] - 2021-11-05
6263

com.unity.render-pipelines.high-definition/Editor/AssetProcessors/FBXMaterialDescriptionPostprocessor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat
110110

111111
if (description.TryGetProperty("Bump", out textureProperty) && textureProperty.texture != null)
112112
{
113-
SetMaterialTextureProperty("_BumpMap", material, textureProperty);
113+
SetMaterialTextureProperty("_NormalMap", material, textureProperty);
114114

115115
if (description.TryGetProperty("BumpFactor", out floatProperty))
116-
material.SetFloat("_BumpScale", floatProperty);
116+
material.SetFloat("_NormalScale", floatProperty);
117117
}
118118
else if (description.TryGetProperty("NormalMap", out textureProperty) && textureProperty.texture != null)
119119
{
120-
SetMaterialTextureProperty("_BumpMap", material, textureProperty);
120+
SetMaterialTextureProperty("_NormalMap", material, textureProperty);
121121

122122
if (description.TryGetProperty("BumpFactor", out floatProperty))
123-
material.SetFloat("_BumpScale", floatProperty);
123+
material.SetFloat("_NormalScale", floatProperty);
124124
}
125125

126126
if (description.TryGetProperty("EmissiveColor", out textureProperty))

0 commit comments

Comments
 (0)