Commit 81a9dd7f authored by Florian Oetke's avatar Florian Oetke

added sanity check to particle system update

parent 3f7bceb1
Pipeline #3457 passed with stage
in 16 minutes and 17 seconds
......@@ -228,12 +228,15 @@ namespace mirrage::renderer {
auto offset = feedback->offset;
auto count = feedback->count;
feedback++;
emitter->set(&_rev,
*_per_frame_data.at(frame_idx).particles,
emitter->next_uniforms(),
offset,
count,
i);
if(offset + count < _per_frame_data.at(frame_idx).capacity) {
emitter->set(&_rev,
*_per_frame_data.at(frame_idx).particles,
emitter->next_uniforms(),
offset,
count,
i);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment