Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

Allow more than 32 dynamic lights #1273

Open Vac95 opened 5 years ago

Vac95 commented 5 years ago

Currently you are only allowed to have 32 Dynamic Lights on a map

https://wiki.garrysmod.com/page/Global/DynamicLight

I was wonder if you would be able to allow people to manually raise this limit themselves.

thegrb93 commented 5 years ago

I imagine it's hardcoded into the shader

Vac95 commented 5 years ago

I might be total wrong but I believe gmod uses SDK 2013, which according to the valve wiki , says only 17 light_dynamic can be used. However it appears gmod somehow upped this number to 32.

bigdogmat commented 5 years ago

Going off this the sdk limit is 32.

neico commented 5 years ago

Well light_dynamic isn't the only one using that facility, there are more, a smoke grenade is actually the only code part actively using that limit directly, all others probably have lower limits to prevent reaching that hard limit at any given time.

Source2013 mod-code usage vs. Source2007 engine usage

there are also ELights which are limited to 64, which is defined here (which is usually being used by muzzleflashs, one can actually use a DLight for those but yeah, limits...)

ExtReMLapin commented 5 years ago

It only uses some parts of SDK 2013 @Metal-Fish

Kefta commented 5 years ago

I think the dlight and elight limits should both be raised to 128 as to match the player count. That way, servers could in essence give every player one light for gun muzzle flashes and gmod_lights. An even better solution would be to refactor the dlight/elight arrays to use vectors so there would be no limit, but I suppose that's a lot more work.

Elight limit should be raised here, and the dlight limit here and here for tools.

WinterPhoenix commented 5 years ago

I agree that the limits should be raised. I currently have an issue where 32 dlights is an incredibly small limit for my use case, and at 32 isn't impacting performance particularly severely.

128 would be a great start, at the very least.

NathanX-S commented 2 years ago

Bumping this. @robotboy655

Roachdaripper commented 1 year ago

bumping this @robotboy655