Transmission effect pbr material performance

Hello, i am using transmission in my scene when i have them on the fps is 20 when i pause the transmission the fps will jump to 40,
is there a way to optimize my scene with transmission

i have a big scene already alot of meshes, and i am using water shader from drei so those 2 are already making my scene have low fps

and is there a way to optimize the water shader so it doesn’t eat to much from the performance.

it needs to make some extra passes, each pass is a full render of your scene on top.

that’s two extra passes

<MeshTransmissionMaterial backside />

that’s only one

<MeshTransmissionMaterial />

you can mitigate with lowering resolution and samples

<MeshTransmissionMaterial samples={3} resolution={512} />

you can also tap into the buffer that three uses for meshphysical transmission, in that case three will make a single pass for all transmissive materials including drei/mtm (but it has downside, this pass will only include opaque objects)

<MeshTransmissionMaterial transmissionSampler />

i would generally recommend you profile your scene, how many drawcalls, meshes, materials, vertices you have. maybe mtm is merely the factor that pushes it over the edge but imo in that case the problem will surface without it on lower tier devices anyway.

1 Like