Prioritize Lightning

Hey! I’m trying to find a way to give rendering priority to one of my SpotLights.

I’m using the Future lightning, and some areas in my game have detailed interiors with bright, often complex lighting setups.

I also have a client sided flashlight that follows where the player is looking, giving a nice realistic effect. The problem is when the player enters these highly lit/detailed areas the flashlight starts to lag or “frame drop”, like it’s not being rendered as a priority (because it isn’t).

So basically, I’m looking for a way to make the flashlight always render as the most important light source.

Is there any way to achieve this? If not, this should definitely be a thing.

2 Likes

No, there isn’t a way to achieve this.

1 Like

Sadly there isnt a way to do this, as stated by @awry_y. However, itd be a nice topic for engine feature/studio feature requests.

1 Like

I think they should do with Unified lighting

2 Likes

Alright! Most parts that have the CastShadow enabled don’t even move and are not inteded to ever be moved. I should write a suggestion.

1 Like

The reason that lag happens in those areas is because so many shadows are being drawn at once.

You should use the CastShadow property sparingly, really only when you have to have shadows.
Also it’s a good idea to disable CanTouch on anchored parts, unless it’s needed.

2 Likes

What CanTouch changes? I am unaware if it optimizes the game, but I’d be glad to learn.

1 Like

To sum it all up, when the property is enabled on a part, it makes the server(or client if it exists exclusively there) constantly check for an unanchored part to hit it, causing lag if not required.

2 Likes