Explorar o código

use the same renderpriority range across all cases

AzaezelX hai 7 meses
pai
achega
ffe83b1d2d

+ 5 - 5
Engine/source/T3D/decal/decalData.cpp

@@ -91,7 +91,7 @@ DecalData::DecalData()
 
    matInst = NULL;
 
-   renderPriority = 10;
+   mRenderPriority = 10;
    clippingMasks = STATIC_COLLISION_TYPEMASK;
    clippingAngle = 89.0f;
 
@@ -169,7 +169,7 @@ void DecalData::initPersistFields()
          "fully faded out.\n\n"
          "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 "
          "order when decals overlap)." );
 
@@ -235,7 +235,7 @@ void DecalData::onStaticModified( const char *slotName, const char *newValue )
    }
    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( fadeEndPixelSize );
-   stream->write( renderPriority );
+   stream->write( mRenderPriority );
    stream->write( clippingMasks );
    stream->write( clippingAngle );
    
@@ -300,7 +300,7 @@ void DecalData::unpackData( BitStream *stream )
 
    stream->read( &fadeStartPixelSize );
    stream->read( &fadeEndPixelSize );
-   stream->read( &renderPriority );
+   stream->read( &mRenderPriority);
    stream->read( &clippingMasks );
    stream->read( &clippingAngle );
    

+ 1 - 1
Engine/source/T3D/decal/decalData.h

@@ -85,7 +85,7 @@ class DecalData : public SimDataBlock
 
       String lookupName;
 
-      U8 renderPriority;
+      S16 mRenderPriority;
       
       S32 clippingMasks;
 

+ 1 - 1
Engine/source/T3D/decal/decalInstance.h

@@ -88,7 +88,7 @@ class DecalInstance
 
       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.

+ 2 - 2
Engine/source/environment/decalRoad.cpp

@@ -315,7 +315,7 @@ void DecalRoad::initPersistFields()
       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." );      
 
-      addField( "renderPriority", TypeS32, Offset( mRenderPriority, DecalRoad ), 
+      addField( "renderPriority", TypeS16, Offset( mRenderPriority, DecalRoad ),
          "DecalRoad(s) are rendered in descending renderPriority order." );
 
    endGroup( "DecalRoad" );
@@ -429,7 +429,7 @@ void DecalRoad::onStaticModified( const char* slotName, const char*newValue )
 
    if ( dStricmp( slotName, "renderPriority" ) == 0 )
    {
-      mRenderPriority = getMax( dAtoi(newValue), (S32)1 );
+      mRenderPriority = getMax((S16)dAtoi(newValue), (S16)1 );
    }
 }
 

+ 1 - 1
Engine/source/environment/decalRoad.h

@@ -249,7 +249,7 @@ protected:
    DECLARE_MATERIALASSET(DecalRoad, Material);
    DECLARE_ASSET_NET_SETGET(DecalRoad, Material, DecalRoadMask);
 
-   U32 mRenderPriority;
+   S16 mRenderPriority;
 
    // Static ConsoleVars for editor
    static bool smEditorOpen;

+ 1 - 1
Engine/source/postFx/postEffect.cpp

@@ -568,7 +568,7 @@ void PostEffect::initPersistFields()
    addField( "renderBin", TypeRealString, Offset( mRenderBin, PostEffect ),
       "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." );
 
    addField( "allowReflectPass", TypeBool, Offset( mAllowReflectPass, PostEffect ), 

+ 1 - 1
Engine/source/postFx/postEffect.h

@@ -202,7 +202,7 @@ protected:
 
    String mRenderBin;
 
-   F32 mRenderPriority;
+   S16 mRenderPriority;
 
    /// This is true if the effect has been succesfully
    /// initialized and all requirements are met for use.