mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Reverted sun diffuse change
This commit is contained in:
parent
c36c78252c
commit
8abfd2e10f
@ -49,8 +49,7 @@ vec3 get_sun_diffuse(vec3 norm, float time_of_day) {
|
||||
max(-sun_dir.z, 0)
|
||||
));
|
||||
|
||||
// Multiply floats together before multiplying with sun_color (1 multiplication vs 3)
|
||||
vec3 diffuse_light = sun_color * (max(dot(-norm, sun_dir), 0.0) * sun_light + SUN_AMBIANCE) + PERSISTENT_AMBIANCE;
|
||||
vec3 diffuse_light = (SUN_AMBIANCE + max(dot(-norm, sun_dir), 0.0) * sun_color) * sun_light + PERSISTENT_AMBIANCE;
|
||||
|
||||
return diffuse_light;
|
||||
}
|
||||
@ -60,7 +59,7 @@ vec3 rand_offs(vec3 pos) {
|
||||
}
|
||||
|
||||
// This has been extracted into a function to allow quick exit when detecting a star.
|
||||
float is_star_at(vec3 dir) {
|
||||
float is_star_at(vec3 dir) {
|
||||
float star_scale = 30.0;
|
||||
|
||||
for (int i = 0; i < 2; i ++) {
|
||||
@ -154,4 +153,4 @@ float fog(vec2 f_pos, vec2 focus_pos) {
|
||||
const float diff_fog = 0.5; // max - min
|
||||
|
||||
return pow(clamp((dist - min_fog) / (diff_fog), 0.0, 1.0), 1.7);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user