From c680471378ddf4ed6342de56d12482a457d06f06 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Fri, 20 Sep 2019 14:45:05 -0500 Subject: [PATCH] looks like the with the latest translucnency work, dynamic shadows are no longer triggering malformed values in forward lit materials, so flipped that back on --- Engine/source/T3D/lightBase.cpp | 2 +- Engine/source/T3D/lightDescription.cpp | 4 ++-- Engine/source/environment/scatterSky.cpp | 4 ++-- Engine/source/environment/sun.cpp | 2 +- Engine/source/lighting/shadowMap/lightShadowMap.cpp | 3 +-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Engine/source/T3D/lightBase.cpp b/Engine/source/T3D/lightBase.cpp index 007f2ca32..2ba181fbd 100644 --- a/Engine/source/T3D/lightBase.cpp +++ b/Engine/source/T3D/lightBase.cpp @@ -99,7 +99,7 @@ void LightBase::initPersistFields() addField( "brightness", TypeF32, Offset( mBrightness, LightBase ), "Adjusts the lights power, 0 being off completely." ); addField( "castShadows", TypeBool, Offset( mCastShadows, LightBase ), "Enables/disabled shadow casts by this light." ); addField( "staticRefreshFreq", TypeS32, Offset( mStaticRefreshFreq, LightBase ), "static shadow refresh rate (milliseconds)" ); - addField( "dynamicRefreshFreq", TypeS32, Offset( mDynamicRefreshFreq, LightBase ), "dynamic shadow refresh rate (milliseconds)", AbstractClassRep::FieldFlags::FIELD_HideInInspectors); + addField( "dynamicRefreshFreq", TypeS32, Offset( mDynamicRefreshFreq, LightBase ), "dynamic shadow refresh rate (milliseconds)"); addField( "priority", TypeF32, Offset( mPriority, LightBase ), "Used for sorting of lights by the light manager. " "Priority determines if a light has a stronger effect than, those with a lower value" ); diff --git a/Engine/source/T3D/lightDescription.cpp b/Engine/source/T3D/lightDescription.cpp index 02076d0be..cf326a9fe 100644 --- a/Engine/source/T3D/lightDescription.cpp +++ b/Engine/source/T3D/lightDescription.cpp @@ -97,7 +97,7 @@ void LightDescription::initPersistFields() addField( "range", TypeF32, Offset( range, LightDescription ), "Controls the size (radius) of the light" ); addField( "castShadows", TypeBool, Offset( castShadows, LightDescription ), "Enables/disabled shadow casts by this light." ); addField( "staticRefreshFreq", TypeS32, Offset( mStaticRefreshFreq, LightDescription ), "static shadow refresh rate (milliseconds)" ); - addField( "dynamicRefreshFreq", TypeS32, Offset( mDynamicRefreshFreq, LightDescription ), "dynamic shadow refresh rate (milliseconds)", AbstractClassRep::FieldFlags::FIELD_HideInInspectors); + addField( "dynamicRefreshFreq", TypeS32, Offset( mDynamicRefreshFreq, LightDescription ), "dynamic shadow refresh rate (milliseconds)"); endGroup( "Light" ); @@ -278,4 +278,4 @@ DefineEngineMethod( LightDescription, apply, void, (),, //ConsoleMethod( LightDescription, apply, void, 2, 2, "force an inspectPostApply for the benefit of tweaking via the console" ) //{ // object->inspectPostApply(); -//} \ No newline at end of file +//} diff --git a/Engine/source/environment/scatterSky.cpp b/Engine/source/environment/scatterSky.cpp index 3220c46d1..a9ae50cf0 100644 --- a/Engine/source/environment/scatterSky.cpp +++ b/Engine/source/environment/scatterSky.cpp @@ -379,7 +379,7 @@ void ScatterSky::initPersistFields() "Enables/disables shadows cast by objects due to ScatterSky light." ); addField("staticRefreshFreq", TypeS32, Offset(mStaticRefreshFreq, ScatterSky), "static shadow refresh rate (milliseconds)"); - addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, ScatterSky), "dynamic shadow refresh rate (milliseconds)", AbstractClassRep::FieldFlags::FIELD_HideInInspectors); + addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, ScatterSky), "dynamic shadow refresh rate (milliseconds)"); addField( "brightness", TypeF32, Offset( mBrightness, ScatterSky ), "The brightness of the ScatterSky's light object." ); @@ -1451,4 +1451,4 @@ DefineEngineMethod( ScatterSky, applyChanges, void, (),, ) { object->inspectPostApply(); -} \ No newline at end of file +} diff --git a/Engine/source/environment/sun.cpp b/Engine/source/environment/sun.cpp index 7063e1a27..ca80889c5 100644 --- a/Engine/source/environment/sun.cpp +++ b/Engine/source/environment/sun.cpp @@ -168,7 +168,7 @@ void Sun::initPersistFields() "Enables/disables shadows cast by objects due to Sun light"); addField("staticRefreshFreq", TypeS32, Offset(mStaticRefreshFreq, Sun), "static shadow refresh rate (milliseconds)"); - addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, Sun), "dynamic shadow refresh rate (milliseconds)", AbstractClassRep::FieldFlags::FIELD_HideInInspectors); + addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, Sun), "dynamic shadow refresh rate (milliseconds)"); endGroup( "Lighting" ); diff --git a/Engine/source/lighting/shadowMap/lightShadowMap.cpp b/Engine/source/lighting/shadowMap/lightShadowMap.cpp index c59707519..1806aa65b 100644 --- a/Engine/source/lighting/shadowMap/lightShadowMap.cpp +++ b/Engine/source/lighting/shadowMap/lightShadowMap.cpp @@ -316,11 +316,10 @@ void LightShadowMap::render(RenderPassManager* renderPass, } mStaticRefreshTimer->reset(); - /* TODO: find out why this is causing issue with translucent objects + if (_dynamic && (mDynamicRefreshTimer->getElapsedMs() < getLightInfo()->getDynamicRefreshFreq())) return; mDynamicRefreshTimer->reset(); - */ mDebugTarget.setTexture( NULL ); _render( renderPass, diffuseState );