You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
364 B

5 years ago
  1. attribute vec4 position;
  2. attribute vec4 color;
  3. attribute vec4 normal;
  4. uniform mat4 ModelMatrix;
  5. uniform mat4 ViewMatrix;
  6. uniform mat4 ProjectionMatrix;
  7. varying vec4 V_Color;
  8. void main()
  9. {
  10. V_Color=color;
  11. gl_PointSize=64.0;
  12. vec4 pos=vec4(position.x+normal.x,position.y+normal.y,position.z+normal.z,1.0);
  13. gl_Position=ProjectionMatrix*ViewMatrix*ModelMatrix*pos;
  14. }