Last active
August 29, 2015 14:23
-
-
Save olevegard/4f6b2136409f79f77d8d to your computer and use it in GitHub Desktop.
This file contains 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
#version 150 | |
// in_Position was bound to attribute index 0 and in_Color was bound to attribute index 1 | |
attribute vec3 in_Position; | |
attribute vec4 in_Color; | |
// We output the ex_Color variable to the next shader in the chain | |
out vec4 ex_Color; | |
void main(void) { | |
// Since we are using flat lines, our input only had two points: x and y. | |
// Set the Z coordinate to 0 and W coordinate to 1 | |
gl_Position = vec4(in_Position.x, in_Position.y, in_Position.z, 1.0); | |
// Pass the color on to the fragment shader | |
ex_Color = in_Color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment