Is it possible to have a flat background image not being affected by the post processes of the default rendering pipeline? I’ve been doing some tests using a Layer with no luck, as the BG image gets blurred as well:
You can do it as you did with two cameras but by blending the last post process of the pipeline with the current framebuffer (which contains the layer image at that point) instead of simply replacing the framebuffer with the result of the pipeline (which is the default behaviour).
Here’s a PG that is doing that:
You need to set a scene clear color with alpha=0 for it to work as expected.
@Evgeni_Popov@sebavan Update! I have found some breakage with recent updates to babylon with this particular technique and we’re experiencing this after updating to ^5.53.1. (^5.21.0 was working for us) See PG example:
this happens when we set the HDR mode in the DefaultRenderingPipeline to true
We do need HDR PP , we cant really rely on LDR.
Is this a bug or is there a better way to do this?
Not sure if this is approach that fit your needs. But maybe you could do the following.
set scene.clearColor to new Color4(0,0,0,0); To make it transparent.
set the background of the canvas element to “transparent”
create a div or some other HTML element which will exist behind the canvas element, effectively acting as background for the scene.
So basically, background is not part of the scene, it’s the separate HTML element which exists behind the canvas, and both canvas and scene clearColor are set to transparent so the background element gets visible.
I ran into an issue when I use: forceAutoClearInAlphaMode.
I am doing similar thing like this PG (this is from another thread)
After I evoke forceAutoClearInAlphaMode in my own code, I do see the all the post textures get cleared. However, the yellow background is also disappeared. The listed PG doesnt have that artifacts but in my own code base I encountered it…I couldnt replicate the issue in a PG but I do observe the problem…