zm-reborn / zmr-game

Zombie Master, an RTS/FPS game on the Source 2013 engine.
https://zombiemaster.dev
Other
39 stars 12 forks source link

Replace ZM vision dynamic light with projected texture #332

Open L1pE opened 3 years ago

L1pE commented 3 years ago

ZM vision has historically been a performance killer because of its massive light_dynamic, after some tests I suggest replacing it with a projected texture like the survivors' flashlight.

I've tested a red env_projectedtexture parented to the ZM, wide enough to cover the entire FOV, reached far enough to have similar range to current ZM vision and with shadows off. It had similar performance impact to the survivors' flashlight (AKA runs much better), provided better visibility as the ZM vision light_dynamic tends to be blinding near bright surfaces and also looked better IMO.

On that note, I've also found that, despite what I've read about projected textures being the most expensive light, in my tests even small light_dynamics, if they are set to affect lightmapped brushes, will run much worse than an equivalent env_projectedtexture. Although when the light_dynamic only affects models it's p. much free even if the model has a high polygon density.

TotallyMehis commented 3 years ago

I have meant to replace the light with a projected texture, but never got around doing it. Thanks for the reminder.

dch-GH commented 2 years ago

Shouldn't this now be closed, marked as fixed?

TotallyMehis commented 2 years ago

Actually nvm, this hasn't been tested yet.