Remove Bumptexture in PBRmaterial

how to remove Bumptexture in PBRmaterial in code

You don’t have a bump texture by default if you don’t add it using this code:

mat.bumpTexture = new BABYLON.Texture("...", scene);

Once you have added it, simply do:

mat.bumpTexture = null;

to remove it.

Type ‘null’ is not assignable to type ‘BaseTexture’.i am getting this error

On PBR materials you have the disableBumpMap property.

Disposing the texture won’t work as the bumpTexture property is still non-null: the bump texture will be replaced by a black texture (or by garbage, I don’t know - when tested with the diffuseTexture property, you get a black texture if you do mat.diffuseTexture.dispose()).