Jump to content

Is there a way to render meshes into customRenderTargets against the existing depth buffer?


Recommended Posts

I need to render several meshes into a custom render target (for later compositing in the post process pipeline). But I need them to use the same depth buffer as the normal meshes too.

Is there a way that they share the same depth buffer? 


For now, what in the custom render target is always on the top because they will not be discarded by the depth test...

Link to comment
Share on other sites

11 hours ago, Deltakosh said:

So the idea would be to attach the main depth buffer to a render target right?

Yeah although I have written any GL low level code for a very long time...:D

The great thing is that we can avoid re-render the "main scene". We can just re-render some overlay layers and compose them easily in the post pipeline. ^_^

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...