Speaking of clamps on brightness, randy, is there any chance of ZDoom adding back support for light levels outside the 0-255 range? In vanilla and most other ports, you can use a light level like, say, 5000, combined with the Light Glow sector special, to cause the sector to remain fullbright for several seconds before it begins visibly fading back down. In ZDoom, it immediately fades back down as soon as it reaches fullbright (as though it were somehow internally clamping light levels to a 0-255 range when loading the map), so the timing control is lost.randy wrote:Here is the discussion the last time this came up, mixed in with discussion of COLORMAPS: http://forum.zdoom.org/viewtopic.php?f= ... 0&start=10
What I wrote then still stands: It's not a simple one-line fix, and since the conditions where it's most noticeable are limited, it doesn't seem worth the effort.
Also, might I also mention that in standard Doom, floors and ceilings are allowed to get much brighter as they get closer to you than are walls? You can't really see in it Doom, since you can't pan the view up or down. It might be possible to construct a 0-brightness map in Heretic and Hexen and see it there, though I haven't tried. This is a consequence of Doom precalculating 16 tables for lighting (hence the reason it has only 16 real light levels) but accessing them differently for walls vs floors.
Which also raises the question: Is the clamp on maximum brightness of walls in Doom a conscious design decision, or was it simply a consequence of their lookup tables? Was it even considered in any way at all? What ZDoom does is basically identical to Doom but without the lookup tables.
You can see things up close in the dark
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- esselfortium
- Posts: 3862
- Joined: Tue Sep 19, 2006 8:43 pm
- Contact:
Re: You can see things up close in the dark
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: You can see things up close in the dark
Holy cow, I thought that was an 8-bit value in vanilla map format.esselfortium wrote:In vanilla and most other ports, you can use a light level like, say, 5000

Re: You can see things up close in the dark
You can do that? I turned it into a byte because I trusted the unofficial editing docs that said it only used values 0-255 without actually confirming the reality of that claim. Oops.
- esselfortium
- Posts: 3862
- Joined: Tue Sep 19, 2006 8:43 pm
- Contact:
Re: You can see things up close in the dark
Yeah, I believe it goes from -32768 to 32767.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: You can see things up close in the dark
randy wrote:I turned it into a byte...
I have to say that this kind of 'efficiency' has been the cause of far too many problems already. All variables should be ints if you ask me.
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: You can see things up close in the dark
Even better int32_t ?
/me hides
/me hides
Re: You can see things up close in the dark
Hey, back when this project started, conserving memory still meant something.Graf Zahl wrote:All variables should be ints if you ask me.
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: You can see things up close in the dark
I see the thread's been given a "Fixed" tag, does that mean it now behaves just like vanilla?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: You can see things up close in the dark
No, for that the number of light levels had to be reduced. But it handles the 'too bright' case explicitly now.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: You can see things up close in the dark
Edward-san wrote:Even better int32_t ?
/me hides
That'd be an SDWORD in ZDoom terms. And if you ask me, yes, these variable type names do bother me and I'd happily replace them with their C99 equivalents if this was my project alone.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: You can see things up close in the dark
Optionally I hope.Graf Zahl wrote:No, for that the number of light levels had to be reduced.

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: You can see things up close in the dark
The number of light levels was not reduced. Just the 'too bright' case was explicitly handled.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: You can see things up close in the dark
Ah, okay.Graf Zahl wrote:The number of light levels was not reduced. Just the 'too bright' case was explicitly handled.