Skip to content

Instantly share code, notes, and snippets.

View tomcashman's full-sized avatar

Thomas Cashman tomcashman

View GitHub Profile
@tomcashman
tomcashman / default.vertex.glsl
Created October 31, 2015 19:38
LibGDX Default 2D Vertex Shader
// Based on https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/SpriteBatch.java#L127
// Licensed under the LibGDX license: https://github.com/libgdx/libgdx/blob/master/LICENSE
attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texCoord0;
uniform mat4 u_projTrans;
varying vec4 v_color;
varying vec2 v_texCoords;