FaceColor + GlowLayer + V4

First, I want to say that I just switch to V4 and it worked perfectly well. No big corrections or adjustments needed so thanks for the amazing work!

Yet I have an error showing when using faceColor on a mesh and a GlowLayer in the scene. It doesn’t break anything but there is an issue showing in the console which I don’t understand.
Here is a playground: https://www.babylonjs-playground.com/index.html#CWPN2T#57

Pinging @sebavan

will be fixed by Fix vertex Alpha by sebavan · Pull Request #6191 · BabylonJS/Babylon.js · GitHub

so it should be in the next package :slight_smile:

1 Like

I have found something else with the GlowLayer that you can observe in this playground: https://www.babylonjs-playground.com/#63QN3J#3

First I don’t know why but the glow is behind the ground.
And there is a conflict with the postprocess. If you toggle the depth of field, the GlowLayer will stop following the camera movement.

If the glow is used with a pipeline, it needs to be setup there to not interfer:
pipeline.glowLayerEnabled = true;

Adding @trevordev about the weird state change in the pipeline.

Hi @sebavan, thanks for your answer!

Unfortunately, even if we use the glowLayer from the pipeline like in your playground, the glow will still stop following the camera:


Yup Main reason I pinged @trevordev :wink:

1 Like

I have made some other test and to be more precise this is linked with the depthoffield only.

As seen in this playground, with only the vignette and no depthoffield, the glowLayer is ok : https://www.babylonjs-playground.com/#63QN3J#5

@PichouPichou thanks for the extra info, looks like the glowLayer doesn’t work when depth rendering is enabled https://playground.babylonjs.com/#6ZVKE3#11 (depthOfField enables this), I’m investigating what the right fix might be.

1 Like

Created a PR here which seems to fix the issues exposed by your playgrounds apply camera render target stage prior to rendering depth by TrevorDev · Pull Request #6197 · BabylonJS/Babylon.js · GitHub


Thanks for the fix. I will follow the update to try it! :wink: