Postprocess with prepassRenderer caused msaa not work

PG: Babylon.js Playground
It is really wired that msaa not work any more when I enable prepassrenderer in the post process, how can I fix this?

And when I try to use geometryBufferRenderer instead of prepassRenderer, part of the sphere often disappears, how can I improve it?

To enable MSAA with the prepass renderer, you can set:

scene.prePassRenderer.renderTargets[0].samples = 4;

Regarding the sphere disappearing when using the geometry buffer renderer (GBR), that’s because we use a 16 bits depth buffer by default with the GBR.

This PR will allow you to change the format of the depth texture:

Once this PR is merged, this PG will work as expected (see line 54):

2 Likes