When the platform is set to Android, normal maps are not interpreted correctly when "Normal map encoding" value is set to DXT5nm in the player settings. This seems to be an issue in newer versions of Unity as I see this happen with 2022.2.1f1 but it does not occur in Unity 2021.3.7f1.
I have attached two screenshots illustrating the difference when changing the "Normal map encoding" value from "DXT5nm-style" to "XYZ". The "XYZ" encoding looks correct, the "DXT5nm-style" encoding looks incorrect.
Steps to reproduce the behavior:
Create a project in Unity 2022.2.1f1 and import the GLTFast library.
In the Build Settings window, change the platform to "Android"
Add a GLTF asset to the project which includes normal maps.
Add the GLTF asset to the scene.
Observe the GLTF model, the reflected skybox will look strange and sort of "inside-out"
Open Project Settings -> Player -> Android Settings -> Other Settings
Change the "Normal Map Encoding" option to "XYZ"
Observe the GLTF model, the reflected skybox will look correct.
Expected behavior
The GLTFast import/loading logic should respect the current normal map encoding settings when loading normal maps.
Screenshots
Here is the bug, when "normal map encoding" is set to DXT5nm-style
Here is the same asset with "normal map encoding" set to XYZ
When the platform is set to Android, normal maps are not interpreted correctly when "Normal map encoding" value is set to DXT5nm in the player settings. This seems to be an issue in newer versions of Unity as I see this happen with 2022.2.1f1 but it does not occur in Unity 2021.3.7f1.
I have attached two screenshots illustrating the difference when changing the "Normal map encoding" value from "DXT5nm-style" to "XYZ". The "XYZ" encoding looks correct, the "DXT5nm-style" encoding looks incorrect.
Steps to reproduce the behavior:
Expected behavior
The GLTFast import/loading logic should respect the current normal map encoding settings when loading normal maps.
Screenshots
Here is the bug, when "normal map encoding" is set to DXT5nm-style
Here is the same asset with "normal map encoding" set to XYZ
Desktop