Engine icon indicating copy to clipboard operation
Engine copied to clipboard

Enhancement: Priority keyvalue for realtime shadows

Open JVGRYT opened this issue 2 months ago • 4 comments

What would this enhancement be for?

Rendering

Describe your enhancement suggestion in more detail

Currently, light_rt and light_rt_spot decide the priority of shadowed lights (which ones should be sharper) based on how close the player is when all the lights begin rendering (at least, that's what I think is happening). I think it would be good to have a keyvalue that can be used to make one light take priority over another using a number system.

This would be useful when adding main chamber lights, since they need to have higher resolution shadow maps since they're the most important light in the chamber. When a light that covers a large area is a lower resolution than expected, it can be very noticeable. Having a priority system would fix this issue.

JVGRYT avatar Oct 16 '25 00:10 JVGRYT

How many shadowed lights do you have active at a time? I avoid having more than around five high resolution lights active at a time and I've never had an issue with shadow 'prioritization' like that.

lenship2 avatar Oct 16 '25 01:10 lenship2

How many shadowed lights do you have active at a time? I avoid having more than around five high resolution lights active at a time and I've never had an issue with shadow 'prioritization' like that.

i think maybe 7 or 8 even if fine tuning makes it better, it would still be good to have a priority just to make sure that nothing else can interfere

JVGRYT avatar Oct 16 '25 01:10 JVGRYT

As far as I’m aware there’s no internal priority system. What can happen is that if you have too many high res shadows, you can exhaust the shadow texture and run out of space for more lights. We’ll be adding better logging for issues like this in future updates

ozxybox avatar Oct 16 '25 01:10 ozxybox

There is already better logging for this merged, it might not be in any branch yet though

Smaedd avatar Oct 16 '25 01:10 Smaedd