diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomInitSample.glsl b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomInitSample.glsl
index b5b1af001..a7fd9fe9c 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomInitSample.glsl
+++ b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomInitSample.glsl
@@ -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),
diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.glsl b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.glsl
index d15642652..2d14dd6bc 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.glsl
+++ b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.glsl
@@ -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;
}
diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.hlsl b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.hlsl
index 025c83740..d0e56ed5f 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.hlsl
+++ b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/bloomStrengthP.hlsl
@@ -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;
}
diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.glsl b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.glsl
index ea3d2c524..43e8a2f2e 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.glsl
+++ b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.glsl
@@ -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);
diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.hlsl b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.hlsl
index 99f219615..4da52c86f 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.hlsl
+++ b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.hlsl
@@ -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);
diff --git a/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript b/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript
index 78817ee5e..46182fc58 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript
+++ b/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript
@@ -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";
diff --git a/Templates/BaseGame/game/data/Prototyping/Materials/FloorGray.asset.taml b/Templates/BaseGame/game/data/Prototyping/Materials/FloorGray.asset.taml
index cbed018b2..4bbb20263 100644
--- a/Templates/BaseGame/game/data/Prototyping/Materials/FloorGray.asset.taml
+++ b/Templates/BaseGame/game/data/Prototyping/Materials/FloorGray.asset.taml
@@ -5,10 +5,12 @@
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/FloorGray.png">
+ mapTo="FloorGray"
+ originalAssetName="FloorGray">
+ DiffuseMapAsset="Prototyping:FloorGray_ALBEDO"
+ Roughness="0.2"/>
diff --git a/Templates/BaseGame/game/data/Prototyping/Materials/WallOrange.asset.taml b/Templates/BaseGame/game/data/Prototyping/Materials/WallOrange.asset.taml
index 7a90ebf4e..acccdaf30 100644
--- a/Templates/BaseGame/game/data/Prototyping/Materials/WallOrange.asset.taml
+++ b/Templates/BaseGame/game/data/Prototyping/Materials/WallOrange.asset.taml
@@ -5,10 +5,12 @@
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/WallOrange.png">
+ mapTo="WallOrange"
+ originalAssetName="WallOrange">
+ DiffuseMapAsset="Prototyping:WallOrange_ALBEDO"
+ Roughness="0.2"/>
diff --git a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.mis b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.mis
index 4b6d15dff..466e48cc7 100644
--- a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.mis
+++ b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.mis
@@ -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 ---
diff --git a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel/probes/289ad401-3140-11ed-aae8-c0cb519281fc_Irradiance.dds b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel/probes/289ad401-3140-11ed-aae8-c0cb519281fc_Irradiance.dds
new file mode 100644
index 000000000..73e2e246e
Binary files /dev/null and b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel/probes/289ad401-3140-11ed-aae8-c0cb519281fc_Irradiance.dds differ
diff --git a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel/probes/289ad401-3140-11ed-aae8-c0cb519281fc_Prefilter.dds b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel/probes/289ad401-3140-11ed-aae8-c0cb519281fc_Prefilter.dds
new file mode 100644
index 000000000..8aa59ceb1
Binary files /dev/null and b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel/probes/289ad401-3140-11ed-aae8-c0cb519281fc_Prefilter.dds differ
diff --git a/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.mis b/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.mis
index f053c79c5..8b2a8be28 100644
--- a/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.mis
+++ b/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.mis
@@ -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";