mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added point light ambiance
This commit is contained in:
parent
509fcc8ad2
commit
4eb5b76d5f
@ -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) + 0.15) + LIGHT_AMBIENCE);
|
||||
light += color * (max(0, max(dot(normalize(difference), wnorm), 0.15)) + LIGHT_AMBIENCE);
|
||||
}
|
||||
return light;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user