Setting clamp u and clamp v to false

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.

clamp

I can’t find a way to set that in the code.

Just change texture.wrapV from CLAMP_ADDRESSMODE to WRAP_ADDRESSMODE.

3 Likes

thanks That worked