浏览代码

OpenGL: Fix uninitialized memory usage for GPUPartciles `interp_to_end`

Fixes #84072.
Rémi Verschelde 1 年之前
父节点
当前提交
acbc341a58
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      doc/classes/GPUParticles2D.xml
  2. 1 1
      doc/classes/GPUParticles3D.xml
  3. 1 1
      drivers/gles3/storage/particles_storage.h

+ 1 - 1
doc/classes/GPUParticles2D.xml

@@ -76,7 +76,7 @@
 		</member>
 		</member>
 		<member name="interp_to_end" type="float" setter="set_interp_to_end" getter="get_interp_to_end" default="0.0">
 		<member name="interp_to_end" type="float" setter="set_interp_to_end" getter="get_interp_to_end" default="0.0">
 			Causes all the particles in this node to interpolate towards the end of their lifetime.
 			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.
 		</member>
 		</member>
 		<member name="interpolate" type="bool" setter="set_interpolate" getter="get_interpolate" default="true">
 		<member name="interpolate" type="bool" setter="set_interpolate" getter="get_interpolate" default="true">
 			Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate.
 			Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate.

+ 1 - 1
doc/classes/GPUParticles3D.xml

@@ -107,7 +107,7 @@
 		</member>
 		</member>
 		<member name="interp_to_end" type="float" setter="set_interp_to_end" getter="get_interp_to_end" default="0.0">
 		<member name="interp_to_end" type="float" setter="set_interp_to_end" getter="get_interp_to_end" default="0.0">
 			Causes all the particles in this node to interpolate towards the end of their lifetime.
 			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.
 		</member>
 		</member>
 		<member name="interpolate" type="bool" setter="set_interpolate" getter="get_interpolate" default="true">
 		<member name="interpolate" type="bool" setter="set_interpolate" getter="get_interpolate" default="true">
 			Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate.
 			Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate.

+ 1 - 1
drivers/gles3/storage/particles_storage.h

@@ -233,7 +233,7 @@ private:
 
 
 		Transform3D emission_transform;
 		Transform3D emission_transform;
 		Vector3 emitter_velocity;
 		Vector3 emitter_velocity;
-		float interp_to_end;
+		float interp_to_end = 0.0;
 
 
 		HashSet<RID> collisions;
 		HashSet<RID> collisions;