Jump to content
  • Advertisement
Sign in to follow this  
me_here_me

writing to FBO

This topic is 4255 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing output from a fragment shader on an FBO object. That FBO object is then bind to another fragment shader that does some further calculations based on the current values in the FBO and then prints the result. my FBO is called fbColor. I have two questions. Q1: how is that FBO bind to the second fragment shader ? (like a 2D texture?) q2: how is the values in that FBO accessed in the fragement shader. Say I wanna read the values in a float and then after making changes want to write it back. is there some online tutorial that deals with multiple shaders in a single program. best wishes [Edited by - me_here_me on February 1, 2007 10:36:18 AM]

Share this post


Link to post
Share on other sites
Advertisement
a1: bind the fbo's texture attachement, not the fbo itself (which is impossible anyway)
a2: don't r/w access fbos - use two fbos instead (double buffering)*

*problem of r/w access:

> fragment shader samples N fragments simultaneously (N := #fragment pipelines of you gpu)
> assume frag(x) := tex (y) equals tex(x) := tex(y) for r/w access
> guess result of tex(x) := tex(x-1) executed simultaneously for N = 1, N = 2, N = ...
> guess result for (#frags/N) pipeline passes ordered at your gpu's choice...

btw: there is a huge probability that your ICD stalls to software emulation (0.x fps)...

- zimerman

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!