glow_object.vert 861 B

12345678910111213141516171819202122232425
  1. layout(location = 0) in vec3 Position;
  2. layout(location = 1) in vec3 Normal;
  3. layout(location = 2) in vec4 Color;
  4. layout(location = 3) in vec2 Texcoord;
  5. layout(location = 5) in vec3 Tangent;
  6. layout(location = 6) in vec3 Bitangent;
  7. layout(location = 7) in vec3 Origin;
  8. layout(location = 8) in vec3 Orientation;
  9. layout(location = 9) in vec3 Scale;
  10. layout(location = 12) in vec4 GlowColor;
  11. flat out vec4 glowColor;
  12. mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
  13. mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
  14. void main(void)
  15. {
  16. mat4 ModelMatrix = getWorldMatrix(Origin, Orientation, Scale);
  17. mat4 TransposeInverseModelView = transpose(getInverseWorldMatrix(Origin, Orientation, Scale) * InverseViewMatrix);
  18. gl_Position = ProjectionViewMatrix * ModelMatrix * vec4(Position, 1.);
  19. glowColor = GlowColor;
  20. }