Created
April 22, 2025 17:17
-
-
Save iregina/1740cb4978cf17746afa2f7b03034697 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
// the tangents are computed when the mesh is created, and passed as an attribute | |
attribute vec3 tangent; | |
vec3 lookDirection = normalize(position.xyz - cameraPosition); | |
vec3 offset = cross(lookDirection, tangent); | |
vec3 adjustedPosition = position.xyz + normalize(offset) * thickness; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment