• Advertisement
Sign in to follow this  

render to texture

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