I’m having some problems getting the tangents to work after importing Blender models to Defold. I display them by setting
var_tangent = normalize((mtx_worldview * vec4(tangent, 0.0)).xyz);
in the vertex program and
gl_FragColor = vec4(var_tangent, 1.0);
in the fragment program. This is working just fine – the tangents are displayed correctly. However, the moment I add a skeleton to the Defold model the render shows the normals instead. I have been using this guide https://forum.defold.com/t/blender-to-defold-3d-animation-guide/73771 for the export/import.
I have also been trying multiple export settings in Blender (e.g. not including any mesh data in the skeleton if that would override the model data or something). I have also tried excluding the armature in the main model, and that does display the tangents but disables the animation.
Is there anyone here that’s got 3D animations with tangents working?