X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=shaderlib%2Fmsp_interface.glsl;h=3fdd606b1b51f70585fc9fd619133b13e63a46b3;hb=8323eb754769cb6db7e02f4226cc9eedc5e614cf;hp=959f9ba55b31742662bbd088c4a11c80df5165fd;hpb=344bb25a8314811f6591111f10777635feb6fd36;p=libs%2Fgl.git diff --git a/shaderlib/msp_interface.glsl b/shaderlib/msp_interface.glsl index 959f9ba5..3fdd606b 100644 --- a/shaderlib/msp_interface.glsl +++ b/shaderlib/msp_interface.glsl @@ -2,6 +2,8 @@ struct LightSourceParameters { vec4 position; vec3 color; + int type; + vec3 attenuation; }; struct ClipPlane @@ -19,14 +21,11 @@ uniform CameraTransform mat4 eye_clip_matrix; }; +layout(constant_id=auto) const int max_lights = 4; uniform Lighting { - // Declared as an array for compatibility reasons - LightSourceParameters light_sources[1]; + LightSourceParameters light_sources[max_lights]; vec4 ambient_color; - vec4 sky_color; - vec3 world_zenith_dir; - float horizon_limit; vec4 fog_color; float fog_density; }; @@ -43,13 +42,10 @@ layout(location=0) in vec4 vertex; layout(location=1) in vec4 color; layout(location=2) in vec3 normal; layout(location=3) in vec3 tangent; -layout(location=4) in vec4 group; +layout(location=4) in ivec4 group; layout(location=5) in vec4 weight; layout(location=6) in vec4 texcoord; layout(location=7) in vec4 texcoord1; layout(location=8) in vec4 texcoord2; layout(location=9) in vec4 texcoord3; layout(location=13) in vec4 instance_transform[3]; - -#pragma MSP stage(fragment) -layout(location=0) out vec4 frag_color;