2014-12-18 18:54:40 +01:00
|
|
|
#ifndef HEADER_TXT
|
|
|
|
#define HEADER_TXT
|
2014-08-02 00:50:56 +02:00
|
|
|
#ifdef UBO_DISABLED
|
|
|
|
uniform mat4 ViewMatrix;
|
|
|
|
uniform mat4 ProjectionMatrix;
|
|
|
|
uniform mat4 InverseViewMatrix;
|
|
|
|
uniform mat4 InverseProjectionMatrix;
|
2014-09-05 23:41:12 +02:00
|
|
|
uniform mat4 ProjectionViewMatrix;
|
2014-08-02 01:02:06 +02:00
|
|
|
uniform vec2 screen;
|
2014-12-15 00:18:03 +01:00
|
|
|
|
2014-12-15 23:09:19 +01:00
|
|
|
uniform vec3 sun_direction;
|
|
|
|
uniform vec3 sun_col;
|
|
|
|
uniform float sun_angle;
|
2014-12-15 00:18:03 +01:00
|
|
|
uniform float blueLmn[9];
|
|
|
|
uniform float greenLmn[9];
|
|
|
|
uniform float redLmn[9];
|
2014-12-15 23:09:19 +01:00
|
|
|
|
2014-08-02 00:50:56 +02:00
|
|
|
#else
|
2017-12-25 14:00:10 +08:00
|
|
|
|
|
|
|
layout (std140) uniform Matrices
|
2014-08-02 00:50:56 +02:00
|
|
|
{
|
2017-12-25 14:00:10 +08:00
|
|
|
mat4 u_view_matrix;
|
|
|
|
mat4 u_projection_matrix;
|
|
|
|
mat4 u_inverse_view_matrix;
|
|
|
|
mat4 u_inverse_projection_matrix;
|
|
|
|
mat4 u_projection_view_matrix;
|
|
|
|
mat4 u_shadow_projection_view_matrices[4];
|
|
|
|
vec2 u_screen;
|
2014-08-02 00:50:56 +02:00
|
|
|
};
|
2014-12-15 00:18:03 +01:00
|
|
|
|
|
|
|
// Expand because of catalyst (14.12) not correctly associating array in UBO
|
|
|
|
layout (std140) uniform LightingData
|
|
|
|
{
|
2014-12-15 23:09:19 +01:00
|
|
|
vec3 sun_direction;
|
|
|
|
vec3 sun_col;
|
|
|
|
float sun_angle;
|
2014-12-15 00:18:03 +01:00
|
|
|
float bL00;
|
|
|
|
float bL1m1;
|
|
|
|
float bL10;
|
|
|
|
float bL11;
|
|
|
|
float bL2m2;
|
|
|
|
float bL2m1;
|
|
|
|
float bL20;
|
|
|
|
float bL21;
|
|
|
|
float bL22;
|
|
|
|
|
|
|
|
float gL00;
|
|
|
|
float gL1m1;
|
|
|
|
float gL10;
|
|
|
|
float gL11;
|
|
|
|
float gL2m2;
|
|
|
|
float gL2m1;
|
|
|
|
float gL20;
|
|
|
|
float gL21;
|
|
|
|
float gL22;
|
|
|
|
|
|
|
|
float rL00;
|
|
|
|
float rL1m1;
|
|
|
|
float rL10;
|
|
|
|
float rL11;
|
|
|
|
float rL2m2;
|
|
|
|
float rL2m1;
|
|
|
|
float rL20;
|
|
|
|
float rL21;
|
|
|
|
float rL22;
|
|
|
|
};
|
2016-12-07 02:15:11 +08:00
|
|
|
|
2017-12-25 14:00:10 +08:00
|
|
|
layout (std140) uniform SPFogData
|
|
|
|
{
|
|
|
|
// x: fog_start, y: fog_end, z: fog_max, w: fog_density
|
|
|
|
vec4 u_fog_data;
|
|
|
|
vec4 u_fog_color;
|
|
|
|
};
|
|
|
|
|
2014-12-18 18:54:40 +01:00
|
|
|
#endif
|
|
|
|
#endif // HEADER_TXT
|