summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-28 07:17:59 +0100
committerGitHub <noreply@github.com>2022-02-28 07:17:59 +0100
commitbabac6e08cdc290573fa80d3cada471d6d2f8457 (patch)
treebed8aa926f7a1a76685babe9ebc3aebd07541b0c
parent3fab862c590b706aa5c6211415d3854140dbc5d3 (diff)
parent1675c5375ed43c92cc726d59c3475db8de9d9f1b (diff)
Merge pull request #58549 from floppyhammer/fix-particle-trail
Fix particle trail glitch
-rw-r--r--servers/rendering/renderer_rd/shaders/particles_copy.glsl8
1 files changed, 7 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/shaders/particles_copy.glsl b/servers/rendering/renderer_rd/shaders/particles_copy.glsl
index afbd5a9caa..1cd8174e9d 100644
--- a/servers/rendering/renderer_rd/shaders/particles_copy.glsl
+++ b/servers/rendering/renderer_rd/shaders/particles_copy.glsl
@@ -209,7 +209,13 @@ void main() {
txform = transpose(txform);
} else {
- txform = mat4(vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); //zero scale, becomes invisible
+ // Even being inactive, its position still needs to preserved as it might be used by trails.
+ txform = particles.data[particle].xform;
+
+ // Set scale zero to make it invisible.
+ txform[0].xyz = vec3(0);
+
+ txform = transpose(txform);
}
if (params.copy_mode_2d) {