stk-code_catmod/data/shaders/header.txt

68 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-12-18 12:54:40 -05:00
#ifndef HEADER_TXT
#define HEADER_TXT
#ifdef UBO_DISABLED
uniform mat4 ViewMatrix;
uniform mat4 ProjectionMatrix;
uniform mat4 InverseViewMatrix;
uniform mat4 InverseProjectionMatrix;
uniform mat4 ProjectionViewMatrix;
uniform vec2 screen;
2014-12-14 18:18:03 -05:00
2014-12-15 17:09:19 -05:00
uniform vec3 sun_direction;
uniform vec3 sun_col;
uniform float sun_angle;
2014-12-14 18:18:03 -05:00
uniform float blueLmn[9];
uniform float greenLmn[9];
uniform float redLmn[9];
2014-12-15 17:09:19 -05:00
#else
layout (std140) uniform MatrixesData
{
mat4 ViewMatrix;
mat4 ProjectionMatrix;
mat4 InverseViewMatrix;
mat4 InverseProjectionMatrix;
mat4 ProjectionViewMatrix;
mat4 ShadowViewProjMatrixes[4];
vec2 screen;
};
2014-12-14 18:18:03 -05:00
// Expand because of catalyst (14.12) not correctly associating array in UBO
layout (std140) uniform LightingData
{
2014-12-15 17:09:19 -05:00
vec3 sun_direction;
vec3 sun_col;
float sun_angle;
2014-12-14 18:18:03 -05: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;
};
2014-12-18 12:54:40 -05:00
#endif
#endif // HEADER_TXT