Updated default levels and pre-exposed ACES Tonemapper

This commit is contained in:
vvv-yeaf 2022-09-11 10:37:55 -03:00
parent 7035a4a709
commit 1212e72d11
12 changed files with 95 additions and 167 deletions

View file

@ -24,9 +24,9 @@
#include "core/rendering/shaders/postFX/gl/postFx.glsl"
#include "core/rendering/shaders/gl/torque.glsl"
#include "shadergen:/autogenConditioners.h"
#line 27
#define KERNEL_SAMPLES 4
const vec2 KERNEL[9] = vec2[](
const vec2 KERNEL[KERNEL_SAMPLES] = vec2[](
vec2( 0.5, 0.5),
vec2( 0.5,-0.5),
vec2(-0.5,-0.5),

View file

@ -39,7 +39,7 @@ uniform vec3 edgeParams;
uniform vec2 oneOverTargetSize;
out vec4 OUT_col;
void main()
{
#ifdef USE_DIRT
@ -54,5 +54,5 @@ void main()
upSample.rgb += upSample.rgb * dirt;
#endif
OUT_col = max(upSample, 0.0);
OUT_col = max(upSample, 0.0)/M_PI_F;
}

View file

@ -46,7 +46,7 @@ float4 main(PFXVertToPix IN) : TORQUE_TARGET0
#ifdef USE_DIRT
upSample.rgb += upSample.rgb * dirt;
#endif
return max(upSample, 0.0f);
#endif
return max(upSample, 0.0f)/M_PI_F;
}

View file

@ -59,11 +59,11 @@ out vec4 OUT_col;
vec3 Tonemap(vec3 x)
{
{
//ACES
if(g_fTonemapMode == 1.0f)
{
x = ACESFitted(x, whitePoint);
{
x = ACESFitted(x, whitePoint) * 1.4f; //ACES is crushing our blacks, need to pre-expose!
}
//Filmic Helji
if(g_fTonemapMode == 2.0f)
@ -102,8 +102,8 @@ void main()
// Add the bloom effect.
_sample += bloom;
_sample += bloom;
//Apply Exposure
_sample.rgb *= TO_Exposure(_sample.rgb, exposureValue, colorFilter);

View file

@ -51,14 +51,15 @@ uniform float logContrast;
uniform float brightnessValue;
uniform float saturationValue;
uniform float3 colorFilter;
float3 Tonemap(float3 x)
{
//ACES
{
//ACES
if(g_fTonemapMode == 1.0f)
{
x = ACESFitted(x, whitePoint);
}
{
x = ACESFitted(x, whitePoint) * 1.4f; //ACES is crushing our blacks, need to pre-expose!
}
//Filmic Helji
if(g_fTonemapMode == 2.0f)
{
@ -95,7 +96,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
// Add the bloom effect.
sample += bloom;
//Apply Exposure
sample.rgb *= TO_Exposure(sample.rgb, exposureValue, colorFilter);

View file

@ -1,22 +1,27 @@
$PostFX::HDRPostFX::brightPassThreshold = "0.02";
$PostFX::HDRPostFX::gaussMultiplier = "0.4";
$PostFX::HDRPostFX::Enabled = 1;
$PostFX::HDRPostFX::exposureValue = "1.5";
$PostFX::HDRPostFX::whitePoint = "4";
$PostFX::HDRPostFX::logContrast = 1;
$PostFX::HDRPostFX::saturationValue = "1";
$PostFX::HDRPostFX::colorFilter = "1 1 1 1";
$PostFX::HDRPostFX::minLuminace = 0.001;
$PostFX::HDRPostFX::whiteCutoff = 1;
$PostFX::HDRPostFX::adaptRate = "0.8";
$PostFX::HDRPostFX::tonemapMode = "ACES";
$PostFX::HDRPostFX::enableAutoExposure = "1";
$PostFX::HDRPostFX::keyValue = "0.115";
$PostFX::SSAOPostFx::Enabled = 1;
$PostFX::SSAOPostFX::quality = "2";
$PostFX::SSAOPostFX::sRadius = 0.1;
$PostFX::SSAOPostFX::sStrength = 6;
$PostFX::SSAOPostFX::sDepthMin = 0.1;
$PostFX::SSAOPostFX::sDepthMax = 1;
$PostFX::SSAOPostFX::sNormalTol = 0;
$PostFX::SSAOPostFX::sNormalPow = 1;
$PostFX::SSAOPostFX::lRadius = 1;
$PostFX::SSAOPostFX::lStrength = 10;
$PostFX::SSAOPostFX::lDepthMin = 0.2;
$PostFX::SSAOPostFX::lDepthMax = 2;
$PostFX::SSAOPostFX::lNormalTol = -0.5;
$PostFX::SSAOPostFX::lNormalPow = 2;
$PostFX::HDRPostFX::enableBloom = "1";
$PostFX::HDRPostFX::threshold = "0.3";
$PostFX::HDRPostFX::intensity = "0.5";
$PostFX::HDRPostFX::radius = "5";
$PostFX::HDRPostFX::enableDirt = 1;
$PostFX::HDRPostFX::dirtScale = 2048;
$PostFX::HDRPostFX::dirtIntensity = 2;
$PostFX::HDRPostFX::dirtImage = "core/postFX/images/lensDirt.png";
$PostFX::HDRPostFX::dirtEdgeMinDist = 0.125;
$PostFX::HDRPostFX::dirtEdgeMaxDist = 0.75;
$PostFX::HDRPostFX::dirtEdgeMinVal = 0.05;
$PostFX::VignettePostFX::Enabled = "1";
$PostFX::VignettePostFX::VMin = "0.25";
$PostFX::VignettePostFX::VMax = "0.8";
$PostFX::VignettePostFX::VMin = 0.2;
$PostFX::VignettePostFX::VMax = "0.9";
$PostFX::VignettePostFX::Color = "0 0 0 1";