Closed gabengaGamer closed 3 years ago
How many do you want to spawn?
More? Complex maps require more dynamic lights.
There's a 128 limit to dynamic lights:
they cast no shadows
Turn on the display of shadows through the code and see the limit
They're limited based on the distance to them.
The hard coded shader limit for lights is currently at 128 dynamic lights
No
Okay, so this will be fixed?
They're limited based on the distance to them.
2021-07-25.23-24-22.mp4 The hard coded shader limit for lights is currently at 128 dynamic lights
You can spawn a bunch of lamps next to you and if there are more than 8-10 lamps, then some lamps stop emit light. That is, it does not seem that the problem is in the distance. Here is another video where I fly far enough and only 8-10 pieces emit light at a time. Same thing happens in Half-Life Alyx, but in hla perhaps reason is different https://imgur.com/a/D7X0lCA
What exactly do you need so many dynamic, shadow casting lights for? And why do you absolutely need that many at any given moment? "Complex maps" doesn't answer these.
The only problem I see here so far is they should probably downgrade to shadowless once over the limit instead of doing nothing.
I showed the limit and that's it, situations are different. Let's give an example, there are 10 players on the server, they turned on their flashlights, there are several dynamic sources next to them (6-10), what do we get in the end? limit
IMO that situation isn't an issue if the lights automatically downgrade to shadowless. You'll still get light just no extra shadows. Realistically nobody is going to notice this because you have 10 players with flashlights in a very lit area anyway...
There's always going to be a pretty small limit here because more lights will noticeably decrease performance. It's unavoidable without some very significant engine changes. I don't see this changing any time soon unless you can come up with an actual gamemode which is negatively affected by this limit and cannot work any other way.
Light without shadows will look poor
there should have been no limit, according to Sam
There is a rendering limit. This is for performance reasons, there's always going to be a limit. Whether we can raise it is another question.
The renderer takes the closest dynamic lights and renders those, rather than every light in the map. This is usually fine because lights are normally spread out except for very specific situations.
I don't know if there's a technical reason the limit is 16, that seems like a decent number of lights to me - but maybe it's one of those alyx limits and we can raise it @samzanemesis.
Either way having an unlimited number of lights rendered isn't something we're going to support, at least not on the forward pipeline.
In that case, I don't see any more sense in this report. I hope this will be fixed in the future.
What exactly do you need so many dynamic, shadow casting lights for? And why do you absolutely need that many at any given moment? "Complex maps" doesn't answer these.
Does it really matter what someone wants to use it for? We're not idiots. We all know everything has a limit, and we all know how to optimize and make compromises for the best end result.
Having said that, Garry's Mod is considerably more generous with dynamic and projected light limits. And yes, the more you add the more it degrades performance, we are aware. But that really should be on us to implement appropriately.
The bottom line is this: if someone's hardware supports more graphically intensive operations, then they should be permitted to make the most of it. There is no logical reason not to do it.
But that really should be on us to implement appropriately
Exactly. This should be a simple convar tied to the render limit with a defualt of say 10. But if I want to set it to 1000, I should be able to do that even if it gives me 1 frame per minute.
Yea I wish. Maybe with the point lights but those also were not nearly as good as S&box.
env_projectedtexture
had a limit of 9, versus the S&box equivalent of 16.
Is this the case? IIRC the limit was removed or significantly raised around 2018-2019. I remember because that's when I was able to do this:
Maybe it was scaled back later on, but I know I was able to spawn dozens of projected textures without much of a problem.
Just did this little experiment in Gmod, the limit listed on VDC is with regards to the max number of shadows on projected lights that are renderable, not the projected texture itself.
The amount of actual projected lights seems relatively infinite, as I was able to spawn and render around 350 before my client crashed.
The projected texture itself is what I care the most about, and is what S&box is limiting that I would like addressed in #1035 , as seen below:
Describe the bug
If we spawn more than 15 dynamic light sources, we will get a limit-bug.
To Reproduce
Video demo: https://www.youtube.com/watch?v=AyPtxJ62BBc
Screenshots