mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Nicer point lights
This commit is contained in:
parent
b9639f2454
commit
3559252a5e
@ -25,7 +25,7 @@ vec3 illuminate(vec3 color, vec3 light, vec3 diffuse, vec3 ambience) {
|
||||
}
|
||||
|
||||
float attenuation_strength(vec3 rpos) {
|
||||
return 1.0 / (rpos.x * rpos.x + rpos.y * rpos.y + rpos.z * rpos.z);
|
||||
return 1.0 / pow(rpos.x * rpos.x + rpos.y * rpos.y + rpos.z * rpos.z, 0.6);
|
||||
}
|
||||
|
||||
vec3 light_at(vec3 wpos, vec3 wnorm) {
|
||||
|
Loading…
Reference in New Issue
Block a user