Last active
September 10, 2017 19:48
-
-
Save tedigc/9b643b3d3910dc7b3b563d2e7ca10270 to your computer and use it in GitHub Desktop.
default shader programs for libGDX
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
| #ifdef GL_ES | |
| precision mediump float; | |
| #endif | |
| varying vec4 v_color; | |
| varying vec2 v_texCoords; | |
| uniform sampler2D u_texture; | |
| uniform mat4 u_projTrans; | |
| void main() { | |
| gl_FragColor = v_color * texture2D(u_texture, v_texCoords); | |
| } |
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
| attribute vec4 a_position; | |
| attribute vec4 a_color; | |
| attribute vec2 a_texCoord; | |
| uniform mat4 u_projTrans; | |
| varying vec4 v_color; | |
| varying vec2 v_texCoord; | |
| void main() { | |
| v_color = a_color; | |
| v_texCoord = a_texCoord + 0; | |
| gl_Position = u_projTrans * a_position; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment