render to texture
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.
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)
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)
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?
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?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement