This might be one for you @Evgeni_Popov - we’re finding that for larger scenes, using the transmission helper that’s set up after importing GLTFs with the KHR transmission extension causes pretty strong perf degradation.
I have a couple of theories as to why this might be, perhaps you can offer some advice:
This could be a fairly expensive operation for a full-screen rendertarget. Last we spoke you suggested a PG that modifies the transmissionhelper rendertarget to be a half-float format. Unfortunately it doesn’t seem to be possible to disable mip generation in the same way? If you’re not planning on rendering frosted glass, this ought to be an unnecessary expense.
Rendering the Scene Twice
Given that the rendertarget seems to be set up similarly to how rendertargets for something like reflections are set up in Babylon, and the transmission helper actually passes a lit of opaque meshes through to the RT, I’m a little suspicious that it’s actually forcing the entire scene to render twice, in order to achieve the glass refraction effect? It would explain the perf drop on larger scenes. If that is the case, can this be avoided? In principle you should only need to copy the frame buffer to a new rendertarget after you’ve finished rendering opaque meshes, I would not expect there to be any need to render an entirely new version of the scene?
Do these concerns make sense? Is there any other reason you can think of that this would be an unreasonably expensive operation?
As a sidenote, it would be great to see some of this documented. Though I’ve been able to find some of the typescript that creates the transmissionhelper, I feel like it would be worthwhile to update the Reflection/Refraction docs with information on how the transmission helper works, and how you could recreate its functionality in code, if you wanted to set up more physically correct glass materials without importing a GLTF for it specifically - as it stands, you get good results with it, but it feels like something of a black box.