Rendering: Skip shadow rendering for inactive particles - #118449
Merged
Repiteo merged 1 commit intoJun 18, 2026
Conversation
blueskythlikesclouds
requested changes
Apr 22, 2026
blueskythlikesclouds
left a comment
Member
There was a problem hiding this comment.
The same checks should also be added for cubemap omni light shadows and area shadows. You'll need to rebase on master for the latter.
Mingxi-Z
force-pushed
the
fix/cull-inactive-particles-shadow
branch
from
April 24, 2026 11:40
c93a0b3 to
d55b20c
Compare
Calinou
approved these changes
Apr 27, 2026
Calinou
left a comment
Member
There was a problem hiding this comment.
Tested locally, it works as expected. Code looks good to me.
Benchmark
MRP of #116682 with 100,000 particles:
| Before | After |
|---|---|
| 707 FPS | 4135 FPS |
PC specifications
- CPU: AMD Ryzen 9 9950X3D
- GPU: NVIDIA GeForce RTX 5090
- RAM: 64 GB (2×32 GB DDR5-6000 CL30)
- SSD: Solidigm P44 Pro 2 TB
- OS: Linux (Fedora 43)
Contributor
|
Thanks! |
BendyLand
pushed a commit
to BendyLand/voltaire
that referenced
this pull request
Aug 2, 2026
…-particles-shadow Rendering: Skip shadow rendering for inactive particles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR optimizes shadow rendering by skipping inactive particle systems during the culling phase in RendererSceneCull.
Currently, even if a particle system is inactive (not emitting and no particles remaining), it is still added to the shadow instance lists. This results in redundant drawIndexedPrimitives calls with the full particle amount as the instanceCount.
Fixes #116682
As shown in the attached GPU frame captures, the redundant draw call for inactive particles is eliminated (using MRP from #116682).
Before Fix, a shadow draw call is issued for the inactive particle system with instanceCount: 200

After Fix, the redundant draw call is skipped.
