Created
July 31, 2023 02:28
-
-
Save OtanoStudio/a3bb8927f861667f64cb882b97243d50 to your computer and use it in GitHub Desktop.
world space uvs
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
| out vec2 vWorldUv; | |
| void main() | |
| { | |
| vec4 objectSpace = modelMatrix * vec4( position, 1.0 ); | |
| vWorldUv = vec2( objectSpace.x, objectSpace.z ); | |
| gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment