You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
MAX_FORWARD_SHADOWCASCADES is correctly defined for OutEnvironment. Only render shadow maps that have been successfully allocated texture space. fwd shader can deal with full range of MAX_FORWARD_SHADOWCASCADES. limit shadow map renders to no more than MAX_FORWARD_SHADOWCASCADES. reduce shadow map size to ensure all tiles fit within GMaxShadowDepthBufferSize. Fixes UE-10282. #codereview nick.penwarden, Rolando.Caloca [CL 2466184 by Allan Bentham in Main branch]
17 lines
869 B
C++
17 lines
869 B
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
LightMapRendering.cpp: Light map rendering implementations.
|
|
=============================================================================*/
|
|
|
|
#include "RendererPrivate.h"
|
|
#include "SceneManagement.h"
|
|
|
|
void FMovableDirectionalLightCSMLightingPolicy::ModifyCompilationEnvironment(EShaderPlatform Platform, const FMaterial* Material, FShaderCompilerEnvironment& OutEnvironment)
|
|
{
|
|
OutEnvironment.SetDefine(TEXT("MOVABLE_DIRECTIONAL_LIGHT"), TEXT("1"));
|
|
OutEnvironment.SetDefine(TEXT("MOVABLE_DIRECTIONAL_LIGHT_CSM"), TEXT("1"));
|
|
OutEnvironment.SetDefine(TEXT(PREPROCESSOR_TO_STRING(MAX_FORWARD_SHADOWCASCADES)), MAX_FORWARD_SHADOWCASCADES);
|
|
|
|
FNoLightMapPolicy::ModifyCompilationEnvironment(Platform, Material, OutEnvironment);
|
|
} |