How are dynamic lights blended?
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.
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.
-
- Posts: 474
- Joined: Fri Jul 18, 2008 12:27 pm
How are dynamic lights blended?
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!
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: How are dynamic lights blended?
Multiplicative for normal lights, additive (huh!) for additive lights. Depends on what you want.
-
- Posts: 474
- Joined: Fri Jul 18, 2008 12:27 pm
Re: How are dynamic lights blended?
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?
(((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?