Jump to content

Sharing information between fragment shaders


Nacheitor
 Share

Recommended Posts

Hi, I have a doubt. Would it be possible to share information between fragment shaders?
I would like to have a buffer to share information between the different fragment shaders that affect a pixel of the final rendering of the scene. And in the end of the rendering cycle, clean all that information for the next rendering cycle.

Thanks in advance.

Link to comment
Share on other sites

I'm trying to do something like this:

https://www.youtube.com/watch?time_continue=19&v=yECDO_l00rs

If I have a buffer between fragments shaders, I could have a record of what has been rendered in each pixel and thus be able to decide what should be painted or not.

For example, taking the video as example. If the back part of the cylinder is rendered first, then the back part of the sphere, the front part of the cylinder should be discarded. I don't know if I explain.

I don't know how I could implement that with the examples you have given me ... I'm sorry but it's the first time I've worked with shaders.

Thanks in advance.

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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