Closed
Description
Godot version
Fresh builds of 3.x (commit 7fcfde9) AND 4.0 (commit 91b97da)
System information
Windows 10
Issue description
glTF scene exporter does some normal map conversion code which does not do is_valid
checks. To find it, ctrl+F in gltf_document.cpp
for // Code for uncompressing RG normal maps
This means glTF-exporting a scene that has a material with an empty normal map texture causes a crash.
Btw, material->get_texture
is called twice for the normal texture (right below the code that crashes). Can't the second call be removed? The variable isn't used...
Steps to reproduce
- Open mesh.tscn (alternatively: create a scene with a cube meshinstance, add spatialmaterial and enable normal map without providing a texture)
- Project -> Tools -> Export GLTF
- Crash