mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Updated default levels and pre-exposed ACES Tonemapper
This commit is contained in:
parent
7035a4a709
commit
309138699b
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,10 +59,11 @@ out vec4 OUT_col;
|
|||
|
||||
|
||||
vec3 Tonemap(vec3 x)
|
||||
{
|
||||
{
|
||||
//ACES
|
||||
if(g_fTonemapMode == 1.0f)
|
||||
{
|
||||
x *= 2.0f; //ACES is crushing our blacks, need to pre-expose!
|
||||
x = ACESFitted(x, whitePoint);
|
||||
}
|
||||
//Filmic Helji
|
||||
|
|
@ -102,8 +103,8 @@ void main()
|
|||
|
||||
|
||||
// Add the bloom effect.
|
||||
_sample += bloom;
|
||||
|
||||
_sample += bloom;
|
||||
|
||||
//Apply Exposure
|
||||
_sample.rgb *= TO_Exposure(_sample.rgb, exposureValue, colorFilter);
|
||||
|
||||
|
|
|
|||
|
|
@ -53,12 +53,13 @@ uniform float saturationValue;
|
|||
uniform float3 colorFilter;
|
||||
|
||||
float3 Tonemap(float3 x)
|
||||
{
|
||||
//ACES
|
||||
{
|
||||
//ACES
|
||||
if(g_fTonemapMode == 1.0f)
|
||||
{
|
||||
x = ACESFitted(x, whitePoint);
|
||||
}
|
||||
{
|
||||
x *= 2.0; //ACES is crushing our blacks, need to pre-expose!
|
||||
x = ACESFitted(x, whitePoint);
|
||||
}
|
||||
//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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -22,84 +22,38 @@ new Scene(EditorTemplateLevel) {
|
|||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
};
|
||||
new SkyBox(theSky) {
|
||||
Material = "BlankSkyMat";
|
||||
drawBottom = "0";
|
||||
fogBandHeight = "0";
|
||||
dirtyGameObject = "0";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
new Sun(theSun) {
|
||||
azimuth = "230.396";
|
||||
elevation = "45";
|
||||
color = "0.968628 0.901961 0.901961 1";
|
||||
ambient = "0.337255 0.533333 0.619608 1";
|
||||
brightness = "1";
|
||||
castShadows = "1";
|
||||
coronaEnabled = "1";
|
||||
coronaScale = "0.5";
|
||||
coronaTint = "1 1 1 1";
|
||||
coronaUseLightColor = "1";
|
||||
flareScale = "1";
|
||||
attenuationRatio = "0 1 1";
|
||||
shadowType = "PSSM";
|
||||
texSize = "2048";
|
||||
overDarkFactor = "3000 1500 750 250";
|
||||
shadowDistance = "200";
|
||||
shadowSoftness = "0.25";
|
||||
numSplits = "4";
|
||||
new ScatterSky(DynamicSky) {
|
||||
sunScale = "0.991102 0.921582 0.83077 1";
|
||||
zOffset = "-3000";
|
||||
azimuth = "25";
|
||||
brightness = "5";
|
||||
flareType = "LightFlareExample1";
|
||||
MoonMatAsset = "Core_Rendering:moon_wglow";
|
||||
useNightCubemap = "1";
|
||||
nightCubemap = "nightCubemap";
|
||||
logWeight = "0.9";
|
||||
fadeStartDistance = "0";
|
||||
lastSplitTerrainOnly = "0";
|
||||
representedInLightmap = "0";
|
||||
shadowDarkenColor = "0 0 0 -1";
|
||||
includeLightmappedGeometryInShadow = "0";
|
||||
dirtyGameObject = "0";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
bias = "0.1";
|
||||
Blur = "1";
|
||||
dynamicRefreshFreq = "8";
|
||||
Enabled = "1";
|
||||
height = "1024";
|
||||
lightBleedFactor = "0.8";
|
||||
minVariance = "0";
|
||||
pointShadowType = "PointShadowType_Paraboloid";
|
||||
shadowBox = "-100 -100 -100 100 100 100";
|
||||
splitFadeDistances = "1 1 1 1";
|
||||
staticRefreshFreq = "250";
|
||||
width = "3072";
|
||||
mieScattering = "0.0045";
|
||||
};
|
||||
new CloudLayer(SkyClouds) {
|
||||
TextureAsset = "Core_Rendering:clouds_normal_displacement_image";
|
||||
coverage = "0.25";
|
||||
windSpeed = "0.5";
|
||||
height = "6";
|
||||
};
|
||||
new Skylight(SkyAmbient) {
|
||||
persistentId = "289ad401-3140-11ed-aae8-c0cb519281fc";
|
||||
reflectionPath = "tools/levels/DefaultEditorLevel/probes/";
|
||||
};
|
||||
|
||||
new GroundPlane() {
|
||||
squareSize = "128";
|
||||
scaleU = "25";
|
||||
scaleV = "25";
|
||||
scaleU = "32";
|
||||
scaleV = "32";
|
||||
MaterialAsset = "Prototyping:FloorGray";
|
||||
dirtyGameObject = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
};
|
||||
new Skylight() {
|
||||
Enabled = "1";
|
||||
ReflectionMode = "Baked Cubemap";
|
||||
dirtyGameObject = "0";
|
||||
position = "1.37009 -5.23561 46.5817";
|
||||
rotation = "1 0 0 0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
persistentId = "d5eb3afb-dced-11e9-a423-bb0e346e3870";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -22,71 +22,35 @@ new Scene(EditorTemplateLevel) {
|
|||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
};
|
||||
new SkyBox(theSky) {
|
||||
Material = "BlankSkyMat";
|
||||
drawBottom = "0";
|
||||
fogBandHeight = "0";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
new Sun(theSun) {
|
||||
azimuth = "230.396";
|
||||
elevation = "45";
|
||||
color = "0.968628 0.901961 0.901961 1";
|
||||
ambient = "0.337255 0.533333 0.619608 1";
|
||||
brightness = "1";
|
||||
castShadows = "1";
|
||||
staticRefreshFreq = "250";
|
||||
dynamicRefreshFreq = "8";
|
||||
coronaEnabled = "1";
|
||||
coronaScale = "0.5";
|
||||
coronaTint = "1 1 1 1";
|
||||
coronaUseLightColor = "1";
|
||||
flareScale = "1";
|
||||
attenuationRatio = "0 1 1";
|
||||
shadowType = "PSSM";
|
||||
texSize = "2048";
|
||||
overDarkFactor = "3000 1500 750 250";
|
||||
shadowDistance = "200";
|
||||
shadowSoftness = "0.25";
|
||||
numSplits = "4";
|
||||
new ScatterSky(DynamicSky) {
|
||||
sunScale = "0.991102 0.921582 0.83077 1";
|
||||
zOffset = "-3000";
|
||||
azimuth = "25";
|
||||
brightness = "5";
|
||||
flareType = "LightFlareExample1";
|
||||
MoonMatAsset = "Core_Rendering:moon_wglow";
|
||||
useNightCubemap = "1";
|
||||
nightCubemap = "nightCubemap";
|
||||
logWeight = "0.9";
|
||||
fadeStartDistance = "0";
|
||||
lastSplitTerrainOnly = "0";
|
||||
representedInLightmap = "0";
|
||||
shadowDarkenColor = "0 0 0 -1";
|
||||
includeLightmappedGeometryInShadow = "0";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
bias = "0.1";
|
||||
Blur = "1";
|
||||
Enabled = "1";
|
||||
height = "1024";
|
||||
lightBleedFactor = "0.8";
|
||||
minVariance = "0";
|
||||
pointShadowType = "PointShadowType_Paraboloid";
|
||||
shadowBox = "-100 -100 -100 100 100 100";
|
||||
splitFadeDistances = "1 1 1 1";
|
||||
width = "3072";
|
||||
mieScattering = "0.0045";
|
||||
};
|
||||
new CloudLayer(SkyClouds) {
|
||||
TextureAsset = "Core_Rendering:clouds_normal_displacement_image";
|
||||
coverage = "0.25";
|
||||
windSpeed = "0.5";
|
||||
height = "6";
|
||||
};
|
||||
|
||||
new GroundPlane() {
|
||||
squareSize = "128";
|
||||
scaleU = "25";
|
||||
scaleV = "25";
|
||||
Material = "Prototyping:FloorGray";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
scaleU = "32";
|
||||
scaleV = "32";
|
||||
MaterialAsset = "Prototyping:FloorGray";
|
||||
Enabled = "1";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
};
|
||||
|
||||
new Skylight() {
|
||||
Enabled = "1";
|
||||
ReflectionMode = "Baked Cubemap";
|
||||
|
|
|
|||
Loading…
Reference in a new issue