mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 05:20:31 +00:00
shift capturing from a globalMacro to a sceneRenderstate S32
lets us ditch shader recompilation so that can be done on the fly without hitches, though does cost us a per-shader const for objects and postfx
This commit is contained in:
parent
71e0626ec2
commit
fe26ffc375
13 changed files with 69 additions and 101 deletions
|
|
@ -498,7 +498,8 @@ PostEffect::PostEffect()
|
|||
mMatCameraToWorldSC( NULL),
|
||||
mInvCameraTransSC(NULL),
|
||||
mMatCameraToScreenSC(NULL),
|
||||
mMatScreenToCameraSC(NULL)
|
||||
mMatScreenToCameraSC(NULL),
|
||||
mIsCapturingSC(NULL)
|
||||
{
|
||||
dMemset( mTexSRGB, 0, sizeof(bool) * NumTextures);
|
||||
dMemset( mActiveTextures, 0, sizeof( GFXTextureObject* ) * NumTextures );
|
||||
|
|
@ -798,8 +799,12 @@ void PostEffect::_setupConstants( const SceneRenderState *state )
|
|||
mInvCameraTransSC = mShader->getShaderConstHandle("$invCameraTrans");
|
||||
mMatCameraToScreenSC = mShader->getShaderConstHandle("$cameraToScreen");
|
||||
mMatScreenToCameraSC = mShader->getShaderConstHandle("$screenToCamera");
|
||||
mIsCapturingSC = mShader->getShaderConstHandle("$isCapturing");
|
||||
}
|
||||
|
||||
if (mIsCapturingSC->isValid())
|
||||
mShaderConsts->set(mIsCapturingSC, (S32)state->isCapturing());
|
||||
|
||||
// Set up shader constants for source image size
|
||||
if ( mRTSizeSC->isValid() )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue