Merge branch 'GlowingParticles' of https://github.com/lukaspj/Torque3D into glowParticles

Conflicts:
	Engine/source/renderInstance/renderParticleMgr.cpp
This commit is contained in:
Azaezel 2014-12-16 18:48:28 -06:00
commit 98048fd974
11 changed files with 179 additions and 63 deletions

View file

@ -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);

View file

@ -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();
};