#if ! defined INCLUDE_COLORED_LIGHTS_GLSL_EECD
#define INCLUDE_COLORED_LIGHTS_GLSL_EECD

// === Gamma-corrected Color Lighting ===

float getImportance(vec3 rgb) {
    return max(max(rgb.r, rgb.g), rgb.b);
}

vec3 encodeImportance(vec3 rgb, float importance) {
    return pow(rgb * importance, vec3(0.8));
}

float decodeImportance(vec3 rgb) {
    return pow(max(max(rgb.r, rgb.g), rgb.b), 1.25);
}

vec3 oklab2rgb(vec3 c) {
    c = pow(clamp(c, 0.0, 1.0), vec3(1.0 / 2.2)); // gamma
    return c;
}
vec3 rgb2oklab(vec3 c) {
    c = pow(clamp(c, 0.0, 1.0), vec3(2.2));
    return c;
}

// --- Optional blur helper (disabled) ---
vec4 gauss3x3full(sampler2D tex, vec2 uv, vec2 px) {
    return texture2D(tex, uv);
}

// --- Uniforms ---
#if ! defined INCLUDE_UNIFORM_sampler2D_colortex4
#define INCLUDE_UNIFORM_sampler2D_colortex4
uniform sampler2D colortex4;
#endif

#if ! defined INCLUDE_UNIFORM_sampler2D_colortex5
#define INCLUDE_UNIFORM_sampler2D_colortex5
uniform sampler2D colortex5;
#endif

#if ! defined INCLUDE_UNIFORM_sampler2D_colortex6
#define INCLUDE_UNIFORM_sampler2D_colortex6
uniform sampler2D colortex6;
#endif

#if ! defined INCLUDE_UNIFORM_float_lightmapSize
#define INCLUDE_UNIFORM_float_lightmapSize
uniform float lightmapSize;
#endif

#endif
