Add a particle flag to allow user shaders on the sprites

This commit is contained in:
nashmuhandes 2025-01-28 08:49:41 +08:00 committed by Ricardo Luís Vaz Silva
parent 162ab3c4ec
commit aae8c12cdf
3 changed files with 3 additions and 1 deletions

View file

@ -70,6 +70,7 @@ enum EParticleFlags
SPF_NOFACECAMERA = 1 << 12,
SPF_ROLLCENTER = 1 << 13,
SPF_STRETCHPIXELS = 1 << 14,
SPF_ALLOWSHADERS = 1 << 15,
};
class DVisualThinker;

View file

@ -1416,7 +1416,7 @@ void HWSprite::ProcessParticle(HWDrawInfo *di, particle_t *particle, sector_t *s
foglevel = (uint8_t)clamp<short>(sector->lightlevel, 0, 255);
trans = particle->alpha;
OverrideShader = 0;
OverrideShader = (particle->flags & SPF_ALLOWSHADERS) ? -1 : 0;
modelframe = nullptr;
texture = nullptr;
topclip = LARGE_VALUE;

View file

@ -723,6 +723,7 @@ enum EParticleFlags
SPF_NOFACECAMERA = 1 << 12,
SPF_ROLLCENTER = 1 << 13,
SPF_STRETCHPIXELS = 1 << 14,
SPF_ALLOWSHADERS = 1 << 15,
SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG
};