]> git.tdb.fi Git - libs/gl.git/blob - shaderlib/msp_interface.glsl
Check the flat qualifier from the correct member
[libs/gl.git] / shaderlib / msp_interface.glsl
1 struct LightSourceParameters
2 {
3         vec4 position;
4         vec3 color;
5         int type;
6         vec3 attenuation;
7 };
8
9 layout(push_constant) uniform ObjectTransform
10 {
11         mat4 world_obj_matrix;
12         mat3 world_obj_normal_matrix;
13 };
14 uniform CameraTransform
15 {
16         mat4 eye_world_matrix;
17         mat4 world_eye_matrix;
18         mat4 clip_eye_matrix;
19         mat4 eye_clip_matrix;
20 };
21
22 const int max_lights = 6;
23 uniform Lighting
24 {
25         LightSourceParameters light_sources[max_lights];
26         vec4 ambient_color;
27         vec4 fog_color;
28         float fog_density;
29 };
30
31 #pragma MSP stage(vertex)
32 layout(location=0) in vec4 vertex;
33 layout(location=1) in vec4 color;
34 layout(location=2) in vec3 normal;
35 layout(location=3) in vec3 tangent;
36 layout(location=4) in ivec4 group;
37 layout(location=5) in vec4 weight;
38 layout(location=6) in vec4 texcoord;
39 layout(location=7) in vec4 texcoord1;
40 layout(location=8) in vec4 texcoord2;
41 layout(location=9) in vec4 texcoord3;
42 layout(location=13) in vec4 instance_transform[3];