mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #2170 from chaigler/BL_remove_fix
Fixes for compiling without Basic Lighting
This commit is contained in:
commit
d784228f32
4 changed files with 27 additions and 3 deletions
|
|
@ -39,6 +39,9 @@
|
||||||
#include "gfx/gfxCardProfile.h"
|
#include "gfx/gfxCardProfile.h"
|
||||||
#include "gfx/gfxTextureProfile.h"
|
#include "gfx/gfxTextureProfile.h"
|
||||||
|
|
||||||
|
#ifndef TORQUE_BASIC_LIGHTING
|
||||||
|
F32 AdvancedLightManager::smProjectedShadowFilterDistance = 40.0f;
|
||||||
|
#endif
|
||||||
|
|
||||||
ImplementEnumType( ShadowType,
|
ImplementEnumType( ShadowType,
|
||||||
"\n\n"
|
"\n\n"
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,10 @@ public:
|
||||||
|
|
||||||
LightShadowMap* findShadowMapForObject( SimObject *object );
|
LightShadowMap* findShadowMapForObject( SimObject *object );
|
||||||
|
|
||||||
|
#ifndef TORQUE_BASIC_LIGHTING
|
||||||
|
static F32 getShadowFilterDistance() { return smProjectedShadowFilterDistance; }
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// LightManager
|
// LightManager
|
||||||
|
|
@ -138,6 +142,12 @@ protected:
|
||||||
|
|
||||||
LightingShaderConstants* getLightingShaderConstants(GFXShaderConstBuffer* shader);
|
LightingShaderConstants* getLightingShaderConstants(GFXShaderConstBuffer* shader);
|
||||||
|
|
||||||
|
#ifndef TORQUE_BASIC_LIGHTING
|
||||||
|
/// This is used to determine the distance
|
||||||
|
/// at which the shadow filtering PostEffect
|
||||||
|
/// will be enabled for ProjectedShadow.
|
||||||
|
static F32 smProjectedShadowFilterDistance;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _ADVANCEDLIGHTMANAGER_H_
|
#endif // _ADVANCEDLIGHTMANAGER_H_
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,11 @@
|
||||||
#include "materials/materialFeatureTypes.h"
|
#include "materials/materialFeatureTypes.h"
|
||||||
#include "console/console.h"
|
#include "console/console.h"
|
||||||
#include "postFx/postEffect.h"
|
#include "postFx/postEffect.h"
|
||||||
#include "lighting/basic/basicLightManager.h"
|
#ifdef TORQUE_BASIC_LIGHTING
|
||||||
|
#include "lighting/basic/basicLightManager.h"
|
||||||
|
#else
|
||||||
|
#include "lighting/advanced/advancedLightManager.h"
|
||||||
|
#endif
|
||||||
#include "lighting/shadowMap/shadowMatHook.h"
|
#include "lighting/shadowMap/shadowMatHook.h"
|
||||||
#include "materials/materialManager.h"
|
#include "materials/materialManager.h"
|
||||||
#include "lighting/shadowMap/lightShadowMap.h"
|
#include "lighting/shadowMap/lightShadowMap.h"
|
||||||
|
|
@ -529,8 +533,12 @@ void ProjectedShadow::_renderToTexture( F32 camDist, const TSRenderState &rdata
|
||||||
mRenderTarget->resolve();
|
mRenderTarget->resolve();
|
||||||
GFX->popActiveRenderTarget();
|
GFX->popActiveRenderTarget();
|
||||||
|
|
||||||
// If we're close enough then filter the shadow.
|
// If we're close enough then filter the shadow.
|
||||||
if ( camDist < BasicLightManager::getShadowFilterDistance() )
|
#ifdef TORQUE_BASIC_LIGHTING
|
||||||
|
if (camDist < BasicLightManager::getShadowFilterDistance())
|
||||||
|
#else
|
||||||
|
if (camDist < AdvancedLightManager::getShadowFilterDistance())
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if ( !smShadowFilter )
|
if ( !smShadowFilter )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ GFX_ImplementTextureProfile(ShadowMapTexProfile,
|
||||||
|
|
||||||
|
|
||||||
MODULE_BEGIN( ShadowMapManager )
|
MODULE_BEGIN( ShadowMapManager )
|
||||||
|
#ifndef TORQUE_BASIC_LIGHTING
|
||||||
|
MODULE_SHUTDOWN_AFTER(Scene)
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_INIT
|
MODULE_INIT
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue