Skip to content

Commit

Permalink
Add a particle flag to allow user shaders on the sprites
Browse files Browse the repository at this point in the history
  • Loading branch information
nashmuhandes authored and RicardoLuis0 committed Jan 29, 2025
1 parent 162ab3c commit aae8c12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/playsim/p_effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ enum EParticleFlags
SPF_NOFACECAMERA = 1 << 12,
SPF_ROLLCENTER = 1 << 13,
SPF_STRETCHPIXELS = 1 << 14,
SPF_ALLOWSHADERS = 1 << 15,
};

class DVisualThinker;
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/hwrenderer/scene/hw_sprites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions wadsrc/static/zscript/constants.zs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit aae8c12

Please sign in to comment.