X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=shaderlib%2Fmsp_interface.glsl;h=d8de5d240b90f6c416cac9a7b7cc37a361debe1c;hb=adc26a2e141a2853b6c5025130c46a46cece4b84;hp=959f9ba55b31742662bbd088c4a11c80df5165fd;hpb=344bb25a8314811f6591111f10777635feb6fd36;p=libs%2Fgl.git diff --git a/shaderlib/msp_interface.glsl b/shaderlib/msp_interface.glsl index 959f9ba5..d8de5d24 100644 --- a/shaderlib/msp_interface.glsl +++ b/shaderlib/msp_interface.glsl @@ -2,6 +2,7 @@ struct LightSourceParameters { vec4 position; vec3 color; + int type; }; struct ClipPlane @@ -19,14 +20,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,7 +41,7 @@ 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;