Created
August 2, 2023 07:20
-
-
Save otanodesignco/863421c11836d7a0a91c234bb453fa0c to your computer and use it in GitHub Desktop.
calculate surface normals in three.js
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
/* calculate surface normals shader material three.js */ | |
out vec3 vSurfaceNormal; | |
void main() | |
{ | |
vSurfaceNormal = normalize( normalMatrix * normal ); | |
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1. ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment