mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
feat: color temperature compensation
This commit is contained in:
parent
771c72324c
commit
2b8d97a2ca
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue