mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #1529 from Azaezel/alpha41/WaterGridGrinding
adress odd water values
This commit is contained in:
commit
07c67f2935
4 changed files with 9 additions and 9 deletions
|
|
@ -531,12 +531,9 @@ void WaterBlock::initPersistFields()
|
||||||
docsURL;
|
docsURL;
|
||||||
addGroup( "WaterBlock" );
|
addGroup( "WaterBlock" );
|
||||||
|
|
||||||
addProtectedFieldV("gridSize", TypeRangedS32, Offset(mGridElementSize, WaterBlock), &setGridSizeProperty, &defaultProtectedGetFn, &CommonValidators::NaturalNumber,
|
addProtectedFieldV("gridSize", TypeRangedF32, Offset(mGridElementSize, WaterBlock), &setGridSizeProperty, &defaultProtectedGetFn, &CommonValidators::PositiveFloat,
|
||||||
"Spacing between vertices in the WaterBlock mesh");
|
"Spacing between vertices in the WaterBlock mesh");
|
||||||
|
addProtectedFieldV("gridElementSize", TypeRangedF32, Offset(mGridElementSize, WaterBlock), &setGridSizeProperty, &defaultProtectedGetFn, &CommonValidators::PositiveFloat, "Duplicate of gridElementSize for backwards compatility");
|
||||||
addProtectedFieldV("gridElementSize", TypeRangedS32, Offset(mGridElementSize, WaterBlock), &setGridSizeProperty, &defaultProtectedGetFn, &CommonValidators::NaturalNumber,
|
|
||||||
"Duplicate of gridElementSize for backwards compatility");
|
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ private:
|
||||||
GFXPrimitiveBufferHandle mRadialPrimBuff;
|
GFXPrimitiveBufferHandle mRadialPrimBuff;
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
U32 mGridElementSize;
|
F32 mGridElementSize;
|
||||||
U32 mWidth;
|
U32 mWidth;
|
||||||
U32 mHeight;
|
U32 mHeight;
|
||||||
F32 mElapsedTime;
|
F32 mElapsedTime;
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
#include "T3D/sfx/sfx3DWorld.h"
|
#include "T3D/sfx/sfx3DWorld.h"
|
||||||
#include "sfx/sfxTypes.h"
|
#include "sfx/sfxTypes.h"
|
||||||
#include "console/typeValidators.h"
|
#include "console/typeValidators.h"
|
||||||
|
#include "gfx/gfxTransformSaver.h"
|
||||||
|
|
||||||
GFXImplementVertexFormat( GFXWaterVertex )
|
GFXImplementVertexFormat( GFXWaterVertex )
|
||||||
{
|
{
|
||||||
|
|
@ -699,6 +700,8 @@ void WaterObject::prepRenderImage( SceneRenderState *state )
|
||||||
if( !state->isDiffusePass() )
|
if( !state->isDiffusePass() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GFXTransformSaver saver;
|
||||||
|
|
||||||
// Setup scene transforms
|
// Setup scene transforms
|
||||||
mMatrixSet->setSceneView(GFX->getWorldMatrix());
|
mMatrixSet->setSceneView(GFX->getWorldMatrix());
|
||||||
mMatrixSet->setSceneProjection(GFX->getProjectionMatrix());
|
mMatrixSet->setSceneProjection(GFX->getProjectionMatrix());
|
||||||
|
|
|
||||||
|
|
@ -124,9 +124,7 @@ void WaterPlane::initPersistFields()
|
||||||
|
|
||||||
addProtectedFieldV( "gridSize", TypeRangedS32, Offset( mGridSize, WaterPlane ), &protectedSetGridSize, &defaultProtectedGetFn, &CommonValidators::NaturalNumber,
|
addProtectedFieldV( "gridSize", TypeRangedS32, Offset( mGridSize, WaterPlane ), &protectedSetGridSize, &defaultProtectedGetFn, &CommonValidators::NaturalNumber,
|
||||||
"Spacing between vertices in the WaterBlock mesh" );
|
"Spacing between vertices in the WaterBlock mesh" );
|
||||||
|
addProtectedFieldV("gridElementSize", TypeRangedF32, Offset(mGridElementSize, WaterPlane), &protectedSetGridElementSize, &defaultProtectedGetFn, &CommonValidators::PositiveFloat, "Duplicate of gridElementSize for backwards compatility");
|
||||||
addProtectedFieldV( "gridElementSize", TypeRangedS32, Offset( mGridElementSize, WaterPlane ), &protectedSetGridElementSize, &defaultProtectedGetFn, &CommonValidators::NaturalNumber,
|
|
||||||
"Duplicate of gridElementSize for backwards compatility");
|
|
||||||
|
|
||||||
endGroup( "WaterPlane" );
|
endGroup( "WaterPlane" );
|
||||||
|
|
||||||
|
|
@ -699,6 +697,8 @@ void WaterPlane::prepRenderImage( SceneRenderState *state )
|
||||||
if( !state->isDiffusePass() )
|
if( !state->isDiffusePass() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GFXTransformSaver saver;
|
||||||
|
|
||||||
mBasicLighting = dStricmp( LIGHTMGR->getId(), "BLM" ) == 0;
|
mBasicLighting = dStricmp( LIGHTMGR->getId(), "BLM" ) == 0;
|
||||||
mUnderwater = isUnderwater( state->getCameraPosition() );
|
mUnderwater = isUnderwater( state->getCameraPosition() );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue