How does this faking the light work on aerotwist?
问题 I am trying to read up this tutorial: https://aerotwist.com/tutorials/an-introduction-to-shaders-part-2/ but I am not able to follow up. Basically the code creates a directional light by using shaders that run directly on the GPU. This is the code: // same name and type as VS varying vec3 vNormal; void main() { // calc the dot product and clamp // 0 -> 1 rather than -1 -> 1 vec3 light = vec3(0.5,0.2,1.0); // ensure it\'s normalized light = normalize(light); // calculate the dot product of //