mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 21:40:31 +00:00
Merge branch 'GlowingParticles' of https://github.com/lukaspj/Torque3D into glowParticles
Conflicts: Engine/source/renderInstance/renderParticleMgr.cpp
This commit is contained in:
commit
98048fd974
11 changed files with 179 additions and 63 deletions
|
|
@ -145,6 +145,7 @@ ParticleEmitterData::ParticleEmitterData()
|
|||
blendStyle = ParticleRenderInst::BlendUndefined;
|
||||
sortParticles = false;
|
||||
renderReflection = true;
|
||||
glow = false;
|
||||
reverseOrder = false;
|
||||
textureName = 0;
|
||||
textureHandle = 0;
|
||||
|
|
@ -289,6 +290,9 @@ void ParticleEmitterData::initPersistFields()
|
|||
addField( "renderReflection", TYPEID< bool >(), Offset(renderReflection, ParticleEmitterData),
|
||||
"Controls whether particles are rendered onto reflective surfaces like water." );
|
||||
|
||||
addField("glow", TYPEID< bool >(), Offset(glow, ParticleEmitterData),
|
||||
"If true, the particles are rendered to the glow buffer as well.");
|
||||
|
||||
//@}
|
||||
|
||||
endGroup( "ParticleEmitterData" );
|
||||
|
|
@ -356,6 +360,7 @@ void ParticleEmitterData::packData(BitStream* stream)
|
|||
}
|
||||
stream->writeFlag(highResOnly);
|
||||
stream->writeFlag(renderReflection);
|
||||
stream->writeFlag(glow);
|
||||
stream->writeInt( blendStyle, 4 );
|
||||
}
|
||||
|
||||
|
|
@ -418,6 +423,7 @@ void ParticleEmitterData::unpackData(BitStream* stream)
|
|||
}
|
||||
highResOnly = stream->readFlag();
|
||||
renderReflection = stream->readFlag();
|
||||
glow = stream->readFlag();
|
||||
blendStyle = stream->readInt( 4 );
|
||||
}
|
||||
|
||||
|
|
@ -909,6 +915,8 @@ void ParticleEmitter::prepRenderImage(SceneRenderState* state)
|
|||
|
||||
ri->blendStyle = mDataBlock->blendStyle;
|
||||
|
||||
ri->glow = mDataBlock->glow;
|
||||
|
||||
// use first particle's texture unless there is an emitter texture to override it
|
||||
if (mDataBlock->textureHandle)
|
||||
ri->diffuseTex = &*(mDataBlock->textureHandle);
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ class ParticleEmitterData : public GameBaseData
|
|||
GFXTexHandle textureHandle; ///< Emitter texture handle from txrName
|
||||
bool highResOnly; ///< This particle system should not use the mixed-resolution particle rendering
|
||||
bool renderReflection; ///< Enables this emitter to render into reflection passes.
|
||||
bool glow; ///< Renders this emitter into the glow buffer.
|
||||
|
||||
bool reload();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue