Nicer point lights

This commit is contained in:
Joshua Barretto 2020-03-17 13:29:42 +00:00
parent b9639f2454
commit 3559252a5e

View File

@ -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) {