are also very useful for image processing, which will apply some sort of
transformation to the image pixels before they are displayed.
image processing examples include
- Edge detection
- Colour correction, tone mapping, gamma
these are used as post-processing effects.
are going to perform these operations in hardware using shaders.
processing operations typically require that, at a given pixel, we know the
value at an adjacent pixel.
- We will store an image as a texture.
- Using a sampler object, we can sample
different texels in the texture.
We can then apply some mathematical
operations to the texels.
- And save the output to:
texture in an FB
colour buffer in the default framebuffer