Hi everyone~
I used to make Babylon to render transparent by scene.clearColor.set(0, 0, 0, 0);
It work well in PG 7.54.0 (Babylon.js Playground)
I always think that engine set clearcolor to all pixel before render, but when I update bbl in my projection from 7.8.0 to 7.54.0, clearcolor works like motion blur. I don’t know what cause this trouble.
scene.clearColor = new Color4(1, 0, 0, 0.1):
I find it is a multicanvas bug, when we need to create a multiCanvas engine, we create a canvas element as input param. In this case, clearcolor is not working well.
if (this.multiCanvas) {
const canvas = document.createElement("canvas");
this.engine = new Engine(canvas, true, {}, true);
this.engine.runRenderLoop(() => {
this.renderLoopMultiCanvas();
})
}
Yes! They are looking the same!
In my project, each canvas means a scene, each scene has a loader to import meshes
I find another trouble that, meshes/materials/etc can imported into 2nd 3rd .., but nothing is render in the scene.
Do you know the second trouble, I use same code to load model for each canvas, only the first canvas renders models. I check my code and finally find that environmentBRDFTexture cause it. I don’t know how to fix it, do you have any idea?
This is PG about this trouble: https://playground.babylonjs.com/#E6I6PX#3
Case environmentBRDFTexture is not set, model can be renderred:
It’s environmentTexture you want to set, not environmentBRDFTexture (the BRDF texture is an internal texture, that you probably never want to change as it’s quite particular). Also, you should use “/” in the url of the environment texture, not “\” (line 33):
Sorry, it is my missspelling, I find the env file is missing in my project which cause this trouble, like this: https://playground.babylonjs.com/#E6I6PX#7 Thank you for helping me!