Limit particle render distance

This commit is contained in:
xtreme8000 2023-11-22 10:57:50 +01:00
parent b6583313b3
commit f42b906596

View file

@ -163,6 +163,9 @@ void particle_generate_side(struct block_info* info, enum side s) {
static void render_single(struct particle* p, vec3 camera, float delta) {
assert(p && camera);
if(glm_vec3_distance2(p->pos, camera) > glm_pow2(32.0F))
return;
vec3 pos_lerp;
glm_vec3_lerp(p->pos_old, p->pos, delta, pos_lerp);