Can't acess Compute Shader class (or any Compute class) using babylon.js in vscode

Hello,
I’m still new to babylon and im trying to create a compute shader but vscode won’t recognize BABYLON.ComputeShader(etc) while this works on the babylon playground.

I’ve set my project up exactly like this: Getting Set Up | Babylon.js Documentation

Any help would be much appreciated,
Thanks.

Welcome aboard!

Are you using Babylon.js 5.0? Compute shaders only exist since 5.0.

1 Like

Thank you,

I’m not sure, I followed the setup on the documentation and so I installed the npm version.

It looks like the npm install is still on the 4.20 version so it could be that, how can I install babylon.js 5.0?

In the package.json file, you must declare something like that:

  "dependencies": {
    "@babylonjs/core": "5.0.0-alpha.64",
    "@babylonjs/gui": "5.0.0-alpha.64",
    "@babylonjs/inspector": "5.0.0-alpha.64",
    "@babylonjs/loaders": "5.0.0-alpha.64",
    "@babylonjs/materials": "5.0.0-alpha.64",
    "@babylonjs/post-processes": "5.0.0-alpha.64",
    "@babylonjs/procedural-textures": "5.0.0-alpha.64",
    "@babylonjs/serializers": "5.0.0-alpha.64",
  }
2 Likes

it works correctly now, thank you for all the help.

2 Likes