enemy_classes: use sprite_particle for swirls to improve batching

This commit is contained in:
Andrei Alexeyev 2024-10-03 18:47:56 +02:00
parent 08a129d424
commit 8198f55584
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -291,6 +291,8 @@ static void swirl_draw(Enemy *e, EnemyDrawParams p) {
r_draw_sprite(&(SpriteParams) {
.color = RGBA(o*b*b, o*b*b, o*b*b, o),
.sprite_ptr = vp->spr,
.shader_ptr = res_shader("sprite_particle"),
.shader_params = &(ShaderCustomParams) { 1.0f },
.pos.as_cmplx = visual_pos(&p, vp),
.rotation.angle = p.time * 10 * DEG2RAD,
.scale = { vp->scale, vp->scale },