Lighting changes, was Re: [crossfire] Circular lighting & negetive glow_radiuses

Alex Schultz alex_sch at telus.net
Tue Apr 12 23:27:51 CDT 2005


Mark Wedel wrote:

>
     
      IF you do a lookup table, there really isn't much need for a formula 
     
     >
     
      then (light is offset by 2,4, so its brigthness is X).
     
     >
     
     
     >
     
       Certainly, doing the first pass without a lookup table is easier.  
     
     >
     
      However, if you plan to do a lookup table, may be less effort in the 
     
     >
     
      long term to do that now so you don't really need a formula. 
     
     
Ok... hmmm... I just did some calculations and the conversion (when 
build right into the formula) effectively neutralizes the inverse square 
law portion of the formula such that I'm just left with the pythagorean 
theorm (instead of the max dist in either the x or y axis) and the fixes 
for negative glow_radiuses and the the old code. The Pythagorean theorem 
itself is so simple that I don't think that the overhead will make it 
worth making a lookup table. I'll make a diff for this ASAP.

Note however that this assumes no additive lighting again and will have 
to have the inverse square law code added back in when additive lighting 
is implemented (which is waiting for a greater number of lighting levels 
currently).

Hopefully there isn't any problems with the upcoming diff getting into CVS.

       --Alex Schultz (aka Rednaxela)

    
    


More information about the crossfire mailing list