when I add outline effect,bloom effect,dof effect to one scene,i have found if i add one mesh ,draw calls would be added five times .Is this normal? https://playground.babylonjs.com/#LRFB2D#159
Welcome aboard!
It’s expected:
- the lens effect takes one draw call (by the depth renderer)
- the glow layer takes one draw call to render in the layer texture
- the outline rendering takes 2 draw calls, one before and one after the regular rendering (the 2nd rendering is used to update the zbuffer)
- the regular rendering takes 1 draw call
1 Like
thank you for your reply,i have developed postprocess myself by three.can we get a prerender pass to collect information?E.g :depth,selected outline,selected bloom etc.that can reduce the number of renderings
You can use the prepass renderer to collect depth, position, normals, etc in a single pass but then you will have to implement yourself the glow, lens, outline, … effects as in Babylon they are implemented as separate effects and don’t work in a deferred way.
1 Like