Hey @khanh_ha !
OIT has really basic support right now, since it’s a specific pipeline for rendering transparent objects, there may be a set of features that are conflicting with it. And it appears to be the case with translucency as we have lots of webgl errors in the console.
We will improve the support of OIT in the future, but for now I would disable translucency on all transparent materials if you want to use it.
I understand that the white screen problem is due to a bug in the IOT feature that is not compatible with translucency material. Can you tell me a bit more about this bug?
It would be wonderful if you could suggest me any workaround that I can implement for now so translucency materials can coexist with transparent materials in the same scene while IOT is enabled?
Disabling translucency is a big trade-off for my project.
@CraigFeldspar Hi, as far as I understand, the dual depth peeling technique is used for the current IOT feature in babylonJS. Can you provide me with more detail why this dual depth peeling is preferrered over the new technique “weighed, blended”, as mentioned here [LearnOpenGL - Introduction]? Is there any challenge that prevents us from integration this weighted, blended technique into BabylonJS?
@CraigFeldspar@carolhmj I think I have figured out why OIT fails with PBRMaterial. To be precise, it fails when refractionTexture of PBRMaterial is used. PBRMaterial with transmission is a 2-pass rendering algorithm that renders opaque objects first onto a render target, and then use this render target as a refraction texture.
When this refraction texture is active in PBRMaterial, OIT just fails.
@khanh_ha quick fix I’d say no, the problem lies in the engine : the oit messes somehow with the render destinations and the both techniques mess with each other. In your PG, there seems to be a new framebuffer created every frame, for some reason that eludes me
I’d say if you feel like trying to work this out/help/collaborate, then ‘yes’. It certainly would be nice if this could somehow work. But I rather believe this will not be just a ‘quick fix’.
I would think it is a current limitation of how the algorithm is working unfortunately. @CraigFeldspar could you confirm ? and if yes could it be added to the doc ?
The algorithm for sure blends naively the colors that are stacked onto each other, so indeed there is no refraction happening, I’d say let’s add this limitation to the doc