mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Merge branch 'TorqueGameEngines:development' into Skurpz/UI-Module-Fixes
This commit is contained in:
commit
d8db0859d4
36 changed files with 257 additions and 174 deletions
|
|
@ -46,7 +46,7 @@ $PostFX::HDRPostFX::colorFilter = "1.0 1.0 1.0";
|
|||
/// The minimum luninace value to allow when tone mapping
|
||||
/// the scene. Is particularly useful if your scene very
|
||||
/// dark or has a black ambient color in places.
|
||||
$PostFX::HDRPostFX::minLuminace = 0.001;
|
||||
$PostFX::HDRPostFX::minLuminace = 0.5;
|
||||
|
||||
/// The rate of adaptation from the previous and new
|
||||
/// average scene luminance.
|
||||
|
|
@ -241,7 +241,7 @@ singleton GFXStateBlockData( HDRStateBlock )
|
|||
|
||||
function HDRPostFX::setShaderConsts( %this )
|
||||
{
|
||||
%this.setShaderConst( "$g_fMiddleGray", $PostFX::HDRPostFX::keyValue );
|
||||
%this.setShaderConst( "$g_fMiddleGray", $PostFX::HDRPostFX::keyValue );
|
||||
|
||||
%minLuminace = $PostFX::HDRPostFX::minLuminace;
|
||||
if ( %minLuminace <= 0.0 )
|
||||
|
|
@ -357,17 +357,25 @@ function HDRPostFX::onEnabled( %this )
|
|||
// disable this postFx.
|
||||
GammaPostFX.disable();
|
||||
|
||||
if (%format $= %this.previousFormat)
|
||||
return true;
|
||||
|
||||
// Set the right global shader define for HDR.
|
||||
if ( %format $= "GFXFormatR10G10B10A2" )
|
||||
{
|
||||
addGlobalShaderMacro( "TORQUE_HDR_RGB10" );
|
||||
removeGlobalShaderMacro( "TORQUE_HDR_RGB16" );
|
||||
}
|
||||
else if ( %format $= "GFXFormatR16G16B16A16F" )
|
||||
{
|
||||
addGlobalShaderMacro( "TORQUE_HDR_RGB16" );
|
||||
|
||||
removeGlobalShaderMacro( "TORQUE_HDR_RGB10" );
|
||||
}
|
||||
echo( "HDR FORMAT: " @ %format );
|
||||
|
||||
// Change the format of the offscreen surface
|
||||
// to an HDR compatible format.
|
||||
%this.previousFormat = AL_FormatToken.format;
|
||||
%this.previousFormat = %format;
|
||||
setReflectFormat( %format );
|
||||
|
||||
// Reset the light manager which will ensure the new
|
||||
|
|
@ -390,10 +398,7 @@ function HDRPostFX::onDisabled( %this )
|
|||
// Restore the non-HDR offscreen surface format.
|
||||
%format = %this.previousFormat;
|
||||
AL_FormatToken.format = %format;
|
||||
setReflectFormat( %format );
|
||||
|
||||
removeGlobalShaderMacro( "TORQUE_HDR_RGB10" );
|
||||
removeGlobalShaderMacro( "TORQUE_HDR_RGB16" );
|
||||
setReflectFormat( %format );
|
||||
|
||||
// Reset the light manager which will ensure the new
|
||||
// hdr encoding takes effect in all the shaders.
|
||||
|
|
@ -565,9 +570,9 @@ function HDRPostFX::SetupBloomFX( %this )
|
|||
|
||||
singleton PostEffect( HDRPostFX )
|
||||
{
|
||||
enabled = false;
|
||||
enabled = true;
|
||||
allowReflectPass = false;
|
||||
|
||||
previousFormat = AL_FormatToken.format;
|
||||
// Resolve the HDR before we render any editor stuff
|
||||
// and before we resolve the scene to the backbuffer.
|
||||
renderTime = "PFXBeforeBin";
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ $PostFX::HDRPostFX::saturationValue = 1;
|
|||
$PostFX::HDRPostFX::colorFilter = "1.0 1.0 1.0";
|
||||
$PostFX::HDRPostFX::minLuminace = "0.5";
|
||||
$PostFX::HDRPostFX::whiteCutoff = 1;
|
||||
$PostFX::HDRPostFX::adaptRate = "0.134615391";
|
||||
$PostFX::HDRPostFX::adaptRate = "0.85";
|
||||
$PostFX::HDRPostFX::tonemapMode = "ACES";
|
||||
$PostFX::HDRPostFX::enableAutoExposure = "1";
|
||||
$PostFX::HDRPostFX::keyValue = 0.18;
|
||||
$PostFX::HDRPostFX::keyValue = 0.5;
|
||||
$PostFX::HDRPostFX::enableBloom = 1;
|
||||
$PostFX::HDRPostFX::threshold = 1;
|
||||
$PostFX::HDRPostFX::intensity = 1;
|
||||
|
|
|
|||
|
|
@ -71,4 +71,5 @@ function Core_Rendering::initClient(%this)
|
|||
// we can hide any splash screen we have, and show the canvas.
|
||||
// This keeps things looking nice, instead of having a blank window
|
||||
Canvas.showWindow();
|
||||
resetLightManager(); //make sure
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ function initRenderManager()
|
|||
// PostEffect copies the result to the backbuffer.
|
||||
new RenderFormatToken(AL_FormatToken)
|
||||
{
|
||||
enabled = "false";
|
||||
enabled = true;
|
||||
|
||||
//When hdr is enabled this will be changed to the appropriate format
|
||||
format = "GFXFormatR16G16B16A16F";
|
||||
|
|
@ -46,6 +46,9 @@ function initRenderManager()
|
|||
// provided in $inTex
|
||||
resolveEffect = "AL_FormatCopy";
|
||||
};
|
||||
addGlobalShaderMacro( "TORQUE_HDR_RGB16" );
|
||||
setReflectFormat( AL_FormatToken.format );
|
||||
|
||||
DiffuseRenderPassManager.addManager( new RenderPassStateBin() { renderOrder = 0.001; stateToken = AL_FormatToken; } );
|
||||
|
||||
DiffuseRenderPassManager.addManager( new RenderProbeMgr(ProbeBin) { bintype = "Probes"; renderOrder = 0.019; processAddOrder = 0.019; } );
|
||||
|
|
@ -119,7 +122,7 @@ singleton PostEffect( AL_FormatCopy )
|
|||
{
|
||||
// This PostEffect is used by 'AL_FormatToken' directly. It is never added to
|
||||
// the PostEffectManager. Do not call enable() on it.
|
||||
enabled = false;
|
||||
enabled = true;
|
||||
allowReflectPass = true;
|
||||
|
||||
shader = PFX_PassthruShader;
|
||||
|
|
|
|||
|
|
@ -226,9 +226,11 @@ float getDistanceAtt( vec3 unormalizedLightVector , float invSqrAttRadius )
|
|||
|
||||
vec3 evaluateStandardBRDF(Surface surface, SurfaceToLight surfaceToLight)
|
||||
{
|
||||
if (surface.depth >= 0.9999f)
|
||||
return float3(0.0,0.0,0.0);
|
||||
|
||||
// Compute Fresnel term
|
||||
vec3 F = F_Schlick(surface.f0, surfaceToLight.HdotV);
|
||||
F += lerp(vec3(0.04f,0.04f,0.04f), surface.baseColor.rgb, surface.metalness);
|
||||
|
||||
// GGX Normal Distribution Function
|
||||
float D = D_GGX(surfaceToLight.NdotH, surface.linearRoughness);
|
||||
|
|
@ -594,7 +596,7 @@ vec4 computeForwardProbes(Surface surface,
|
|||
|
||||
vec2 envBRDF = textureLod(BRDFTexture, vec2(surface.NdotV, surface.roughness),0).rg;
|
||||
vec3 diffuse = irradiance * lerp(surface.baseColor.rgb, vec3(0.04f,0.04f,0.04f), surface.metalness);
|
||||
vec3 specularCol = ((specular * surface.baseColor.rgb) * envBRDF.x + envBRDF.y)*surface.metalness;
|
||||
vec3 specularCol = ((specular * surface.f0) * envBRDF.x + envBRDF.y)*surface.metalness;
|
||||
|
||||
float horizonOcclusion = 1.3;
|
||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||
|
|
@ -608,7 +610,8 @@ vec4 computeForwardProbes(Surface surface,
|
|||
return vec4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),0);
|
||||
else
|
||||
{
|
||||
return vec4(finalColor, 0);
|
||||
float reflectionOpacity = min(surface.baseColor.a+surface.baseColor.a*length(finalColor),1.0);
|
||||
return vec4(finalColor, reflectionOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -226,9 +226,11 @@ float getDistanceAtt( float3 unormalizedLightVector , float invSqrAttRadius )
|
|||
|
||||
float3 evaluateStandardBRDF(Surface surface, SurfaceToLight surfaceToLight)
|
||||
{
|
||||
if (surface.depth >= 0.9999f)
|
||||
return float3(0.0,0.0,0.0);
|
||||
|
||||
// Compute Fresnel term
|
||||
float3 F = F_Schlick(surface.f0, surfaceToLight.HdotV);
|
||||
F += lerp(0.04f, surface.baseColor.rgb, surface.metalness);
|
||||
|
||||
// GGX Normal Distribution Function
|
||||
float D = D_GGX(surfaceToLight.NdotH, surface.linearRoughness);
|
||||
|
|
@ -599,7 +601,7 @@ float4 computeForwardProbes(Surface surface,
|
|||
|
||||
float2 envBRDF = TORQUE_TEX2DLOD(BRDFTexture, float4(surface.NdotV, surface.roughness,0,0)).rg;
|
||||
float3 diffuse = irradiance * lerp(surface.baseColor.rgb, 0.04f, surface.metalness);
|
||||
float3 specularCol = ((specular * surface.baseColor.rgb) * envBRDF.x + envBRDF.y)*surface.metalness;
|
||||
float3 specularCol = ((specular * surface.f0) * envBRDF.x + envBRDF.y)*surface.metalness;
|
||||
|
||||
float horizonOcclusion = 1.3;
|
||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||
|
|
@ -613,7 +615,8 @@ float4 computeForwardProbes(Surface surface,
|
|||
return float4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),0);
|
||||
else
|
||||
{
|
||||
return float4(finalColor, 0);
|
||||
float reflectionOpacity = min(surface.baseColor.a+surface.baseColor.a*length(finalColor),1.0);
|
||||
return float4(finalColor, reflectionOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@
|
|||
DecalsFile="@assetFile=ExampleLevel.mis.decals"
|
||||
ForestFile="@assetFile=ExampleLevel.forest"
|
||||
NavmeshFile="@assetFile=ExampleLevel.nav"
|
||||
gameModesNames="ExampleGameMode"
|
||||
staticObjectAssetDependency0="@asset=Prototyping:FloorGray"
|
||||
gameModesNames="ExampleGameMode;"
|
||||
VersionId="1"/>
|
||||
|
|
|
|||
|
|
@ -1,82 +1,72 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
new Scene(ExampleLevel) {
|
||||
Enabled = "1";
|
||||
gameModes="ExampleGameMode";
|
||||
isEditing = "1";
|
||||
gameModes = "ExampleGameMode";
|
||||
enabled = "1";
|
||||
|
||||
new LevelInfo(theLevelInfo) {
|
||||
fogColor = "0.6 0.6 0.7 1";
|
||||
FogColor = "0.6 0.6 0.7 1";
|
||||
fogDensityOffset = "700";
|
||||
canvasClearColor = "0 0 0 255";
|
||||
ambientLightBlendCurve = "2.69146e+20 0";
|
||||
soundAmbience = "AudioAmbienceDefault";
|
||||
advancedLightmapSupport = "0";
|
||||
Enabled = "1";
|
||||
advancedLightmapSupport = "0";
|
||||
enabled = "1";
|
||||
};
|
||||
new SkyBox(theSky) {
|
||||
MaterialAsset = "Core_Rendering:BlankSkyMat";
|
||||
drawBottom = "0";
|
||||
dirtyGameObject = "0";
|
||||
dirtyGameObject = "0";
|
||||
};
|
||||
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 = "2";
|
||||
texSize = "2048";
|
||||
overDarkFactor = "3000 1500 750 250";
|
||||
shadowDistance = "200";
|
||||
shadowSoftness = "0.25";
|
||||
logWeight = "0.9";
|
||||
fadeStartDistance = "0";
|
||||
bias = "0.1";
|
||||
Blur = "1";
|
||||
dirtyGameObject = "0";
|
||||
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";
|
||||
bias = "0.1";
|
||||
Blur = "1";
|
||||
dirtyGameObject = "0";
|
||||
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";
|
||||
};
|
||||
new GroundPlane() {
|
||||
scaleU = "25";
|
||||
scaleV = "25";
|
||||
MaterialAsset = "Prototyping:FloorGray";
|
||||
dirtyGameObject = "0";
|
||||
Enabled = "1";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
dirtyGameObject = "0";
|
||||
enabled = "1";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
};
|
||||
new Skylight() {
|
||||
position = "1.37009 -5.23561 46.5817";
|
||||
persistentId = "d5eb3afb-dced-11e9-a423-bb0e346e3870";
|
||||
dirtyGameObject = "0";
|
||||
dirtyGameObject = "0";
|
||||
};
|
||||
|
||||
new SimGroup(CameraSpawnPoints) {
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
enabled = "1";
|
||||
|
||||
new SpawnSphere(DefaultCameraSpawnSphere) {
|
||||
autoSpawn = "0";
|
||||
spawnTransform = "0";
|
||||
radius = "1";
|
||||
sphereWeight = "1";
|
||||
indoorWeight = "1";
|
||||
outdoorWeight = "1";
|
||||
isAIControlled = "0";
|
||||
dataBlock = "SpawnSphereMarker";
|
||||
position = "0 0 10";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
enabled = "1";
|
||||
homingCount = "0";
|
||||
lockCount = "0";
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ $PostFX::HDRPostFX::whitePoint = 1;
|
|||
$PostFX::HDRPostFX::logContrast = 1;
|
||||
$PostFX::HDRPostFX::saturationValue = 1;
|
||||
$PostFX::HDRPostFX::colorFilter = "1.0 1.0 1.0";
|
||||
$PostFX::HDRPostFX::minLuminace = 0.001;
|
||||
$PostFX::HDRPostFX::minLuminace = 0.5;
|
||||
$PostFX::HDRPostFX::whiteCutoff = 1;
|
||||
$PostFX::HDRPostFX::adaptRate = 2;
|
||||
$PostFX::HDRPostFX::adaptRate = "0.85";
|
||||
$PostFX::HDRPostFX::tonemapMode = "ACES";
|
||||
$PostFX::HDRPostFX::enableAutoExposure = "0";
|
||||
$PostFX::HDRPostFX::keyValue = 0.18;
|
||||
$PostFX::HDRPostFX::keyValue = 0.5;
|
||||
$PostFX::HDRPostFX::enableBloom = 1;
|
||||
$PostFX::HDRPostFX::threshold = 1;
|
||||
$PostFX::HDRPostFX::intensity = 1;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -14,7 +14,7 @@ $PostFXManager::Settings::EnableLightRays = "1";
|
|||
$PostFXManager::Settings::EnablePostFX = "1";
|
||||
$PostFXManager::Settings::EnableSSAO = "1";
|
||||
$PostFXManager::Settings::EnableVignette = "1";
|
||||
$PostFXManager::Settings::HDR::adaptRate = "2";
|
||||
$PostFXManager::Settings::HDR::adaptRate = "0.85";
|
||||
$PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27";
|
||||
$PostFXManager::Settings::HDR::brightPassThreshold = "1";
|
||||
$PostFXManager::Settings::HDR::enableBloom = "1";
|
||||
|
|
@ -23,7 +23,7 @@ $PostFXManager::Settings::HDR::enableToneMapping = "0.5";
|
|||
$PostFXManager::Settings::HDR::gaussMean = "0";
|
||||
$PostFXManager::Settings::HDR::gaussMultiplier = "0.3";
|
||||
$PostFXManager::Settings::HDR::gaussStdDev = "0.8";
|
||||
$PostFXManager::Settings::HDR::keyValue = "0.117347";
|
||||
$PostFXManager::Settings::HDR::keyValue = "0.5";
|
||||
$PostFXManager::Settings::HDR::minLuminace = "0.0459184";
|
||||
$PostFXManager::Settings::HDR::whiteCutoff = "1";
|
||||
$PostFXManager::Settings::LightRays::brightScalar = "0.75";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $PostFXManager::Settings::EnableLightRays = "1";
|
|||
$PostFXManager::Settings::EnablePostFX = "1";
|
||||
$PostFXManager::Settings::EnableSSAO = "1";
|
||||
$PostFXManager::Settings::EnableVignette = "1";
|
||||
$PostFXManager::Settings::HDR::adaptRate = "2";
|
||||
$PostFXManager::Settings::HDR::adaptRate = "0.85";
|
||||
$PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27";
|
||||
$PostFXManager::Settings::HDR::brightPassThreshold = "1";
|
||||
$PostFXManager::Settings::HDR::enableBloom = "1";
|
||||
|
|
@ -23,7 +23,7 @@ $PostFXManager::Settings::HDR::enableToneMapping = "0.5";
|
|||
$PostFXManager::Settings::HDR::gaussMean = "0";
|
||||
$PostFXManager::Settings::HDR::gaussMultiplier = "0.3";
|
||||
$PostFXManager::Settings::HDR::gaussStdDev = "0.8";
|
||||
$PostFXManager::Settings::HDR::keyValue = "0.117347";
|
||||
$PostFXManager::Settings::HDR::keyValue = "0.5";
|
||||
$PostFXManager::Settings::HDR::minLuminace = "0.0459184";
|
||||
$PostFXManager::Settings::HDR::whiteCutoff = "1";
|
||||
$PostFXManager::Settings::LightRays::brightScalar = "0.75";
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "800 40";
|
||||
Extent = "800 36";
|
||||
MinExtent = "8 8";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -1470,7 +1470,7 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
|
|||
internalName = "AggregateControl";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 60";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
visible = "0";
|
||||
|
|
@ -1478,8 +1478,8 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
|
|||
class = "EditorDropdownSliderContainer";
|
||||
|
||||
new GuiContainer(){
|
||||
position = firstWord(CameraSpeedDropdownContainer.position) + firstWord(EditorGuiToolbar.position) + -6 SPC
|
||||
(getWord(CameraSpeedDropdownContainer, 1)) + 31;
|
||||
internalName = "container";
|
||||
position = "0 0";
|
||||
extent = "146 39";
|
||||
isContainer = "1";
|
||||
Profile = "IconDropdownProfile";
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ $guiContent = new GuiControl() {
|
|||
VertSizing = "windowRelative";
|
||||
Extent = "36 24";
|
||||
MinExtent = "36 24";
|
||||
Position = "-1 73";
|
||||
Position = "0 64";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $guiContent = new GuiContainer(EWToolsToolbar) {
|
|||
Profile = "ToolsMenubarProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 38";
|
||||
Position = "0 30";
|
||||
Extent = "0 33";
|
||||
MinExtent = "8 34";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -3359,11 +3359,11 @@ function TerrainSetHeightSliderCtrlContainer::onWake(%this)
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
function CameraSpeedDropdownContainer::onWake(%this)
|
||||
function CameraSpeedDropdownCtrlContainer::onWake(%this)
|
||||
{
|
||||
%this-->slider.setValue(CameraSpeedDropdownCtrlContainer-->textEdit.getText());
|
||||
%pos = CameraSpeedDropdownCtrlContainer.getGlobalPosition();
|
||||
%this-->slider.setPositionGlobal(%pos.x, %pos.y + 25);
|
||||
%this-->slider.setValue(CameraSpeedDropdownContainer-->textEdit.getText());
|
||||
%pos = CameraSpeedDropdownContainer.getGlobalPosition();
|
||||
%this-->container.setPositionGlobal(%pos.x, %pos.y + 25);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue