From b769485d9ac3fce46c98b6e438ac5c540b58c202 Mon Sep 17 00:00:00 2001 From: zico Date: Thu, 18 Apr 2013 12:08:53 +0200 Subject: [PATCH] Due to additive blending, transparent sprites will become invivible in font of white surfaces (lamps). Fix that with a little desaturation --- CHANGELOG.txt | 1 + main/render.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cc12604ee..eccf5aca1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20130418 -------- main/lighting.c, main/render.c: Removed light_frame_count due to being unnecessary since lighting is now time-based and messed up deletion of dynamic light +main/render.c: Due to additive blending, transparent sprites will become invivible in font of white surfaces (lamps). Fix that with a little desaturation 20130408 -------- diff --git a/main/render.c b/main/render.c index 91c147915..f37b56a9c 100644 --- a/main/render.c +++ b/main/render.c @@ -269,6 +269,12 @@ void render_face(int segnum, int sidenum, int nv, int *vp, int tmap1, int tmap2, dyn_light[i].g = MAX_LIGHT; if (dyn_light[i].b > MAX_LIGHT) dyn_light[i].b = MAX_LIGHT; + if (PlayerCfg.AlphaEffects) // due to additive blending, transparent sprites will become invivible in font of white surfaces (lamps). Fix that with a little desaturation + { + dyn_light[i].r *= .93; + dyn_light[i].g *= .93; + dyn_light[i].b *= .93; + } }