header.txt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef HEADER_TXT
  2. #define HEADER_TXT
  3. #ifdef UBO_DISABLED
  4. uniform mat4 ViewMatrix;
  5. uniform mat4 ProjectionMatrix;
  6. uniform mat4 InverseViewMatrix;
  7. uniform mat4 InverseProjectionMatrix;
  8. uniform mat4 ProjectionViewMatrix;
  9. uniform vec2 screen;
  10. uniform vec3 sun_direction;
  11. uniform vec3 sun_col;
  12. uniform float sun_angle;
  13. uniform float blueLmn[9];
  14. uniform float greenLmn[9];
  15. uniform float redLmn[9];
  16. #else
  17. layout (std140) uniform MatrixesData
  18. {
  19. mat4 ViewMatrix;
  20. mat4 ProjectionMatrix;
  21. mat4 InverseViewMatrix;
  22. mat4 InverseProjectionMatrix;
  23. mat4 ProjectionViewMatrix;
  24. mat4 ShadowViewProjMatrixes[4];
  25. vec2 screen;
  26. };
  27. // Expand because of catalyst (14.12) not correctly associating array in UBO
  28. layout (std140) uniform LightingData
  29. {
  30. vec3 sun_direction;
  31. vec3 sun_col;
  32. float sun_angle;
  33. float bL00;
  34. float bL1m1;
  35. float bL10;
  36. float bL11;
  37. float bL2m2;
  38. float bL2m1;
  39. float bL20;
  40. float bL21;
  41. float bL22;
  42. float gL00;
  43. float gL1m1;
  44. float gL10;
  45. float gL11;
  46. float gL2m2;
  47. float gL2m1;
  48. float gL20;
  49. float gL21;
  50. float gL22;
  51. float rL00;
  52. float rL1m1;
  53. float rL10;
  54. float rL11;
  55. float rL2m2;
  56. float rL2m1;
  57. float rL20;
  58. float rL21;
  59. float rL22;
  60. };
  61. #endif
  62. #endif // HEADER_TXT