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
const light = /* a unit normal for light direction */; | |
// Determine the 3D position and normal from surface point | |
const [ u, v ] = penStart; | |
const [ position, normal ] = geometricNormal(parametricTerrain, u, v); | |
// Get lambertian diffuse | |
const diffuse = Math.max(0, vec3.dot(normal, light)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment