|
||||
|
Section 5.10 (Worksheet 7)
Page last edited by Jeppe Revall Frisvad (jerf) 09/10-2017
The code for initializing the matrix M and setting the initial light position is faulty. The following lines light = vec3(0.0, 2.0, 0.0); should have been as follows: light = vec3(0.0, 2.0, 0.0); // Location of light The render function works as listed in the case of static geometry and a dynamic light source. However, one should distinguish between the model and the view matrix if working with dynamic geometry. When drawing shadow polygons in this case, the model matrix should be applied first (to dynamically move the objects around the scene). After this, one may apply the matrices for translation, shadow projection, and translation back, then the view matrix, and finally the projection matrix. |
|||