Sign in to follow this  

Help with Beginning Postprocessing (Shaders)

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

Hello. I posted awhile ago asking about the applicability of shaders to 2D graphics. I was told that they indeed can be useful. I want to try using some basic postprocessing effects with OpenGL, but, quite frankly, I have no idea what I'm doing. Does anyone have any links to some turorials for using (basic) shaders with OpenGL? I'm not sure how to write a shader or even how to load a shader application with OpenGL. In fact, I'm not worried about writing my own shaders at the moment, but only with being able to use them in my engine. I could use all the help I can get. :-P Thanks!

Share this post


Link to post
Share on other sites
http://www.lighthouse3d.com/opengl/glsl/

http://www.clockworkcoders.com/oglsl/tutorials.html

http://www.ozone3d.net/tutorials/index.php#hyp_glsl

I found this last sites shader examples especially helpful. Scroll down to the GLSL ones, there are more on the next page.
http://www.ultimategameprogramming.com/demoDownload.php?category=OpenGL&page=8


For postprocessing effects you're going to need to be able to render to texture. Here are some tutorials for creating GLSL shaders. These will cover debugging, loading, using, and writing shaders.

Share this post


Link to post
Share on other sites
I found Lighthouse 3D to have some of the best GLSL information out there. It's pretty straight forward, but I'd recomend reading through all of it and not just jumping to the source-code and copy-and-pasting it. They've got some great information that you'd be doing yourself a disservice to not read.

And just as a side-tip, I found that using glCopyTexSubImage2D() to be a usefull function for making many special effects. Basically, it lets you copy a part of the screen onto the current texture. Then you can render a quad with that texture and draw it over the same spot that it was taken from and you'll be able to shader-ify places.

Share this post


Link to post
Share on other sites

This topic is 4094 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this