feat: color temperature compensation

This commit is contained in:
MihailRis 2026-09-27 23:21:45 +03:00
parent 771c72324c
commit 2b8d97a2ca

View file

@ -3,6 +3,7 @@
#define CLOUDS_FOG_FACTOR_MUL 0.3f #define CLOUDS_FOG_FACTOR_MUL 0.3f
#define CLOUDS_FOG_CURVE_MUL 0.4f #define CLOUDS_FOG_CURVE_MUL 0.4f
#define COLOR_TEMPERATURE_COMPENSATION 1.12f
vec4 effect() { vec4 effect() {
vec4 pos = texture(u_position, v_uv); vec4 pos = texture(u_position, v_uv);
@ -30,7 +31,7 @@ vec4 effect() {
#ifdef ENABLE_SHADOWS #ifdef ENABLE_SHADOWS
float shadow_mul = calc_shadow(modelpos, normal, length(pos)); float shadow_mul = calc_shadow(modelpos, normal, length(pos));
light *= shadow_mul; light *= shadow_mul;
rg *= min(1.0, shadow_mul + emission); rg *= min(1.0, shadow_mul + emission) + COLOR_TEMPERATURE_COMPENSATION;
light *= 2.0; light *= 2.0;
#endif #endif