From c0c60430d6aa5e044a825bf1e17c4d5c166b6e4c Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 6 Oct 2026 22:18:07 +0300 Subject: [PATCH] test --- res/shaders/lib/constants.glsl | 4 ++-- res/shaders/lib/shadows.glsl | 2 +- res/shaders/lib/sky.glsl | 2 +- res/shaders/skybox_gen.glslf | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/res/shaders/lib/constants.glsl b/res/shaders/lib/constants.glsl index a8a9a4bb3..c41686b5e 100644 --- a/res/shaders/lib/constants.glsl +++ b/res/shaders/lib/constants.glsl @@ -8,8 +8,8 @@ #define CURVATURE_FACTOR 0.002 // lighting -#define SKY_LIGHT_MUL 2.5 -#define SKY_LIGHT_TINT (vec3(1.0, 0.75, 0.6) * 2.0) +#define SKY_LIGHT_MUL 4.0 +#define SKY_LIGHT_TINT (vec3(1.0, 0.2, 0.2) * 2.0) // fog #define FOG_POS_SCALE vec3(1.0, 0.2, 1.0) diff --git a/res/shaders/lib/shadows.glsl b/res/shaders/lib/shadows.glsl index c4a10c49c..fb8e7dec5 100644 --- a/res/shaders/lib/shadows.glsl +++ b/res/shaders/lib/shadows.glsl @@ -34,7 +34,7 @@ float calc_shadow( } shadow /= 9.0; - shadow *= max(0.0, -dot(realnormal, u_sunDir)); + shadow *= max(0.0, sqrt(-dot(realnormal, u_sunDir))); return shadow; } diff --git a/res/shaders/lib/sky.glsl b/res/shaders/lib/sky.glsl index cfdbc3f2b..8f88894dd 100644 --- a/res/shaders/lib/sky.glsl +++ b/res/shaders/lib/sky.glsl @@ -4,7 +4,7 @@ #include vec3 pick_sky_color(samplerCube cubemap, float dayTime, vec3 minSkyLight) { - float elevation = sin(dayTime * PI2) * 0.2; + float elevation = -sin(dayTime * PI2) * 0.1; vec3 skyLightColor = texture(cubemap, vec3(0.0f, elevation, -0.4f)).rgb; skyLightColor *= SKY_LIGHT_TINT; skyLightColor = min(vec3(1.0f), skyLightColor * SKY_LIGHT_MUL); diff --git a/res/shaders/skybox_gen.glslf b/res/shaders/skybox_gen.glslf index b6f2b7ffb..1831ef4a7 100644 --- a/res/shaders/skybox_gen.glslf +++ b/res/shaders/skybox_gen.glslf @@ -33,7 +33,7 @@ SOFTWARE. #define ABSORPTION_BETA vec3(2.04e-5, 4.97e-5, 1.95e-6) /* what color gets absorbed by the atmosphere (Due to things like ozone) */ #define G 0.9 /* mie scattering direction, or how big the blob around the sun is */ // and the heights (how far to go up before the scattering has no effect) -#define HEIGHT_RAY 8e3 /* rayleigh height */ +#define HEIGHT_RAY 12e3 /* rayleigh height */ #define HEIGHT_MIE 1.2e3 /* and mie */ #define HEIGHT_ABSORPTION 30e3 /* at what height the absorption is at it's maximum */ #define ABSORPTION_FALLOFF 4e3 /* how much the absorption decreases the further away it gets from the maximum height */