]> git.tdb.fi Git - libs/gl.git/blob - shaderlib/msp_interface.glsl
Set both min and mag filters when exporting textures
[libs/gl.git] / shaderlib / msp_interface.glsl
1 struct LightSourceParameters
2 {
3         vec4 position;
4         vec4 diffuse;
5         vec4 specular;
6 };
7
8 struct MaterialParameters
9 {
10         vec4 ambient;
11         vec4 diffuse;
12         vec4 specular;
13         float shininess;
14 };
15
16 struct ClipPlane
17 {
18         vec4 equation;
19 };
20
21 uniform mat4 eye_obj_matrix;
22 uniform mat3 eye_obj_normal_matrix;
23 uniform Transform
24 {
25         mat4 projection_matrix;
26 };
27
28 uniform Material
29 {
30         MaterialParameters material;
31         float reflectivity;
32 };
33
34 uniform Lighting
35 {
36         // Declared as an array for compatibility reasons
37         LightSourceParameters light_sources[1];
38         vec4 ambient_color;
39         vec4 sky_color;
40         vec3 eye_zenith_dir;
41         float horizon_limit;
42         vec4 fog_color;
43         float fog_density;
44 };
45
46 uniform sampler2D diffuse_map;
47 uniform sampler2D normal_map;
48
49 uniform sampler2DShadow shadow;
50 uniform ShadowMap
51 {
52         float shadow_darkness;
53         mat4 shd_eye_matrix;
54 };
55
56 uniform samplerCube environment;
57 uniform EnvMap
58 {
59         mat3 env_eye_matrix;
60 };
61
62 const int max_clip_planes = 0;
63 uniform Clipping
64 {
65         ClipPlane clip_planes[max_clip_planes];
66 };
67
68 #pragma MSP stage(vertex)
69 layout(location=0) in vec4 vertex;
70 layout(location=8) in vec4 texcoord;
71 layout(location=3) in vec4 color;
72 layout(location=2) in vec3 normal;
73 layout(location=4) in vec3 tangent;
74 layout(location=5) in vec3 binormal;
75
76 #pragma MSP stage(fragment)
77 layout(location=0) out vec4 frag_color;