Help with Beginning Postprocessing (Shaders)

Started by
1 comment, last by Ezbez 17 years, 6 months ago
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!
Advertisement
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.
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.

This topic is closed to new replies.

Advertisement