read.cash
Login
3d modeling
0
13
Written by
abdou22
abdou22
No bio yet...
3 years ago
Lines 336 - 338 is where it happens. I find the normal for each face (a vector perpendicular to its surface), then take the dot product with a vector representing the direction of the light to see to what degree they are in the opposite direction. Then use this value to determine how much to shade the surface. Faces that directly face the light are lighter than those angled away from the light.
-2
$ 0.00
Comments
Register to comment