Advertisement
mnuriev

Untitled

Feb 26th, 2020
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //
  2. // Simple passthrough vertex shader
  3. //
  4. attribute vec3 in_Position; // (x,y,z)
  5. attribute vec4 in_Colour; // (r,g,b,a)
  6. attribute vec2 in_TextureCoord; // (u,v)
  7.  
  8. varying vec2 v_vTexcoord;
  9. varying vec4 v_vColour;
  10.  
  11. void main()
  12. {
  13. vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
  14. gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
  15.  
  16. v_vColour = in_Colour;
  17. v_vTexcoord = in_TextureCoord;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement