Using steve_flashlight_2018.02.12.pk7 mod, but I think it would work with any mod that uses same kind of directional light.
Massive slowdown down to single digits (and below 1 fps even) happens during movement, but does not happen when stationary.
Happens on some big maps, regardless of the actual scene complexity (can happen in a simple corridor)
Happens even without shadowmaps (that i initially thought to be culprit)
Video demonstration:
Moving directional light (flashligt) causes massive slowdown
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Moving directional light (flashligt) causes massive slow
Please post a link to the mod and at least one map that is suffering from this type of slowdown.
Re: Moving directional light (flashligt) causes massive slow
Mod with flashlight: viewtopic.php?f=43&t=59429&hilit=Steve+flashlight
Map is Eviternity Map32, exact map spot shown, there is a curved wall corridor nearby, but it happens in other not so complex places too. https://www.doomworld.com/forum/topic/1 ... viternity/
Map is Eviternity Map32, exact map spot shown, there is a curved wall corridor nearby, but it happens in other not so complex places too. https://www.doomworld.com/forum/topic/1 ... viternity/
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Moving directional light (flashligt) causes massive slow
Closing as this is a fairly common "problem" which generally results from a misunderstanding of how dynamic lights work and I've gotten similar complaints many times on DarkDoomZ.
The summary is that every linedef in the light's radius needs to be relinked linked every time the light changes position (which accounts for the OP behavior of high framerates while standing still but lag when moving). This includes spotlights, which have this radius even if the "cone" of illumination is visually smaller, and since people expect flashlights to "throw" farther than point lights, the radius (or intensity) typically gets set way too high, causing people to blame "spotlights" for poor performance. Based on the light cone in the OP video, I suspect the radius / intensity on this light is set extremely high, which will definitely cause performance issues on all but the smallest maps.
Steve's Flashlight is a prime candidate for this because the intensity can easily be customized by the player to any desired value, without any warning of the performance considerations. Most people will simply set it as bright as they expect a flashlight to be, not realizing the implications.
With this understanding, I've not noticed any unusual performance issues with spotlights or dynamic lights in the last three years. If anything, dynlight performance has improved with the subsector linking feature that was added in that timeframe.
The summary is that every linedef in the light's radius needs to be relinked linked every time the light changes position (which accounts for the OP behavior of high framerates while standing still but lag when moving). This includes spotlights, which have this radius even if the "cone" of illumination is visually smaller, and since people expect flashlights to "throw" farther than point lights, the radius (or intensity) typically gets set way too high, causing people to blame "spotlights" for poor performance. Based on the light cone in the OP video, I suspect the radius / intensity on this light is set extremely high, which will definitely cause performance issues on all but the smallest maps.
Steve's Flashlight is a prime candidate for this because the intensity can easily be customized by the player to any desired value, without any warning of the performance considerations. Most people will simply set it as bright as they expect a flashlight to be, not realizing the implications.
With this understanding, I've not noticed any unusual performance issues with spotlights or dynamic lights in the last three years. If anything, dynlight performance has improved with the subsector linking feature that was added in that timeframe.