A model is loaded into Babylon and the meshes has PBRMaterial material.
I’m applying a dynamic texture to albedoTexture material.
The problem is that the model would be black.
this.dynamicTexture = new DynamicTexture(
'texture',
this.canvas,
this.sceneHelper.scene
);
meshes.forEach((mesh) => {
if (mesh.material) {
(mesh.material as PBRMaterial).albedoTexture =
this.dynamicTexture;
}
});
After debugging using Inspector, I found that if i uncheck clamp v it would work.
I can’t find a way to set that in the code.