Hi,
there’s a _createMergeEffect
method of GlowLayer
:
which has a this._engine.createEffect
call.
Should this call also have an extraInitializationsAsync
parameter defined like:
return this._engine.createEffect(
"glowMapMerge",
[VertexBuffer.PositionKind],
["offset"],
["textureSampler", "textureSampler2"],
defines,
undefined,
undefined,
undefined,
undefined,
this.shaderLanguage,
// extraInitializationsAsync
this._shadersLoaded
? undefined
: async () => {
await this._importShadersAsync();
this._shadersLoaded = true;
},
);
the same way it’s done here? Babylon.js/packages/dev/core/src/Layers/effectLayer.ts at master · BabylonJS/Babylon.js · GitHub
I ran into an issue when this._createMergeEffect()
is called before the shaders for the glow layer have been loaded/imported. Engine then tries to load shaders from http://localhost:1234/src/Shaders/glowMapMerge.vertex.fx
and fails with a 404.
Can’t reproduce this in the Playground, because all shader code seems to be bundled in a single file there.
Kind regards.