Hi all, I have a deferred rendering setup and I want to render debug meshes (such as an AAB surrounding the mesh) over my meshes. With a forward renderer I could just render these meshes in a subsequent pass as the depth information is preserved. But in a deferred rendering pass this is lost. I know I can probably store the depth in a g-buffer texture using the
gl_fragDepth field but How do I use it in a shader to draw the wireframe meshes.
Also is there a better approach of drawing debug meshes when using deferred rendering ?
Thanks in advance