CustomMaterial and Base_Color

Hi
Base color with custom material works fine in pg but when i implement same in my React application, It doesnt work. Any suggestions please.

PG link : https://playground.babylonjs.com/#P4ANG0#1

Here is React source code
CutMat

Can you share a React reproduction? You can use CodeSandbox

Are you loading the material packaged in your app cause the custom materials are not part of core ?

Hey @carolhmj
If i use standardMaterial to add texture then mesh background will change to black color but if i use customMaterial and use if condition to remove black background, It wont works.

Here in codesandbox, i have preview button and onclick im adding texture on mesh.

Here is CodeSandbox link with customMaterial example(giving error) : sharp-tree-1csmqu - CodeSandbox

Here is CodeSandbox link with Standardmaterial : quizzical-saha-3r4c8t - CodeSandbox

Here is pg link : https://playground.babylonjs.com/#P4ANG0#1

@sebavan ,
Here is repro for reference : damp-lake-5txwg5 - CodeSandbox

When i use StandardMaterial and add texture, Mesh background changes to black, If i use CustomMaterial in pg and add conditional statement to remove background color, It works fine but same customeMaterial code isnt working in react app.
Here is pg link : https://playground.babylonjs.com/#P4ANG0#2

You can try
import { CustomMaterial } from ‘babylonjs-materials’; and use CustomMaterial instead of BABYLON.CustomMaterial ?