mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Added ability to pass ints to post effect shader consts
Reorg'd probe init to flow better and be more robust on load Cleaned up various parts of the probe render manager to be more stable Fixed issue with crash on release due to numProbe in loops being 0 Updated glsl probe array shader Beginning of rework of editor settings Beginning of conversion of asset import config to similar system as editor settings
This commit is contained in:
parent
b40d33a663
commit
dd3422b5a2
21 changed files with 300 additions and 420 deletions
|
|
@ -183,6 +183,16 @@ void PostEffect::EffectConst::set(const F32 &newVal)
|
|||
mValueType = FloatType;
|
||||
}
|
||||
|
||||
void PostEffect::EffectConst::set(const int& newVal)
|
||||
{
|
||||
if (mIntVal == newVal)
|
||||
return;
|
||||
|
||||
mIntVal = newVal;
|
||||
mDirty = true;
|
||||
mValueType = IntType;
|
||||
}
|
||||
|
||||
void PostEffect::EffectConst::set(const Point4F &newVal)
|
||||
{
|
||||
if (mPointVal == newVal)
|
||||
|
|
@ -326,6 +336,21 @@ void PostEffect::EffectConst::setToBuffer( GFXShaderConstBufferRef buff )
|
|||
const char* err = avar("PostEffect::EffectConst::setToBuffer $s type is not implemented", mName.c_str());
|
||||
Con::errorf(err);
|
||||
GFXAssertFatal(0, err);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (mValueType == IntType)
|
||||
{
|
||||
if (type == GFXSCT_Int)
|
||||
{
|
||||
buff->set(mHandle, mIntVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if TORQUE_DEBUG
|
||||
const char* err = avar("PostEffect::EffectConst::setToBuffer $s type is not implemented", mName.c_str());
|
||||
Con::errorf(err);
|
||||
GFXAssertFatal(0, err);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -1676,6 +1701,20 @@ void PostEffect::setShaderConst(const String &name, const F32 &val)
|
|||
iter->value->set(val);
|
||||
}
|
||||
|
||||
void PostEffect::setShaderConst(const String& name, const int& val)
|
||||
{
|
||||
PROFILE_SCOPE(PostEffect_SetShaderConst_Float);
|
||||
|
||||
EffectConstTable::Iterator iter = mEffectConsts.find(name);
|
||||
if (iter == mEffectConsts.end())
|
||||
{
|
||||
EffectConst* newConst = new EffectConst(name, val);
|
||||
iter = mEffectConsts.insertUnique(name, newConst);
|
||||
}
|
||||
|
||||
iter->value->set(val);
|
||||
}
|
||||
|
||||
void PostEffect::setShaderConst(const String &name, const Point4F &val)
|
||||
{
|
||||
PROFILE_SCOPE(PostEffect_SetShaderConst_Point);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue