Shaders are programs for the
GPU
- Like any program, they need to be compiled
- Compile both vertex and fragment shaders separately
- Combine them into a shader program
- GPU’s way of storing a graphics pipeline
Compiling shaders is
uncomfortable
- We have a library function
initShaders()
- We’ll call it in our
init()
function
- call it for every combination of shaders required