In order to apply specular lighting you will need 4 additional pieces of information:
- The fragment position.
- The camera position.
- The specular intensity of the pyramid material.
- The shininess of the pyramid material.
1. Add the fragment position
1.1. Modify the vertex shader
- Open the main.cpp file.
- Modify the fragment shader source code as follows: