Jump to content
  • Advertisement
Sign in to follow this  
helenj

render to texture

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

Hi, how can I render the result of vertex shader to a texture and process it in the pixel shader? Is there anything like SetRenderTarget() in D3D? Thanks a lot.

Share this post


Link to post
Share on other sites
Advertisement
this has been answered alot in these forums, you should try the forum search (which is just a google search with a site qualitfier)

anyway, a few topics which i have posted into:
http://www.gamedev.net/community/forums/topic.asp?topic_id=321786&whichpage=1?
http://www.gamedev.net/community/forums/topic.asp?topic_id=320802&whichpage=1?

the quickest/easiest way is to use glCopyTexSubImage2D but that will incur a performance penalty. (implementation details are available in those threads)

Share this post


Link to post
Share on other sites
Thanks a lot for your answer.

Actually I know glCopyTexSubImage2D can copy from the frame buffer to a texture.But there's one thing I'm not clear about. Does the output of vertex shader go to pixel shader and then been written into the frame buffer? So if I just want to render the output of vertex shader to texture, does glCopyTexSubImage2D still work?

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!