mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
banding: conforms misbehaving postfx to the hdr buffer format until we have a proper srgb compatible buffer to minimize that with
This commit is contained in:
parent
8cae1e5dcb
commit
125b7aa636
5 changed files with 5 additions and 3 deletions
|
|
@ -1320,7 +1320,7 @@ DefineEngineFunction( getBestHDRFormat, GFXFormat, (),,
|
||||||
// Figure out the best HDR format. This is the smallest
|
// Figure out the best HDR format. This is the smallest
|
||||||
// format which supports blending and filtering.
|
// format which supports blending and filtering.
|
||||||
Vector<GFXFormat> formats;
|
Vector<GFXFormat> formats;
|
||||||
formats.push_back( GFXFormatR10G10B10A2 );
|
//formats.push_back( GFXFormatR10G10B10A2 ); TODO: replace with SRGB format once DX9 is gone - BJR
|
||||||
formats.push_back( GFXFormatR16G16B16A16F );
|
formats.push_back( GFXFormatR16G16B16A16F );
|
||||||
formats.push_back( GFXFormatR16G16B16A16 );
|
formats.push_back( GFXFormatR16G16B16A16 );
|
||||||
GFXFormat format = GFX->selectSupportedFormat( &GFXDefaultRenderTargetProfile,
|
GFXFormat format = GFX->selectSupportedFormat( &GFXDefaultRenderTargetProfile,
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ singleton PostEffect( GammaPostFX )
|
||||||
|
|
||||||
texture[0] = "$backBuffer";
|
texture[0] = "$backBuffer";
|
||||||
texture[1] = $HDRPostFX::colorCorrectionRamp;
|
texture[1] = $HDRPostFX::colorCorrectionRamp;
|
||||||
|
targetFormat = getBestHDRFormat();
|
||||||
};
|
};
|
||||||
|
|
||||||
function GammaPostFX::preProcess( %this )
|
function GammaPostFX::preProcess( %this )
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ singleton PostEffect( FogPostFx )
|
||||||
|
|
||||||
renderPriority = 5;
|
renderPriority = 5;
|
||||||
|
|
||||||
|
targetFormat = getBestHDRFormat();
|
||||||
isEnabled = true;
|
isEnabled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ function HDRPostFX::onDisabled( %this )
|
||||||
GammaPostFX.enable();
|
GammaPostFX.enable();
|
||||||
|
|
||||||
// Restore the non-HDR offscreen surface format.
|
// Restore the non-HDR offscreen surface format.
|
||||||
%format = "GFXFormatR8G8B8A8";
|
%format = getBestHDRFormat();
|
||||||
AL_FormatToken.format = %format;
|
AL_FormatToken.format = %format;
|
||||||
setReflectFormat( %format );
|
setReflectFormat( %format );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function initRenderManager()
|
||||||
{
|
{
|
||||||
enabled = "false";
|
enabled = "false";
|
||||||
|
|
||||||
format = "GFXFormatR16G16B16A16F";
|
format = getBestHDRFormat();
|
||||||
depthFormat = "GFXFormatD24S8";
|
depthFormat = "GFXFormatD24S8";
|
||||||
aaLevel = 0; // -1 = match backbuffer
|
aaLevel = 0; // -1 = match backbuffer
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue