Texture-based dynamic lighting?
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.
- Major Cooke
- Posts: 8208
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Texture-based dynamic lighting?
Graf, seems like you're working on something new here.
I just wanted to clarify... Is this glowing flats for walls, or is this the ability to add masking shapes to lights?
I just wanted to clarify... Is this glowing flats for walls, or is this the ability to add masking shapes to lights?
Re: Texture-based dynamic lighting?
Probably the ancient lighting system back then that just uses a texture to project the light via multitexturing. It became obsolete when GZDoom went full shaders.
- Major Cooke
- Posts: 8208
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Texture-based dynamic lighting?
Well if it means being able to assign a texture to a light... I can see that being a huge boon for sharper shadows.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Texture-based dynamic lighting?
Don't get excited. All this is about is reinstating the old handling for dynamic lights from before the 2.0 fork. The reason being, that some old ATI cards that can handle GL 3.x have too shitty drivers for the needed features to use the shader version.
To explain, last ween I did some remote-testing on Eruanna's system which had massive problems with GZDoom 2.0. The culprits were two specific features that are broken on that hardware: shader-driven clip planes and uniform buffers. All the lack of the clip planes means is that some rare effects may be a bit glitchy. But the lack of uniform buffers means that currently on that hardware, no dynamic lights are visible. So the old code gets back in and these cards are properly supported again.
And that's really all there is.
To explain, last ween I did some remote-testing on Eruanna's system which had massive problems with GZDoom 2.0. The culprits were two specific features that are broken on that hardware: shader-driven clip planes and uniform buffers. All the lack of the clip planes means is that some rare effects may be a bit glitchy. But the lack of uniform buffers means that currently on that hardware, no dynamic lights are visible. So the old code gets back in and these cards are properly supported again.
And that's really all there is.
- Major Cooke
- Posts: 8208
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Texture-based dynamic lighting?
Awww.
Still, it'd be nice if we could assign a texture to a GL light.
I can imagine plasma strobed textures on walls, floors and ceilings thanks to that. Heh.
...Maybe I'll look into that when you're done. That is, the texture of the light upon a surface (not the light itself, naturally those don't have any).
Still, it'd be nice if we could assign a texture to a GL light.

...Maybe I'll look into that when you're done. That is, the texture of the light upon a surface (not the light itself, naturally those don't have any).
Re: Texture-based dynamic lighting?
If you're going to do anything with lights, you're going to have to do two versions of it, so keep that in mind.
- Major Cooke
- Posts: 8208
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Texture-based dynamic lighting?
Because the 1.x lights are image based, I was thinking of just using that as a basis, insert read capability for the specific sprite/texture/what have you and have it assign that texture as the shape. Probably will have to worry about orientation too. Hmm...
- Caligari87
- Admin
- Posts: 6229
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Texture-based dynamic lighting?
I'm still waiting for that idea Graf floated about bitmask-excluding sectors from dynamic lights
That to me would be a more flexible solution since we already use sectors for "fake" lighting.



Re: Texture-based dynamic lighting?
@Cooke: Honestly that sounds a little more complicated than it should be, right now.
Well, Graf considers the 1.x (soon to be defunct) versions pretty much obsolete right now, and probably would rather not support new features for it, so I'd just go with the shader version and do that first. If you can port it to the texture version later on, more power to you, but if you start anywhere, I'd start where it would gain the most support from the developer (and most of the community), first.
Well, Graf considers the 1.x (soon to be defunct) versions pretty much obsolete right now, and probably would rather not support new features for it, so I'd just go with the shader version and do that first. If you can port it to the texture version later on, more power to you, but if you start anywhere, I'd start where it would gain the most support from the developer (and most of the community), first.
- Major Cooke
- Posts: 8208
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Texture-based dynamic lighting?
Yeah I know. I didn't mean use it entirely, just how it managed to implement textures and all. At this point I'm just speculating about how it can be handled.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Texture-based dynamic lighting?
Don't expect anything here. Texture-based lights are a true hassle, requiring a lot more data to be carried along. That data will be kept in isolated structures that will never get touched on modern hardware. And despite getting back in, I consider all this fallback stuff deprecated, and once I know for sure that it won't be needed anymore, will be removed again.
The thing I am asking myself is, even Eruanna's Radeon 4800 is so horrendously slow that it'll be a chore to play anything on it that requires a bit of real performance. And those old Intel GMA's are even slower than that. From what I know they are barely capable of playing vanilla maps at decent frame rates.
The thing I am asking myself is, even Eruanna's Radeon 4800 is so horrendously slow that it'll be a chore to play anything on it that requires a bit of real performance. And those old Intel GMA's are even slower than that. From what I know they are barely capable of playing vanilla maps at decent frame rates.
- Major Cooke
- Posts: 8208
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Texture-based dynamic lighting?
Oooh. Alright, now I understand. A shame, really.
Re: Texture-based dynamic lighting?
I hardly ever use it myself, I have since gotten much better hardware in a laptop that I use now that achieves much better frame rates (and god forbid, it can actually play Fallout 4).
The Radeon series to which Graf is referring (that is the one that he debugged on my machine last week) is about 5-6 years old now. AMD has actually dropped support for it completely sometime within the last year. When it comes to DirectX, it still performs fairly decently and it has a lot of modern features. But AMD doesn't seem to care much for OpenGL and that card (which, judging strictly by hardware, would support GZDoom 2.0 just fine and with decent framerates even) suffers for it as a result.
Also, multiple people use cards that are exactly the same generation as mine, and they all report the same bugs. I think that's one of the only reasons other than the Intel cards he requested benchmarks of that Graf added back the texture lighting in the first place.
The Radeon series to which Graf is referring (that is the one that he debugged on my machine last week) is about 5-6 years old now. AMD has actually dropped support for it completely sometime within the last year. When it comes to DirectX, it still performs fairly decently and it has a lot of modern features. But AMD doesn't seem to care much for OpenGL and that card (which, judging strictly by hardware, would support GZDoom 2.0 just fine and with decent framerates even) suffers for it as a result.
Also, multiple people use cards that are exactly the same generation as mine, and they all report the same bugs. I think that's one of the only reasons other than the Intel cards he requested benchmarks of that Graf added back the texture lighting in the first place.
Re: Texture-based dynamic lighting?
I'm curious, back then when I was on an ATI 4870 X2, and was not able run shader lights unless I enjoy playing MAP01 at 2 FPS (a $500 card that can't run the latest OpenGL, WTF I know), I noticed that textured dynamic lights looked wrong when combined with coloured fog. I don't exactly remember the details and I would have to go for some serious post digging but I recall the lights looking like additive lights with fog. This was especially noticeable in WADs like Unloved and I couldn't actually play that map back then due to this little issue.
Just wondering if the reinstated fallback renderer will reintroduce these same oddities?
Just wondering if the reinstated fallback renderer will reintroduce these same oddities?
Re: Texture-based dynamic lighting?
Most likely it will. Your ATI isn't much different than mine so it will not have drivers that are any different.
I never had problems playing Unloved, though, it looked the same on my ATI back then that it does now on my NVidia, you must have had some weird CVars set.
I never had problems playing Unloved, though, it looked the same on my ATI back then that it does now on my NVidia, you must have had some weird CVars set.