Using Node material in my local project give me shader error

Hey guys i am trying to use the grid node material json in my local project.

Saved as a json file

I load the material like so:

  const loadUrl:string = "";
  BABYLON.NodeMaterial.ParseFromFileAsync( + ".NodeMaterial", loadUrl, this.scene).then((nm)=>{
                    this.m_nodeMaterial = nm;
                    console.warn("Loaded NME: " +;

Now for some reason it load fine on the playground, but it get a view undeclared error in my local project.

I can load the Ocean example shader just fine in local project…

Any body got any clues as to why… ???

Looks like something to do with Cascade Shadow Maps… If i disable CSM in my local project, then the Grid NME seem to work. So it must dont like NME must not like CSM in some cases :frowning:

If you enable shadows for a mesh that has a node material applied on, you must connect the View matrix to the view entry of the Lights block.

That did it… Thanks @Evgeni_Popov :slight_smile: