transparent-cube

Minimal cross-platform native/wasm graphics example.
git clone git://git.amin.space/transparent-cube.git
Log | Files | Refs | README | LICENSE

cube_v.glsl (288B)


      1 #version 300 es
      2 
      3 layout (location = 0) in vec3 a_position;
      4 layout (location = 1) in vec3 a_color;
      5 
      6 uniform mat4 model;
      7 uniform mat4 view;
      8 uniform mat4 projection;
      9 
     10 out vec3 color;
     11 
     12 void main()
     13 {
     14     gl_Position = projection * view * model * vec4(a_position, 1.0f);
     15     color = a_color;
     16 }