Post process depth of field: really that slow?

Hi,

I was playing in that PG:
https://playground.babylonjs.com/#DX6AV#166

Setting everything to low, still causes my intel gpu to struggle to reach 19fps:
var lensEffect = new BABYLON.LensRenderingPipeline(‘lens’, {
edge_blur: 0,
chromatic_aberration: 0.0,
distortion: 0.0,
dof_focus_distance: 100,
dof_aperture: 0.0, // set this very high for tilt-shift effect
grain_amount: 0.0,
dof_pentagon: false,
dof_gain: 0.0,
dof_threshold: 100,
dof_darken: 0
}, scene, 0.01, camera);

When switching to the Nvidia gpu, yes it is better, but still… slow.
Even in the default pipeline the result is the same.

Anyone has a tip here? Except not using it of course :slight_smile: (but I won’t if no solution are found)

Thanks!

Unfortunately except rendering at a smaller res, there is not much we can do as it needs quite a few pass to render a depth buffer, render the scene, blur in a special way and blend it all together :frowning:

Ok I will discriminate its use based on resolution, at first, then, probably disable it altogether :slight_smile:
Thanks sebavan!

1 Like