mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
use the same renderpriority range across all cases
This commit is contained in:
parent
44b0d896b8
commit
ffe83b1d2d
7 changed files with 12 additions and 12 deletions
|
|
@ -91,7 +91,7 @@ DecalData::DecalData()
|
||||||
|
|
||||||
matInst = NULL;
|
matInst = NULL;
|
||||||
|
|
||||||
renderPriority = 10;
|
mRenderPriority = 10;
|
||||||
clippingMasks = STATIC_COLLISION_TYPEMASK;
|
clippingMasks = STATIC_COLLISION_TYPEMASK;
|
||||||
clippingAngle = 89.0f;
|
clippingAngle = 89.0f;
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ void DecalData::initPersistFields()
|
||||||
"fully faded out.\n\n"
|
"fully faded out.\n\n"
|
||||||
"This should be a smaller value than #fadeStartPixelSize." );
|
"This should be a smaller value than #fadeStartPixelSize." );
|
||||||
|
|
||||||
addField( "renderPriority", TypeS8, Offset( renderPriority, DecalData ),
|
addField( "renderPriority", TypeS16, Offset( mRenderPriority, DecalData ),
|
||||||
"Default renderPriority for decals of this type (determines draw "
|
"Default renderPriority for decals of this type (determines draw "
|
||||||
"order when decals overlap)." );
|
"order when decals overlap)." );
|
||||||
|
|
||||||
|
|
@ -235,7 +235,7 @@ void DecalData::onStaticModified( const char *slotName, const char *newValue )
|
||||||
}
|
}
|
||||||
else if ( dStricmp( slotName, "renderPriority" ) == 0 )
|
else if ( dStricmp( slotName, "renderPriority" ) == 0 )
|
||||||
{
|
{
|
||||||
renderPriority = getMax( renderPriority, (U8)1 );
|
mRenderPriority = getMax(mRenderPriority, (S16)1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -270,7 +270,7 @@ void DecalData::packData( BitStream *stream )
|
||||||
|
|
||||||
stream->write( fadeStartPixelSize );
|
stream->write( fadeStartPixelSize );
|
||||||
stream->write( fadeEndPixelSize );
|
stream->write( fadeEndPixelSize );
|
||||||
stream->write( renderPriority );
|
stream->write( mRenderPriority );
|
||||||
stream->write( clippingMasks );
|
stream->write( clippingMasks );
|
||||||
stream->write( clippingAngle );
|
stream->write( clippingAngle );
|
||||||
|
|
||||||
|
|
@ -300,7 +300,7 @@ void DecalData::unpackData( BitStream *stream )
|
||||||
|
|
||||||
stream->read( &fadeStartPixelSize );
|
stream->read( &fadeStartPixelSize );
|
||||||
stream->read( &fadeEndPixelSize );
|
stream->read( &fadeEndPixelSize );
|
||||||
stream->read( &renderPriority );
|
stream->read( &mRenderPriority);
|
||||||
stream->read( &clippingMasks );
|
stream->read( &clippingMasks );
|
||||||
stream->read( &clippingAngle );
|
stream->read( &clippingAngle );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class DecalData : public SimDataBlock
|
||||||
|
|
||||||
String lookupName;
|
String lookupName;
|
||||||
|
|
||||||
U8 renderPriority;
|
S16 mRenderPriority;
|
||||||
|
|
||||||
S32 clippingMasks;
|
S32 clippingMasks;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ class DecalInstance
|
||||||
|
|
||||||
U8 getRenderPriority() const
|
U8 getRenderPriority() const
|
||||||
{
|
{
|
||||||
return mRenderPriority == 0 ? mDataBlock->renderPriority : mRenderPriority;
|
return mRenderPriority == 0 ? mDataBlock->mRenderPriority : mRenderPriority;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Calculates the size of this decal onscreen in pixels, used for LOD.
|
/// Calculates the size of this decal onscreen in pixels, used for LOD.
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ void DecalRoad::initPersistFields()
|
||||||
addProtectedFieldV( "breakAngle", TypeRangedF32, Offset( mBreakAngle, DecalRoad ), &DecalRoad::ptSetBreakAngle, &defaultProtectedGetFn, &CommonValidators::PosDegreeRange,
|
addProtectedFieldV( "breakAngle", TypeRangedF32, Offset( mBreakAngle, DecalRoad ), &DecalRoad::ptSetBreakAngle, &defaultProtectedGetFn, &CommonValidators::PosDegreeRange,
|
||||||
"Angle in degrees - DecalRoad will subdivided the spline if its curve is greater than this threshold." );
|
"Angle in degrees - DecalRoad will subdivided the spline if its curve is greater than this threshold." );
|
||||||
|
|
||||||
addField( "renderPriority", TypeS32, Offset( mRenderPriority, DecalRoad ),
|
addField( "renderPriority", TypeS16, Offset( mRenderPriority, DecalRoad ),
|
||||||
"DecalRoad(s) are rendered in descending renderPriority order." );
|
"DecalRoad(s) are rendered in descending renderPriority order." );
|
||||||
|
|
||||||
endGroup( "DecalRoad" );
|
endGroup( "DecalRoad" );
|
||||||
|
|
@ -429,7 +429,7 @@ void DecalRoad::onStaticModified( const char* slotName, const char*newValue )
|
||||||
|
|
||||||
if ( dStricmp( slotName, "renderPriority" ) == 0 )
|
if ( dStricmp( slotName, "renderPriority" ) == 0 )
|
||||||
{
|
{
|
||||||
mRenderPriority = getMax( dAtoi(newValue), (S32)1 );
|
mRenderPriority = getMax((S16)dAtoi(newValue), (S16)1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ protected:
|
||||||
DECLARE_MATERIALASSET(DecalRoad, Material);
|
DECLARE_MATERIALASSET(DecalRoad, Material);
|
||||||
DECLARE_ASSET_NET_SETGET(DecalRoad, Material, DecalRoadMask);
|
DECLARE_ASSET_NET_SETGET(DecalRoad, Material, DecalRoadMask);
|
||||||
|
|
||||||
U32 mRenderPriority;
|
S16 mRenderPriority;
|
||||||
|
|
||||||
// Static ConsoleVars for editor
|
// Static ConsoleVars for editor
|
||||||
static bool smEditorOpen;
|
static bool smEditorOpen;
|
||||||
|
|
|
||||||
|
|
@ -568,7 +568,7 @@ void PostEffect::initPersistFields()
|
||||||
addField( "renderBin", TypeRealString, Offset( mRenderBin, PostEffect ),
|
addField( "renderBin", TypeRealString, Offset( mRenderBin, PostEffect ),
|
||||||
"Name of a renderBin, used if renderTime is PFXBeforeBin or PFXAfterBin." );
|
"Name of a renderBin, used if renderTime is PFXBeforeBin or PFXAfterBin." );
|
||||||
|
|
||||||
addFieldV( "renderPriority", TypeRangedF32, Offset( mRenderPriority, PostEffect ), &CommonValidators::PositiveFloat,
|
addField( "renderPriority", TypeS16, Offset( mRenderPriority, PostEffect ),
|
||||||
"PostEffects are processed in DESCENDING order of renderPriority if more than one has the same renderBin/Time." );
|
"PostEffects are processed in DESCENDING order of renderPriority if more than one has the same renderBin/Time." );
|
||||||
|
|
||||||
addField( "allowReflectPass", TypeBool, Offset( mAllowReflectPass, PostEffect ),
|
addField( "allowReflectPass", TypeBool, Offset( mAllowReflectPass, PostEffect ),
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ protected:
|
||||||
|
|
||||||
String mRenderBin;
|
String mRenderBin;
|
||||||
|
|
||||||
F32 mRenderPriority;
|
S16 mRenderPriority;
|
||||||
|
|
||||||
/// This is true if the effect has been succesfully
|
/// This is true if the effect has been succesfully
|
||||||
/// initialized and all requirements are met for use.
|
/// initialized and all requirements are met for use.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue