I don’t think so, but here’s a proof of concept to generate the opaque texture without the TransmissionHelper
and without the additional re-rendering of the scene (but instead with an additional copy texture):
It’s a bit crude because I don’t handle screen resizing / image processing / … but it works.
It needs that at least one post process exists in the scene because it’s the texture of the first post process that will be copied into the opaque texture, so I created one in the PG (a do nothing “pass”), but if you already have one you can avoid creating this pass post process.
It also needs that the transmissive meshes (the ones that need the opaque texture as their refraction texture) be set with renderingGroupId=1
because it is at the transition between renderingGroupId=0
and renderingGroupId=1
that the current texture is copied into the opaque texture (in the scene.onBeforeRenderingGroupObservable
event).