Let us make the chopper a bit more colorful. We are not having light calculations yet, but we can make the rectangular cuboids to have a gradient color for example.
This time we will be writing some shaders to do this. Remember, there are two main shaders executed on the GPU:
So, the idea is to have two colors (a light color and a dark color for example). We assign the light color for the first 4 vertices of our rectangular cuboid, and the dark color for the other 4. These colors can be sent to the vertex shader as vertex attributes. Then we can use built-in interpolation to vary between those colors in the fragment shader.
Base codes have more explanation on that.
The result can look something like:
Do try to make it so, that the dark faces of the blades are towards each other, and the light faces away from each other.
We strongly recommend using Shader Language extension to get syntax highlighting for GLSL files, among with other useful tools.