Shadow recomputations occur regardless of CastShadow property

Background Information

While creating photorealistic scenes in the Roblox engine - I make extensive use of shadowed lights in the Future lighting engine to create beautiful and immersive environments. Unfortunately, these same lights have glaring issues that render them unusable in production.

To my understanding, each shadowed light has its emission area queried for updates (for example, a part moving into its frustum) in every frame on the render thread. When the light itself, or something moves in its emission area moves - it triggers a rebuild of the shadows and any relevant light grid occupancy updates.

Issues with Non-Shadow Casters

When BaseParts with CastShadow OFF move into the emission area of these shadowed lights, whether it’s an animated object or an assembly - I expect the shadows to remain static (aside from the expected light grid occupancy updates)

In reality, this triggers a full rebuild of the shadows for each light the object interacts with, despite no shadows being changed. As a result, CPU activity spikes - especially in scenes with complex geometry and numerous shadow casters. In my case while testing, CPU timings doubled from ~4.5ms to 8ms.

Reproduction Steps and MicroProfiler Sample

This behavior occurs on both Unified (Realistic) and the legacy Future technologies.

  • Create a Light with Shadows set to Enabled (multiple Lights will more accurately demonstrate a realistic scenario)
  • Create a Part with CastShadows OFF
  • Move the Part within the Light’s frustum and observe shadow recalculations occurring, despite no shadows being rendered.

In this sample, I have multiple assemblies, all with CastShadow set to OFF - moving within the radius of multiple shadowed lights. Note that as highlighted, shadow recomputations are occurring, yet no shadows in the scene are being updated.

It’s important to note that these shadow recomputations still occur even for fully invisible assemblies. For example, I have a Beam attached to an invisible part, animated using an AnimationController. There are no visible parts, yet shadows are still recalculated.


Five years ago, an identical bug report was filed - albeit the lighting engine has changed drastically since then. This report was acknowledged but never followed up upon. Therefore, I decided to post this updated report to reiterate the importance of this issue.

The market for realistic Roblox games is growing. Developers should be able to rely on a performant lighting engine to empower their creations in future experiences that push the boundaries of the platform. If this issue is addressed, shadows could finally be baked - improving the performance of all experiences platform-wide.

3 Likes

Thanks for the report! We’ll follow up when we have an update for you.

1 Like