Page 1 of 1

How are dynamic lights blended?

Posted: Wed Aug 30, 2017 4:54 pm
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!

Re: How are dynamic lights blended?

Posted: Fri Sep 01, 2017 4:39 am
by Graf Zahl
Multiplicative for normal lights, additive (huh!) for additive lights. Depends on what you want.

Re: How are dynamic lights blended?

Posted: Mon Sep 04, 2017 12:49 am
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?