您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

20 行
438 B

  1. #version 330
  2. // Input vertex attributes
  3. in vec3 vertexPosition;
  4. // Input uniform values
  5. uniform mat4 matProjection;
  6. uniform mat4 matView;
  7. // Output vertex attributes (to fragment shader)
  8. out vec3 fragPosition;
  9. void main()
  10. {
  11. // Calculate fragment position based on model transformations
  12. fragPosition = vertexPosition;
  13. // Calculate final vertex position
  14. gl_Position = matProjection*matView*vec4(vertexPosition, 1.0);
  15. }