From 430ad75963a0e6837ef460e78fb99565714b4418 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 9 Aug 2021 17:15:17 -0500 Subject: Some work on double support --- scene/3d/cpu_particles_3d.cpp | 4 ++-- scene/3d/cpu_particles_3d.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'scene/3d') diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index aa6b9686fd..2377c618aa 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -942,7 +942,7 @@ void CPUParticles3D::_particles_process(double p_delta) { tex_hue_variation = curve_parameters[PARAM_HUE_VARIATION]->interpolate(tv); } - real_t hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_TAU * Math::lerp(1.0f, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]); + real_t hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_TAU * Math::lerp(1, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]); real_t hue_rot_c = Math::cos(hue_rot_angle); real_t hue_rot_s = Math::sin(hue_rot_angle); @@ -1097,7 +1097,7 @@ void CPUParticles3D::_update_particle_data_buffer() { ptr[10] = t.basis.elements[2][2]; ptr[11] = t.origin.z; } else { - memset(ptr, 0, sizeof(float) * 12); + memset(ptr, 0, sizeof(Transform3D)); } Color c = r[idx].color; diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h index 6ddb86d574..bb6699ddc7 100644 --- a/scene/3d/cpu_particles_3d.h +++ b/scene/3d/cpu_particles_3d.h @@ -86,7 +86,7 @@ private: struct Particle { Transform3D transform; Color color; - float custom[4] = {}; + real_t custom[4] = {}; Vector3 velocity; bool active = false; real_t angle_rand = 0.0; -- cgit v1.2.3