texturedmesh.vp 637 B

123456789101112131415161718192021222324252627
  1. #version 140
  2. // Positions can be world or local space, since world and normal
  3. // matrices are identity for world vertex space materials.
  4. // If world vertex space is selected, you can remove the
  5. // normal matrix multiplication for optimal performance.
  6. in highp vec4 position;
  7. in mediump vec2 texcoord0;
  8. out highp vec4 var_position;
  9. out mediump vec2 var_texcoord0;
  10. uniform vs_uniforms
  11. {
  12. uniform mediump mat4 mtx_worldview;
  13. uniform mediump mat4 mtx_proj;
  14. uniform mediump mat4 mtx_view;
  15. };
  16. void main()
  17. {
  18. vec4 p = mtx_worldview * vec4(position.xyz, 1.0);
  19. var_position = p;
  20. var_texcoord0 = texcoord0;
  21. gl_Position = mtx_proj * p;
  22. }