[C++] The IN55 project
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.

35 lines
908B

  1. #version 120
  2. attribute vec3 Position;
  3. // attribute vec3 Normal;
  4. // attribute mat4 BoneTransform[4];
  5. // attribute float Weights[4];
  6. // varying vec2 TexCoord0;
  7. // varying vec3 Normal0;
  8. // varying vec3 WorldPos0;
  9. // const int MAX_BONES = 100;
  10. // uniform mat4 gWVP;
  11. uniform mat4 gWorld;
  12. // uniform mat4 gBones[MAX_BONES];
  13. void main()
  14. {
  15. // mat4 Transform = BoneTransform[0] * Weights[0];
  16. // Transform += BoneTransform[1] * Weights[1];
  17. // Transform += BoneTransform[2] * Weights[2];
  18. // Transform += BoneTransform[3] * Weights[3];
  19. // vec4 PosL = Transform * vec4(Position, 1.0);
  20. vec4 PosL = vec4(Position, 1.0);
  21. // gl_Position = gWVP * PosL;
  22. gl_Position = gWorld * PosL;
  23. // gl_Position = vec4(Position, 0);
  24. // vec4 NormalL = Transform * vec4(Normal, 0.0);
  25. // Normal0 = (gWorld * NormalL).xyz;
  26. // WorldPos0 = (gWorld * PosL).xyz;
  27. }