Explicit import for shader include files

Hey,

I have a project where I created thin instances with own shader materials and ran into similar issue as this one - Shader includes and threeshaking.

Context: I’m working on babylonjs migration from 6.12.2 to 7.48.3. The project works fine on 6.12.2. But after I upgraded to 7.48.3, I got error GET https://localhost/src/Shaders/ShadersInclude/instancesDeclaration.fx 404. I need to explicitly import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex" to get the application to run.

My question is:

  • can you point me which changes were introduced that requires explicit import shader include files? I didn’t find any explicit import for instancesVertex in the source code of 6.12.2.

Thanks for the help!

cc @RaananW

Hi @Haoran,

Would you be able to provide. simple reproduction so i can debug this correctly?
We might be missing an import somewhere, or you might need to import the declaration yourself, if one of your haders require the data. But i can’t really tell without more input from you.