mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
misc fixes to mitigate banding
scriptside: 1) HDRPostFX::onEnabled needs to test vs GFXFormatR16G16B16A16F, as that's what's getting returned by getBestHDRFormat() 2) AL_FormatToken shifted to that same GFXFormatR16G16B16A16F target format 3) tangental but somewhat related, we were doubling up refposition offsets in the boxproject sourceside: tweaked the capture code for probes to ensure that the "screengrab" and output cubemap formats were identical
This commit is contained in:
parent
72b489fe25
commit
e28b6ae6de
3 changed files with 3 additions and 3 deletions
|
|
@ -287,7 +287,7 @@ function HDRPostFX::onEnabled( %this )
|
||||||
// Set the right global shader define for HDR.
|
// Set the right global shader define for HDR.
|
||||||
if ( %format $= "GFXFormatR10G10B10A2" )
|
if ( %format $= "GFXFormatR10G10B10A2" )
|
||||||
addGlobalShaderMacro( "TORQUE_HDR_RGB10" );
|
addGlobalShaderMacro( "TORQUE_HDR_RGB10" );
|
||||||
else if ( %format $= "GFXFormatR16G16B16A16" )
|
else if ( %format $= "GFXFormatR16G16B16A16F" )
|
||||||
addGlobalShaderMacro( "TORQUE_HDR_RGB16" );
|
addGlobalShaderMacro( "TORQUE_HDR_RGB16" );
|
||||||
|
|
||||||
echo( "HDR FORMAT: " @ %format );
|
echo( "HDR FORMAT: " @ %format );
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ function initRenderManager()
|
||||||
enabled = "false";
|
enabled = "false";
|
||||||
|
|
||||||
//When hdr is enabled this will be changed to the appropriate format
|
//When hdr is enabled this will be changed to the appropriate format
|
||||||
format = "GFXFormatR8G8B8A8_SRGB";
|
format = "GFXFormatR16G16B16A16F";
|
||||||
depthFormat = "GFXFormatD24S8";
|
depthFormat = "GFXFormatD24S8";
|
||||||
aaLevel = 0; // -1 = match backbuffer
|
aaLevel = 0; // -1 = match backbuffer
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ float3 boxProject(float3 wsPosition, float3 wsReflectVec, float4x4 worldToObj, f
|
||||||
float dist = min(min(furthestPlane.x, furthestPlane.y), furthestPlane.z);
|
float dist = min(min(furthestPlane.x, furthestPlane.y), furthestPlane.z);
|
||||||
float3 posonbox = wsPosition + wsReflectVec * dist;
|
float3 posonbox = wsPosition + wsReflectVec * dist;
|
||||||
|
|
||||||
return posonbox - refPosition.xyz;
|
return posonbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 computeForwardProbes(Surface surface,
|
float4 computeForwardProbes(Surface surface,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue