Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save otanodesignco/a3bb8927f861667f64cb882b97243d50 to your computer and use it in GitHub Desktop.
Save otanodesignco/a3bb8927f861667f64cb882b97243d50 to your computer and use it in GitHub Desktop.
world space uvs
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