OpenGL Programming/Modern OpenGL Tutorial drafts

= Optimization =

In addition we can set up back-face culling:
 * glEnable(GL_CULL_FACE); // disabled by default
 * Behavior specified by glCullFace(GL_BACK) and glFrontFace(GL_CCW) by default

Covered in GLSL_Programming/GLUT/Cutaways.

Exemple: show a rotating cube with one of the facet missing - can we see inside the cube? What are the possible work-arounds?

= Sound input =


 * Use OpenAL to capture sound from microphone, upload data unmodified to graphics card, display oscilloscope signal.

= Image enhancement techniques =


 * Contrast and brightness adjustments.
 * Gamma correction.
 * Sharpening / blurring using small convolution matrices.
 * Using multiple texture units to perform darkfield and flatfield correction of CCD/CMOS images.
 * Combine multiple exposures into a single LDR image.

Technique: I will start with loading three textures, I, D and F, binding them to separate texture units, and calculating (I - D) * F in the fragment shader. For things like gamma correction and small convolutions I will use a single texture, so it can be applied either something that has been uploaded previously or the contents of a FBO.

= Depth sorting =

Useful if your depth buffer has low precision, you want to do transparency, or for some shadow techniques

= Vertex water effect =

One can achieve a "under water" effect by adding a random noise for each vertex:

srand is modified every 1/10 second, so the animation is not too frenzy.

I was trying a get a per-pixel postfx but this could be used for morphing effects and such.

= 2D Scaling as shaders? =

Paul sends me:


 * I just realised that there are a ton of upscaling algorithms for bitmap
 * artwork and that it might be an interesting exercise to implement some
 * or all of them using GPU shaders and modern OpenGL.


 * http://research.microsoft.com/en-us/um/people/kopf/pixelart/supplementary/index.html
 * http://scale2x.sourceforge.net/

Sounds like a good idea!

multiple textures and

shader changed for different triangles