Skip to content

Instantly share code, notes, and snippets.

@wrr wrr/headlight
Created Sep 11, 2017

Embed
What would you like to do?
vec3 lightW = normalize(cameraPosition - vPositionW.xyz);
gl_FragColor.rgb = color * max(dot(normalize(vNormalW), lightW), 0.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.