mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'zesterer/small-fixes' into 'master'
Star fixes See merge request veloren/veloren!762
This commit is contained in:
commit
e45d46ddf7
@ -48,7 +48,7 @@ vec3 light_at(vec3 wpos, vec3 wnorm) {
|
||||
// Multiply the vec3 only once
|
||||
vec3 color = srgb_to_linear(L.light_col.rgb) * (strength * L.light_col.a);
|
||||
|
||||
light += color * (max(0, dot(normalize(difference), wnorm)) + LIGHT_AMBIENCE);
|
||||
light += color * (max(0, dot(normalize(difference), wnorm) + 0.15) + LIGHT_AMBIENCE);
|
||||
}
|
||||
return light;
|
||||
}
|
||||
|
@ -115,8 +115,9 @@ vec3 get_sky_color(vec3 dir, float time_of_day, vec3 origin, vec3 f_pos, float q
|
||||
|
||||
// Add white dots for stars. Note these flicker and jump due to FXAA
|
||||
float star = 0.0;
|
||||
if (with_stars && sun_dir.z > 0.0) {
|
||||
star = is_star_at(dir);
|
||||
if (with_stars) {
|
||||
vec3 star_dir = normalize(sun_dir * dir.z + cross(sun_dir, vec3(0, 1, 0)) * dir.x + vec3(0, 1, 0) * dir.y);
|
||||
star = is_star_at(star_dir);
|
||||
}
|
||||
|
||||
// Sun
|
||||
|
Loading…
Reference in New Issue
Block a user