Created
July 17, 2015 21:50
-
-
Save AndrewRayCode/35fff50453abf5d0cf4e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* vertex */ | |
| uniform mat4 modelMatrix; | |
| varying mat4 matrix; | |
| ... | |
| void main() { | |
| vPosition = position; | |
| matrix = modelMatrix; | |
| /* fragment */ | |
| uniform vec3 vLightPosition; | |
| varying vec3 vPosition; | |
| varying mat4 matrix; | |
| void main() { | |
| vec3 lightVectorW = normalize(vec3(vec4( vLightPosition, 1.0) * matrix) - vPosition); | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment