Slight ambience at night

This commit is contained in:
Joshua Barretto 2022-02-09 22:47:58 +00:00
parent 17d5a9e222
commit e98f9aab63
3 changed files with 3 additions and 3 deletions

View File

@ -692,7 +692,7 @@ vec3 illuminate(float max_light, vec3 view_dir, /*vec3 max_light, */vec3 emitted
vec3 simple_lighting(vec3 pos, vec3 col, float shade) {
// Bad fake lantern so we can see in caves
vec3 d = pos.xyz - focus_pos.xyz;
return col * clamp(2.5 / dot(d, d), shade * get_sun_brightness(), 1);
return col * clamp(2.5 / dot(d, d), shade * (get_sun_brightness() + 0.01), 1);
}
#endif

View File

@ -47,7 +47,7 @@ void main() {
// vec3 view_dir = normalize(-vec3(vert_pos4)/* / vert_pos4.w*/);
#ifdef EXPERIMENTAL_BAREMINIMUM
tgt_color = vec4(lod_col(f_pos.xy) * get_sun_brightness(), 1);
tgt_color = vec4(simple_lighting(f_pos.xyz, lod_col(f_pos.xy), 1.0), 1);
return;
#endif

View File

@ -35,7 +35,7 @@ const float FADE_DIST = 32.0;
void main() {
#ifdef EXPERIMENTAL_BAREMINIMUM
tgt_color = vec4(f_col.rgb, 1);
tgt_color = vec4(simple_lighting(f_pos.xyz, f_col.rgb, 1.0), 1);
return;
#endif