Tutorial
Download simple_shaders.py
from GRIPS and try to get it running
Then complete the following tasks:
change the code so that the fragment shader reacts to mouse clicks
animate the square's position
drag the square around using the mouse
make the square rotate in 3D space (you need matrix multiplication in your shader (
see here)
apply simple shading in the fragment shader (see link above)
advanced: implement a blur fragment shader (you need to render to a buffer first - see multipass example
here