Pure BabylonJS code to build model with accurate translucency (like the "Mosquito In Amber" demo)

This is using the TransmissionHelper class (implemented by the gLTF loader), which is not exposed to user code.

See Transmission Helper Optimisation and my answer (+link) for some context.

You can implement it yourself by rendering the opaque objects in a RenderTargetTexture and using this texture as the refraction texture of your PBR materials.

2 Likes