uvgradient.vp 640 B

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