Jump to content
  • Advertisement
Sign in to follow this  
ShmeeBegek

Saving values across rendering passes (Cg)

This topic is 5067 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

Sorry for the two posts, I had already posted the other when I remembered that I had meant to ask about this too... I have two similar rendering passes that both need texture coordinate, light normals, and a few other things that are generated / procured on the first pass by the fragment shader. I have not seen any way for a fragment shader to save values for a pixel across passes (such as putting them in a texture or some-such), does anyone know of a way around simply generating all of these values twice? Thanks, ~SPH

Share this post


Link to post
Share on other sites
Advertisement
Things called 'G-buffers' can be used, a nice article on deferred shading gives some info. Basically, framebuffers in DX9 level cards can store floating point info like positions, normals, texture coordinates etc., but don't forget they suck up mountains of VRAM.

Share this post


Link to post
Share on other sites

Thanks, that sounds like what I want... except that it is DirectX specific. But I'll look around for an OpenGL parallel (must exist).

Thanks again, ~SPH

Share this post


Link to post
Share on other sites
>>except that it is DirectX specific<<

no its not, perhaps youre getting confused with the " floating-point framebuffers in the DX9 hardware generation"

which means u need >= gffx or >= radeon9500

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!