How are dynamic lights blended?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
Drake Raider
Posts: 474
Joined: Fri Jul 18, 2008 12:27 pm

How are dynamic lights blended?

Post by Drake Raider »

Exactly that. How does Gzdoom blend the lighting in to the surrounding image? via Additive shading? Multiplicitive? Am I completely misunderstanding how the engine works? Is this in the wrong topic? I have so many questions!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49225
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: How are dynamic lights blended?

Post by Graf Zahl »

Multiplicative for normal lights, additive (huh!) for additive lights. Depends on what you want.
Drake Raider
Posts: 474
Joined: Fri Jul 18, 2008 12:27 pm

Re: How are dynamic lights blended?

Post by Drake Raider »

Reason I was asking was I was thinking about poking around in the code, which I don't know how to use, and switching the for a softglow formula. So (ab)/255 switched out for

(((255-a)b+(255-(((255-b)(255-a))/255))/255)a

I copied it from the gimp website. Dunno if its a good idea. I wanna try myself, but is there any specific reason you haven't done it yet? Or mostly just performance?
Locked

Return to “Editing (Archive)”