summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-21 23:38:04 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-21 23:38:04 +0100
commit291add339f0228d58226def25c38ea4fdcea6fb5 (patch)
treef387cacc7ffbf3de35e698da92dcdd6a9092737b
parent510420efdcea7166ab9928782ff8a9c127ff1c15 (diff)
parenteb10c71d6c2d8b593d96d55c41adaf894ea53e50 (diff)
Merge pull request #70422 from clayjohn/RD-trails
Disable particle trails particles when parent parent is not active.
-rw-r--r--servers/rendering/renderer_rd/shaders/particles.glsl5
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/shaders/particles.glsl b/servers/rendering/renderer_rd/shaders/particles.glsl
index 9f6aa7adc0..f787b74dab 100644
--- a/servers/rendering/renderer_rd/shaders/particles.glsl
+++ b/servers/rendering/renderer_rd/shaders/particles.glsl
@@ -304,6 +304,11 @@ void main() {
PARTICLE.flags = PARTICLE_FLAG_ACTIVE | (particles.data[src_idx].flags & (PARTICLE_FRAME_MASK << PARTICLE_FRAME_SHIFT));
return; //- this appears like it should be correct, but it seems not to be.. wonder why.
}
+ if (!bool(particles.data[src_idx].flags & PARTICLE_FLAG_ACTIVE)) {
+ // Disable the entire trail if the parent is no longer active.
+ PARTICLE.flags = 0;
+ return;
+ }
} else {
PARTICLE.flags &= ~PARTICLE_FLAG_STARTED;
}