mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
Merge branch 'GarageGames/development' into ueberengine-dev-3.10
Conflicts: Engine/source/app/version.h Engine/source/terrain/terrData.cpp
This commit is contained in:
commit
186604eb76
974 changed files with 121718 additions and 233088 deletions
|
|
@ -406,9 +406,10 @@ bool VolumetricFog::LoadShape()
|
|||
mIsVBDirty = true;
|
||||
for (U32 k = 0; k < numNrms; k++)
|
||||
{
|
||||
Point3F norm = mesh->mVertexData[k].normal();
|
||||
Point3F vert = mesh->mVertexData[k].vert();
|
||||
Point2F uv = mesh->mVertexData[k].tvert();
|
||||
const TSMesh::__TSMeshVertexBase &vd = mesh->mVertexData.getBase(k);
|
||||
Point3F norm = vd.normal();
|
||||
Point3F vert = vd.vert();
|
||||
Point2F uv = vd.tvert();
|
||||
tmpVerts[k].point = vert;
|
||||
tmpVerts[k].texCoord = uv;
|
||||
tmpVerts[k].normal = norm;
|
||||
|
|
|
|||
|
|
@ -272,11 +272,11 @@ SimObjectPtr<SimSet> DecalRoad::smServerDecalRoadSet = NULL;
|
|||
// Constructors
|
||||
|
||||
DecalRoad::DecalRoad()
|
||||
: mLoadRenderData( true ),
|
||||
mBreakAngle( 3.0f ),
|
||||
: mBreakAngle( 3.0f ),
|
||||
mSegmentsPerBatch( 10 ),
|
||||
mTextureLength( 5.0f ),
|
||||
mRenderPriority( 10 ),
|
||||
mLoadRenderData( true ),
|
||||
mMaterial( NULL ),
|
||||
mMatInst( NULL ),
|
||||
mUpdateEventId( -1 ),
|
||||
|
|
@ -1580,8 +1580,6 @@ void DecalRoad::_captureVerts()
|
|||
box.intersect( batch.bounds );
|
||||
}
|
||||
|
||||
Point3F pos = getPosition();
|
||||
|
||||
mWorldBox = box;
|
||||
resetObjectBox();
|
||||
|
||||
|
|
|
|||
|
|
@ -59,29 +59,28 @@ GuiMeshRoadEditorCtrl::GuiMeshRoadEditorCtrl()
|
|||
// tool palette
|
||||
mSelectMeshRoadMode("MeshRoadEditorSelectMode"),
|
||||
mAddMeshRoadMode("MeshRoadEditorAddRoadMode"),
|
||||
mMovePointMode("MeshRoadEditorMoveMode"),
|
||||
mRotatePointMode("MeshRoadEditorRotateMode"),
|
||||
mScalePointMode("MeshRoadEditorScaleMode"),
|
||||
mAddNodeMode("MeshRoadEditorAddNodeMode"),
|
||||
mInsertPointMode("MeshRoadEditorInsertPointMode"),
|
||||
mRemovePointMode("MeshRoadEditorRemovePointMode"),
|
||||
mMode(mSelectMeshRoadMode),
|
||||
|
||||
mHasCopied( false ),
|
||||
mIsDirty( false ),
|
||||
mRoadSet( NULL ),
|
||||
mSelNode( -1 ),
|
||||
mSelRoad( NULL ),
|
||||
mHoverRoad( NULL ),
|
||||
mHoverNode( -1 ),
|
||||
mDefaultWidth( 10.0f ),
|
||||
mDefaultDepth( 5.0f ),
|
||||
mDefaultNormal( 0,0,1 ),
|
||||
mAddNodeIdx( 0 ),
|
||||
mNodeHalfSize( 4,4 ),
|
||||
mHoverSplineColor( 255,0,0,255 ),
|
||||
mSelectedSplineColor( 0,255,0,255 ),
|
||||
mHoverNodeColor( 255,255,255,255 )
|
||||
mMovePointMode("MeshRoadEditorMoveMode"),
|
||||
mScalePointMode("MeshRoadEditorScaleMode"),
|
||||
mRotatePointMode("MeshRoadEditorRotateMode"),
|
||||
mIsDirty( false ),
|
||||
mRoadSet( NULL ),
|
||||
mSelNode( -1 ),
|
||||
mHoverNode( -1 ),
|
||||
mAddNodeIdx( 0 ),
|
||||
mSelRoad( NULL ),
|
||||
mHoverRoad( NULL ),
|
||||
mMode(mSelectMeshRoadMode),
|
||||
mDefaultWidth( 10.0f ),
|
||||
mDefaultDepth( 5.0f ),
|
||||
mDefaultNormal( 0,0,1 ),
|
||||
mNodeHalfSize( 4,4 ),
|
||||
mHoverSplineColor( 255,0,0,255 ),
|
||||
mSelectedSplineColor( 0,255,0,255 ),
|
||||
mHoverNodeColor( 255,255,255,255 ),
|
||||
mHasCopied( false )
|
||||
{
|
||||
mMaterialName[Top] = StringTable->insert("DefaultRoadMaterialTop");
|
||||
mMaterialName[Bottom] = StringTable->insert("DefaultRoadMaterialOther");
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ ConsoleDocClass( GuiRiverEditorCtrl,
|
|||
);
|
||||
|
||||
GuiRiverEditorCtrl::GuiRiverEditorCtrl()
|
||||
: mDefaultNormal( 0, 0, 1 ),
|
||||
mDefaultWidth( 10.0f ),
|
||||
mDefaultDepth( 5.0f )
|
||||
: mDefaultWidth( 10.0f ),
|
||||
mDefaultDepth( 5.0f ),
|
||||
mDefaultNormal( 0, 0, 1 )
|
||||
{
|
||||
// Each of the mode names directly correlates with the River Editor's
|
||||
// tool palette
|
||||
|
|
@ -1478,4 +1478,4 @@ DefineConsoleMethod( GuiRiverEditorCtrl, regenerate, void, (), , "" )
|
|||
River *river = object->getSelectedRiver();
|
||||
if ( river )
|
||||
river->regenerate();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1713,8 +1713,6 @@ void MeshRoad::_generateSlices()
|
|||
}
|
||||
}
|
||||
|
||||
Point3F pos = getPosition();
|
||||
|
||||
mWorldBox = box;
|
||||
resetObjectBox();
|
||||
|
||||
|
|
|
|||
|
|
@ -593,14 +593,14 @@ IMPLEMENT_CO_NETOBJECT_V1(River);
|
|||
|
||||
|
||||
River::River()
|
||||
: mMetersPerSegment(10.0f),
|
||||
mSegmentsPerBatch(10),
|
||||
: mSegmentsPerBatch(10),
|
||||
mMetersPerSegment(10.0f),
|
||||
mDepthScale(1.0f),
|
||||
mFlowMagnitude(1.0f),
|
||||
mLodDistance( 50.0f ),
|
||||
mMaxDivisionSize(2.5f),
|
||||
mMinDivisionSize(0.25f),
|
||||
mColumnCount(5),
|
||||
mFlowMagnitude(1.0f),
|
||||
mLodDistance( 50.0f )
|
||||
mColumnCount(5)
|
||||
{
|
||||
mNetFlags.set( Ghostable | ScopeAlways );
|
||||
|
||||
|
|
@ -1592,8 +1592,6 @@ void River::_generateSlices()
|
|||
}
|
||||
}
|
||||
|
||||
Point3F pos = getPosition();
|
||||
|
||||
mWorldBox = box;
|
||||
//mObjBox.minExtents -= pos;
|
||||
//mObjBox.maxExtents -= pos;
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ void ScatterSky::initPersistFields()
|
|||
"Enables/disables shadows cast by objects due to ScatterSky light." );
|
||||
|
||||
addField("staticRefreshFreq", TypeS32, Offset(mStaticRefreshFreq, ScatterSky), "static shadow refresh rate (milliseconds)");
|
||||
addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, ScatterSky), "dynamic shadow refresh rate (milliseconds)");
|
||||
addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, ScatterSky), "dynamic shadow refresh rate (milliseconds)", AbstractClassRep::FieldFlags::FIELD_HideInInspectors);
|
||||
|
||||
addField( "brightness", TypeF32, Offset( mBrightness, ScatterSky ),
|
||||
"The brightness of the ScatterSky's light object." );
|
||||
|
|
@ -666,11 +666,11 @@ void ScatterSky::prepRenderImage( SceneRenderState *state )
|
|||
mFlareState.scale = mFlareScale;
|
||||
mFlareState.lightInfo = mLight;
|
||||
|
||||
Point3F lightPos = state->getCameraPosition() - state->getFarPlane() * mLight->getDirection() * 0.9f;
|
||||
Point3F lightPos = state->getDiffuseCameraPosition() - state->getFarPlane() * mLight->getDirection() * 0.9f;
|
||||
mFlareState.lightMat.identity();
|
||||
mFlareState.lightMat.setPosition( lightPos );
|
||||
|
||||
F32 dist = ( lightPos - state->getCameraPosition( ) ).len( );
|
||||
F32 dist = ( lightPos - state->getDiffuseCameraPosition( ) ).len( );
|
||||
F32 coronaScale = 0.5f;
|
||||
F32 screenRadius = GFX->getViewport( ).extent.y * coronaScale * 0.5f;
|
||||
mFlareState.worldRadius = screenRadius * dist / state->getWorldToScreenScale( ).y;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ void Sun::initPersistFields()
|
|||
"Enables/disables shadows cast by objects due to Sun light");
|
||||
|
||||
addField("staticRefreshFreq", TypeS32, Offset(mStaticRefreshFreq, Sun), "static shadow refresh rate (milliseconds)");
|
||||
addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, Sun), "dynamic shadow refresh rate (milliseconds)");
|
||||
addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, Sun), "dynamic shadow refresh rate (milliseconds)", AbstractClassRep::FieldFlags::FIELD_HideInInspectors);
|
||||
|
||||
endGroup( "Lighting" );
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,6 @@ void WaterBlock::setupVBIB()
|
|||
//-----------------------------------------------------------------------------
|
||||
void WaterBlock::setupVertexBlock( U32 width, U32 height, U32 rowOffset )
|
||||
{
|
||||
Point3F pos = getPosition();
|
||||
RayInfo rInfo;
|
||||
VectorF sunVector(-0.61f, 0.354f, 0.707f);
|
||||
|
||||
|
|
@ -592,9 +591,6 @@ void WaterBlock::setTransform( const MatrixF &mat )
|
|||
// If our transform changes we need to recalculate the
|
||||
// per vertex depth/shadow info. Would be nice if this could
|
||||
// be done independently of generating the whole VBIB...
|
||||
|
||||
MatrixF oldMat = mObjToWorld;
|
||||
|
||||
Parent::setTransform( mat );
|
||||
|
||||
// We don't need to regen our vb anymore since we aren't calculating
|
||||
|
|
|
|||
|
|
@ -179,23 +179,24 @@ ConsoleDocClass( WaterObject,
|
|||
WaterObject::WaterObject()
|
||||
: mViscosity( 1.0f ),
|
||||
mDensity( 1.0f ),
|
||||
mReflectivity( 0.5f ),
|
||||
mReflectNormalUp( true ),
|
||||
mLiquidType( "Water" ),
|
||||
mFresnelBias( 0.3f ),
|
||||
mFresnelPower( 6.0f ),
|
||||
mReflectNormalUp( true ),
|
||||
mReflectivity( 0.5f ),
|
||||
mDistortStartDist( 0.1f ),
|
||||
mDistortEndDist( 20.0f ),
|
||||
mDistortFullDepth( 3.5f ),
|
||||
mUndulateMaxDist(50.0f),
|
||||
mOverallFoamOpacity( 1.0f ),
|
||||
mFoamMaxDepth( 2.0f ),
|
||||
mFoamAmbientLerp( 0.5f ),
|
||||
mFoamRippleInfluence( 0.05f ),
|
||||
mUnderwaterPostFx( NULL ),
|
||||
mLiquidType( "Water" ),
|
||||
mFresnelBias( 0.3f ),
|
||||
mFresnelPower( 6.0f ),
|
||||
mClarity( 0.5f ),
|
||||
mBasicLighting( false ),
|
||||
mUnderwaterColor(9, 6, 5, 240),
|
||||
mUndulateMaxDist(50.0f),
|
||||
mMiscParamW( 0.0f ),
|
||||
mUnderwaterPostFx( NULL ),
|
||||
mBasicLighting( false ),
|
||||
mOverallWaveMagnitude( 1.0f ),
|
||||
mOverallRippleMagnitude( 0.1f ),
|
||||
mCubemap( NULL ),
|
||||
|
|
@ -203,8 +204,7 @@ WaterObject::WaterObject()
|
|||
mSpecularPower( 48.0f ),
|
||||
mSpecularColor( 1.0f, 1.0f, 1.0f, 1.0f ),
|
||||
mDepthGradientMax( 50.0f ),
|
||||
mEmissive( false ),
|
||||
mUnderwaterColor(9, 6, 5, 240)
|
||||
mEmissive( false )
|
||||
{
|
||||
mTypeMask = WaterObjectType;
|
||||
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ void WaterPlane::setupVBIB( SceneRenderState *state )
|
|||
1, // Top
|
||||
-(S32)gridStride, // Right
|
||||
-1, // Bottom
|
||||
gridStride, // Left
|
||||
(S32)gridStride, // Left
|
||||
};
|
||||
|
||||
const U32 firstBorderVert = gridStride * gridSize + gridStride;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue