mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Implement Singlepass Terrain Render
This commit is contained in:
parent
49a8c0ad36
commit
87dd7ffc4a
35 changed files with 1658 additions and 951 deletions
|
|
@ -80,6 +80,29 @@ void EchoOp::print( Stream &stream )
|
|||
WRITESTR( mStatement );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// Index operation
|
||||
//**************************************************************************
|
||||
IndexOp::IndexOp( Var* var, U32 index ) : Parent( NULL, NULL )
|
||||
{
|
||||
mInput[0] = var;
|
||||
mIndex = index;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Print
|
||||
//--------------------------------------------------------------------------
|
||||
void IndexOp::print( Stream &stream )
|
||||
{
|
||||
Var* var = dynamic_cast<Var*>(mInput[0]);
|
||||
|
||||
mInput[0]->print(stream);
|
||||
if (var->arraySize > 1)
|
||||
{
|
||||
WRITESTR(String::ToString("[%d]", mIndex));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// General operation
|
||||
|
|
|
|||
|
|
@ -110,6 +110,21 @@ public:
|
|||
virtual void print( Stream &stream );
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/*!
|
||||
Accesses the given index on the variable
|
||||
*/
|
||||
//----------------------------------------------------------------------------
|
||||
class IndexOp : public ShaderOp
|
||||
{
|
||||
typedef ShaderOp Parent;
|
||||
U32 mIndex;
|
||||
|
||||
public:
|
||||
IndexOp( Var* var, U32 index );
|
||||
virtual void print( Stream &stream );
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue