improve u_gamma support & update default dense-render-distance value

This commit is contained in:
MihailRis
2025-07-25 21:21:18 +03:00
parent 6d88b7c3d1
commit 705e398bc3
4 changed files with 5 additions and 2 deletions
+1
View File
@@ -18,6 +18,7 @@ uniform mat4 u_view;
uniform mat4 u_inverseView;
uniform vec3 u_sunDir;
uniform vec3 u_cameraPos;
uniform float u_gamma;
#include <__effect__>
@@ -29,6 +29,8 @@ vec4 effect() {
light = max(light, emission);
light = pow(light, u_gamma);
vec3 fogColor = texture(u_skybox, dir).rgb;
float fog = calc_fog(length(u_view * vec4((modelpos.xyz - u_cameraPos) * FOG_POS_SCALE, 0.0)) / 256.0);
return vec4(mix(texture(u_screen, v_uv).rgb * mix(1.0, light, 1.0), fogColor, fog), 1.0);
+1 -1
View File
@@ -35,7 +35,7 @@ float calc_shadow(
}
shadow /= 9.0;
} else {
shadow = 0.5;
shadow = 0.0;
}
return shadow;
}