shadowOnlyMaterial can not be created

It feels like a side-effect issue TBH, but everything is possible. It feels like the build system doesn’t consider sideEffects: true from package.json, as it is trying to download a file when starting the effect, which happens when the shader code cannot be found in the Shader map. but i can’t say without a reproduction. What I can say is that using my es6 test project I was able to use the shadow only material and render correctly.

1 Like

@sebavan I tried the “TOTO” renaming without any positive effect - same error. Which makes sense since the class ShadowOnlyMaterial is not exposed.

@RaananW Unfortunately I am not able to share the whole project because it is a commercial product. It would not make sense to share the BABYLON files because they use a lot of data calculated in other parts of the project. Without that data nothing works.
The simplest way to test would be to start a Vue.js project, run “npm i @babylonjs/core” (to install the Babylon module), then check if the module expose the class ShadowOnlyMaterial.

babylonjs/core does not expose the shadow only material. it is the babylonjs/materials that does that.

I am not 100% familiar with Vue, so I wouldn’t know where to start. Would still be great to get a (non)working reproduction so I can dive into the issue

To conclude this issue: I upgraded to Babylon 5.8.2 and for this version ShadowOnlyMaterial works in my environment (Vuejs 3).

Thank you all for contributing to this issue.

4 Likes