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

CH11-toyball.vert.txt 643B

123456789101112131415161718192021222324
  1. //
  2. // Fragment shader for procedurally generated toy ball
  3. //
  4. // Author: Bill Licea-Kane
  5. //
  6. // Copyright (c) 2002-2003 ATI Research
  7. //
  8. // See ATI-License.txt for license information
  9. //
  10. varying vec4 ECposition; // surface position in eye coordinates
  11. varying vec4 ECballCenter; // ball center in eye coordinates
  12. uniform vec4 BallCenter; // ball center in modelling coordinates
  13. void main()
  14. {
  15. //orig: ECposition = gl_ModelViewMatrix * gl_Vertex;
  16. ECposition = gl_TextureMatrix[0] * gl_Vertex;
  17. ECposition = gl_ModelViewMatrix * ECposition;
  18. ECballCenter = gl_ModelViewMatrix * BallCenter;
  19. gl_Position = ftransform();
  20. }