Skip to content

Instantly share code, notes, and snippets.

@ThePhD
Created September 8, 2015 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThePhD/7e836ebb2f78cd5d51bc to your computer and use it in GitHub Desktop.
Save ThePhD/7e836ebb2f78cd5d51bc to your computer and use it in GitHub Desktop.
Weird layout
R"(
#version 330 core
uniform Draw {
uniform mat4 ViewProjection;
};
uniform Batch {
uniform vec2 Texture0Size;
uniform vec2 Texture0PixelSize;
};
uniform sampler2D Texture0;
in vec4 position; // gets assigned to location 1
in vec2 tex; // gets assigned to location 2
in vec4 color; // gets assigned to location 0
out vec4 return_position;
out vec2 return_tex;
out vec4 return_color;
void main( ) {
gl_Position = return_position = ViewProjection * position;
return_tex = tex;
return_color = color;
}
)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment