diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-08-09 17:15:17 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-08-09 17:43:48 -0500 |
commit | 430ad75963a0e6837ef460e78fb99565714b4418 (patch) | |
tree | d5b98ae003fd64fb76a77def411c6a51d97c48ee /scene/3d | |
parent | c68b109f270a2bf1c42c3f083b53e7bc26dadfd6 (diff) |
Some work on double support
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/cpu_particles_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/cpu_particles_3d.h | 2 |
2 files changed, 3 insertions, 3 deletions
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; |