mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add particle blend mode "clip" (#15444)
This lets modders avoid alpha blending rendering bugs as well as potential (future) performance issues. The appropriate blend modes are also used for node dig particles. --------- Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
f493e73aeb
commit
138052adfc
11 changed files with 93 additions and 33 deletions
|
@ -77,6 +77,9 @@ public:
|
|||
|
||||
const ClientParticleTexRef &getTextureRef() const { return m_texture; }
|
||||
|
||||
ParticleParamTypes::BlendMode getBlendMode() const
|
||||
{ return m_texture.tex ? m_texture.tex->blendmode : m_p.texture.blendmode; }
|
||||
|
||||
ParticleBuffer *getBuffer() const { return m_buffer; }
|
||||
bool attachToBuffer(ParticleBuffer *buffer);
|
||||
|
||||
|
@ -231,7 +234,7 @@ protected:
|
|||
ParticleParameters &p, video::ITexture **texture, v2f &texpos,
|
||||
v2f &texsize, video::SColor *color, u8 tilenum = 0);
|
||||
|
||||
static video::SMaterial getMaterialForParticle(const ClientParticleTexRef &texture);
|
||||
static video::SMaterial getMaterialForParticle(const Particle *texture);
|
||||
|
||||
bool addParticle(std::unique_ptr<Particle> toadd);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue