You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Initialize particles instance buffer in case it is used before being updated
This commit is contained in:
@@ -1288,7 +1288,10 @@ void ParticlesStorage::_particles_update_buffers(Particles *particles) {
|
||||
|
||||
particles->userdata_count = userdata_count;
|
||||
|
||||
particles->particle_instance_buffer = RD::get_singleton()->storage_buffer_create(sizeof(float) * 4 * (xform_size + 1 + 1) * total_amount);
|
||||
PackedByteArray data;
|
||||
data.resize_zeroed(sizeof(float) * 4 * (xform_size + 1 + 1) * total_amount);
|
||||
|
||||
particles->particle_instance_buffer = RD::get_singleton()->storage_buffer_create(sizeof(float) * 4 * (xform_size + 1 + 1) * total_amount, data);
|
||||
//needs to clear it
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user