Fix a bug of modulated shadow missing SceneTexture uniform buffer

#jira UE-113083

#rb Dmitriy.Dyomin, Jack.Porter, Mi.Wang

#lockdown ben.marsh

#ROBOMERGE-SOURCE: CL 15952199 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v787-15839533)

[CL 15958212 by wei liu in ue5-main branch]
This commit is contained in:
wei liu
2021-04-08 14:11:18 -04:00
parent 47c9d451d1
commit 380966cbd2
2 changed files with 5 additions and 3 deletions

View File

@@ -39,6 +39,10 @@
#define FEATURE_GATHER4 0
#endif
#if MODULATED_SHADOWS
#define MobileSceneTextures MobileBasePass.SceneTextures
#endif
#include "ShadowProjectionCommon.ush"
#include "ShadowFilteringCommon.ush"
#if USE_PCSS

View File

@@ -43,9 +43,7 @@ static TAutoConsoleVariable<int32> CVarMobileMaxVisibleMovableSpotLightsShadow(
TEXT("The max number of visible spotlighs can cast shadow sorted by screen size, should be as less as possible for performance reason"),
ECVF_RenderThreadSafe);
// Specify a unique slot for mobile base pass because some rendering in the mobile base pass (e.g. modulated shadow and ViewExtensions) use SceneTextures uniform buffer, but the SceneTextures uniform buffer and MobileBasePass uniform buffer share the same slot
IMPLEMENT_STATIC_UNIFORM_BUFFER_SLOT(MobileBasePass);
IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT(FMobileBasePassUniformParameters, "MobileBasePass", MobileBasePass);
IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT(FMobileBasePassUniformParameters, "MobileBasePass", SceneTextures);
static TAutoConsoleVariable<int32> CVarMobileUseHWsRGBEncoding(
TEXT("r.Mobile.UseHWsRGBEncoding"),