Scet Posted May 26, 2007 Hi, I'm wondering if anyone knows the equation/system to the software light system? Does it just "fade-off" faster for low lit sectors, so that bright sectors don't fade-off at all? I have basic sector lighting implemented with the colormap, but it's just not Doom without the fading. 0 Quote Share this post Link to post
andrewj Posted May 27, 2007 The equation is roughly this: final_level = (sector_level-128)*2 + 255*80/dist Doom creates two tables to do it, one for walls/floors and another one for sprites, and they work somewhat differently. Using the above equation directly doesn't quite match the original EXE, due to the precision of the tables and how they are setup for close distances. 0 Quote Share this post Link to post
Scet Posted May 27, 2007 Thanks, but what exactly is the range of final_level? I'm assuming it's 0-255 with 0 being dark and 255 being light. Also is it (255*80)/dist or 255*(80/dist)? 0 Quote Share this post Link to post
andrewj Posted May 28, 2007 Yes the ranges here are 0-255. And use (255*80)/dist. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.