mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 21:40:31 +00:00
Expand PostFX Viewport Options
- Added an option for a postFX to get its viewport from a named texture in slot 0, if there is one. This allows the postFX to operate when the named input texture's viewport is different than the current viewport. - Modified the SSAO postFX to use the new PFXTargetViewport_NamedInTexture0 option to more closely link SSAO with the prepass buffer. - Modifed the GFX method setActiveRenderTarget() with a new parameter that indicates if the current viewport should be modified with the new rendering target. This defaults to true to maintain its previous behaviour. The postFX rendering pipeline sets this to false as it now handles its own viewport setup, and removes an unnecessary GFX->setViewport() call.
This commit is contained in:
parent
88f2a4d903
commit
15673810c6
6 changed files with 56 additions and 12 deletions
|
|
@ -849,7 +849,7 @@ void GFXDevice::popActiveRenderTarget()
|
|||
mRTStack.pop_back();
|
||||
}
|
||||
|
||||
void GFXDevice::setActiveRenderTarget( GFXTarget *target )
|
||||
void GFXDevice::setActiveRenderTarget( GFXTarget *target, bool updateViewport )
|
||||
{
|
||||
AssertFatal( target,
|
||||
"GFXDevice::setActiveRenderTarget - must specify a render target!" );
|
||||
|
|
@ -878,7 +878,10 @@ void GFXDevice::setActiveRenderTarget( GFXTarget *target )
|
|||
// We should consider removing this and making it the
|
||||
// responsibility of the caller to set a proper viewport
|
||||
// when the target is changed.
|
||||
setViewport( RectI( Point2I::Zero, mCurrentRT->getSize() ) );
|
||||
if ( updateViewport )
|
||||
{
|
||||
setViewport( RectI( Point2I::Zero, mCurrentRT->getSize() ) );
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper class for GFXDevice::describeResources.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue