-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lighting is now done on a per-triangle basis rather than a per-vertex basis, as Sun lights color all vertices the same (as they all belong to the same triangle, which has just one normal). Point lights are also optimized - rather than transforming each vertex by the model's transform, it's faster to transform the point light's position by the model's inverted transform. Light.Light() returns an array of 9 floats, indicating the R, G, and B values for the light for each vertex of a given triangle. Adding toggle-able lighting in the lighting example.
- Loading branch information
Showing
4 changed files
with
159 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.