I'm trying to implement deferred shading in webgl and render transparent objects in another scene / pass with forward rendering.
Whats bugging me is how can I combine the transparent scene with the output of the deferred renderer.
I thought of using the depth from the gbuffer in the forward renderer shader and discard every fragment which z > z from depth pass.
Would that work?