Skip to content

Instantly share code, notes, and snippets.

@cwabbott0
Created June 10, 2013 03:23
Show Gist options
  • Save cwabbott0/5746331 to your computer and use it in GitHub Desktop.
Save cwabbott0/5746331 to your computer and use it in GitHub Desktop.
really simple vertex shader transformed
attribute vec4 aPosition;
uniform vec4 gl_mali_ViewportTransform[2];
void main() {
gl_Position.w = clamp(1.0 / aPosition.w, -1e10, 1e10);
gl_Position.xyz = aPosition.xyz * gl_Position.w * gl_mali_ViewportTransform[0].xyz + gl_mali_ViewportTransform[1].xyz;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment