mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
Support negative lights.
This commit is contained in:
parent
efce040d48
commit
2d8b011bc8
1 changed files with 8 additions and 4 deletions
|
@ -340,16 +340,20 @@ SingleLightFace (entity_t *light, lightinfo_t *l)
|
|||
|
||||
switch (light->attenuation) {
|
||||
case LIGHT_LINEAR:
|
||||
add = light->light - dist;
|
||||
add = fabs (light->light) - dist;
|
||||
break;
|
||||
case LIGHT_RADIUS:
|
||||
add = light->light * (light->radius - dist) / light->radius;
|
||||
add = fabs (light->light) * (light->radius - dist);
|
||||
add /= light->radius;
|
||||
break;
|
||||
case LIGHT_INVERSE:
|
||||
add = light->light / dist;
|
||||
add = fabs (light->light) / dist;
|
||||
break;
|
||||
case LIGHT_REALISTIC:
|
||||
add = light->light / (dist * dist);
|
||||
add = fabs (light->light) / (dist * dist);
|
||||
break;
|
||||
case LIGHT_NO_ATTEN:
|
||||
add = fabs (light->light);
|
||||
break;
|
||||
case LIGHT_LH:
|
||||
add = 1 / (dist * dist * lightfalloff + LIGHTDISTBIAS);
|
||||
|
|
Loading…
Reference in a new issue