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.

How are dynamic lights blended?

Postby Drake Raider » Wed Aug 30, 2017 4:54 pm

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
Drake Raider
I seem to keep alot of my work to myself....
 
Joined: 18 Jul 2008
Location: Plane of thought.

Re: How are dynamic lights blended?

Postby Graf Zahl » Fri Sep 01, 2017 4:39 am

Multiplicative for normal lights, additive (huh!) for additive lights. Depends on what you want.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: How are dynamic lights blended?

Postby Drake Raider » Mon Sep 04, 2017 12:49 am

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?
User avatar
Drake Raider
I seem to keep alot of my work to myself....
 
Joined: 18 Jul 2008
Location: Plane of thought.


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 2 guests