From acbc341a58587e605eb31633eb05391beb3cc035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 30 Oct 2023 15:06:12 +0100 Subject: [PATCH] OpenGL: Fix uninitialized memory usage for GPUPartciles `interp_to_end` Fixes #84072. --- doc/classes/GPUParticles2D.xml | 2 +- doc/classes/GPUParticles3D.xml | 2 +- drivers/gles3/storage/particles_storage.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index dd731c6c0fb2..08dc6a533177 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -76,7 +76,7 @@ Causes all the particles in this node to interpolate towards the end of their lifetime. - [b]Note[/b]: This only works when used with a [ParticleProcessMaterial]. It needs to be manually implemented for custom process shaders. + [b]Note:[/b] This only works when used with a [ParticleProcessMaterial]. It needs to be manually implemented for custom process shaders. Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate. diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index 398905ea13a6..a982c7e40e58 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -107,7 +107,7 @@ Causes all the particles in this node to interpolate towards the end of their lifetime. - [b]Note[/b]: This only works when used with a [ParticleProcessMaterial]. It needs to be manually implemented for custom process shaders. + [b]Note:[/b] This only works when used with a [ParticleProcessMaterial]. It needs to be manually implemented for custom process shaders. Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate. diff --git a/drivers/gles3/storage/particles_storage.h b/drivers/gles3/storage/particles_storage.h index 8451986a615f..ca347ed070c0 100644 --- a/drivers/gles3/storage/particles_storage.h +++ b/drivers/gles3/storage/particles_storage.h @@ -233,7 +233,7 @@ class ParticlesStorage : public RendererParticlesStorage { Transform3D emission_transform; Vector3 emitter_velocity; - float interp_to_end; + float interp_to_end = 0.0; HashSet collisions;