pex-gl / pex-renderer

Physically based renderer (PBR) and scene graph for PEX.
https://pex-gl.github.io/pex-renderer/examples/index.html
MIT License
234 stars 16 forks source link

Helpers in postprocessing don't respect depth buffer #265

Closed vorg closed 4 years ago

vorg commented 4 years ago
Screenshot 2019-12-10 at 14 22 24
vorg commented 4 years ago

That's because we draw helpers after post-processing is done. Moving it to the same place as drawMeshes breaks line antialiasing and is too bright due to emissive (fixed) makes everything darker due to tonemapping (fixed by multiplying color by 2)

Screenshot 2019-12-10 at 15 02 55 Screenshot 2019-12-10 at 15 10 25
vorg commented 4 years ago

Without multiplying colors by 2: main screen has postprocessing (fixed helper depth but colors are ugly), right screens don't have postprocessing

Screenshot 2019-12-10 at 15 15 03

It's currently not possible to have stuff that is part of 3d scene but "skips" postprocessing. It would require one more "combine" pass that renders helpers to already postprocess color buffer while reusing depth buffer, and only then blits it to the screen.