Dynamic Lights Causing Stuttering

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
Post Reply
User avatar
22alpha22
Posts: 303
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Dynamic Lights Causing Stuttering

Post by 22alpha22 »

I built a new PC back in December of 2017 and haven't really spent much time with Doom since. I recently upgraded from GZDoom 3.0.1 to 3.6.0 and then to 3.7.2 and have been getting bad frame stutters whenever a dynamic light is on screen in both versions. This does not happen in 3.0.1 or prior versions that I've tested. I run GZdoom OpenGL accelerated with V-sync off at 1920 x 1080.

My Rig:

OS: Windows 7 Professional SP1
Motherboard: ASRock AB350 Gaming K4
CPU: AMD Ryzen 1600X
GPU: Nvidia GeForce 1070
RAM: G.Skill Flare X 16GB DDR4 @2400 MHZ

More Info:

Using ShadowPlay to get my FPS, on maps without Dynamic Lights such as vanilla Doom 2 maps, I get 150+ FPS. If I use the included lights.PK3 to add small lights to items and fireballs, FPS drops to 90+. Maps that use pre-placed lights drop FPS to 15-25 depending on size, intensity, and number present on screen. Custom monsters or items that spawn a bunch of lights can crash the FPS to 5 or less even on vanilla maps. None of these issues are present on GZDoom versions from 3.0.1 to 2.4.0 that I've tested. I've haven't tested any versions between 3.0.1 and 3.6.0 so I can't say exactly when this issue was introduced.
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Debian 12/ Manjaro
Graphics Processor: nVidia with Vulkan support
Location: Venezuela

Re: Dynamic Lights Causing Stuttering

Post by TDRR »

Try enabling the "Use shaders for lights" option, which may help a bit. If that doesn't work, disable it and type in the console "gl_lights_additive 1" which makes dynamic lights look a bit muddier but can help a lot on maps with many dynamic lights.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dynamic Lights Causing Stuttering

Post by Graf Zahl »

None of these options exist anymore, they are a relic of old versions. With hardware as good as this one the problem must lie elsewhere.
I suspect something with the graphics driver, what version is this?
User avatar
22alpha22
Posts: 303
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: Dynamic Lights Causing Stuttering

Post by 22alpha22 »

I update my graphic's drivers whenever new versions are available. My current version is 419.67. I first encountered problems when I upgraded from 3.0.1 to 3.6.0 several months ago. I decided to wait a few months for a major new release to see if the problem would be fixed. I had whatever was Nvidia's current driver at the time. Now I recently upgraded to 3.7.2 and since the problem is still present, I figured I must be one of the only ones experiencing it and thus I'm reporting it here. In the meantime I'm rolling back to 3.0.1 which runs flawlessly for the most part.

EDIT:

I thought it must be the hardware in my new rig that was causing the stuttering, so I updated to 3.7.2 on my old rig and did some testing. Dynamic lights also cause noticeable stuttering and FPS drops there as well, though not quite a severe.

Old Rig:

OS: Windows 7 Home Premium SP1
Motherboard: Dell OYJPT1
CPU: Intel Core I7 3770
GPU: Nvidia Geforce 750 Ti
RAM: Crucial 4x4GB DDR3 @1600 MHZ
Last edited by 22alpha22 on Fri Mar 29, 2019 1:38 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dynamic Lights Causing Stuttering

Post by Graf Zahl »

Can you enter 'stat rendertimes' at the console on a map with lots of lights and then make a screenshot with the numbers?
User avatar
22alpha22
Posts: 303
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: Dynamic Lights Causing Stuttering

Post by 22alpha22 »

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dynamic Lights Causing Stuttering

Post by Graf Zahl »

Do other games run at normal speed?
User avatar
22alpha22
Posts: 303
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: Dynamic Lights Causing Stuttering

Post by 22alpha22 »

Yep, most modern games run beautifully at max settings, 1080p, 60+ FPS. Most older titles run well too such the original Deus Ex and Freespace 2 which I've been playing a lot recently.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dynamic Lights Causing Stuttering

Post by Graf Zahl »

Let's do one more test: How many FPS do you get at the starting point of MAP01 of Doom 2, when both vid_vsync and vid_fpslimit are set to 0?
With lights on and off at best.
User avatar
22alpha22
Posts: 303
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: Dynamic Lights Causing Stuttering

Post by 22alpha22 »

Using your criteria, there is only one small dynamic light visible at the start of MAP01 in Doom 2 coming from an armor bonus. With Lights ON I get 139 FPS at best fluctuating down 128 at worst. With Lights OFF I get 160 FPS fluctuating down to 155 at worst.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dynamic Lights Causing Stuttering

Post by Graf Zahl »

That's extremely low. I got a Geforce 1060 and it runs at 900 fps at that spot with lights on. Your card should give the same performance. Do you have any postprocessing on or a scaling set in the video menu? Something in your settings must activate things that cost a lot of processing power.
User avatar
22alpha22
Posts: 303
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: Dynamic Lights Causing Stuttering

Post by 22alpha22 »

Resolution Scale = Scaled (Nearest)

Multisample = 32
Bloom = On
FXAA = Extreme

EDIT:

If I turn off multisample, bloom, and FXAA, FPS goes to 200 and holds regardless of Lights On or Off on MAP01.

After further testing, with multisample, bloom, and FXAA off, heavy dynamic lights scenes only seem to bring the FPS down to about 175 FPS at the lowest. I can't seem to get the FPS to go above 200 regardless to the scene being rendered.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dynamic Lights Causing Stuttering

Post by Graf Zahl »

It was the multisample. 32x pretty much kills all performance. I don't really know why recent versions occasionally set this to such a ridiculous value when loading an old config.

You can only go above 200 if you change vid_maxfps.
User avatar
22alpha22
Posts: 303
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: Dynamic Lights Causing Stuttering

Post by 22alpha22 »

I removed the FPS limit and with Multisample off I get 1000+ FPS, so that was indeed the culprit. After further testing, even with Multisample off, FPS still drops to about 150+ in Dynamic light heavy scenes, which is still very playable. However I spawned several rictuses which generate a bunch of dynamic lights in their attacks and was able to tank the FPS sub 60 and even cause some stuttering. As this is a somewhat extreme case I don't know if it is worth further in investigation.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dynamic Lights Causing Stuttering

Post by Graf Zahl »

Even the fastest graphics card has its limits...
Post Reply

Return to “Technical Issues”