a-game

2D platformer written from scratch.
git clone git://git.amin.space/a-game.git
Log | Files | Refs | README | LICENSE

main_v.glsl (460B)


      1 #version 300 es
      2 
      3 // TODO: dynamically insert the version header after loading the file
      4 
      5 layout (location = 0) in vec2 position;
      6 layout (location = 1) in vec2 a_tex_coords;
      7 
      8 out vec4 vertex_color;
      9 out vec2 tex_coord;
     10 
     11 uniform mat4 model;
     12 uniform mat4 view;
     13 uniform mat4 projection;
     14 uniform vec3 color;
     15 
     16 void main()
     17 {
     18     gl_Position = projection * view * model * vec4(position, 0.0f, 1.0f);
     19     vertex_color = vec4(color, 1.0f);
     20     tex_coord = a_tex_coords;
     21 }