Incorrect UVs with GLTF

Hi, I’m practicing with Babylonjs and GLTF. I have a simple cube with just albedo and metallic maps applied. The point is:

  • if I export the model with material properly applied in Blender, the result in Babylon is ok
  • if I export the model without the material (let’s say a “clay version”), and create a PBR material via code, the result is wrong:

It seems that UVs are flipped along Y axes. Just to be sure, I imported the second GLTF in Blender, and the UVs are correct. If I flip the UVs in Blender and export again, then the result is now ok.
The problem still exists with glb format. Anyone has idea why this happens?

Thanks,
Joe

You can flip the y coordinate when creating a texture: look for the 4th parameter of the texture constructor.