You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* When enabled, translucent surfaces are rasterized again to create a minimal translucency GBuffer, using depth writes and tests to only capture the frontmost layer * Lumen Reflections are run on the translucency GBuffer, without denoising to reduce overhead (forced to mirror) * Finally the translucent base pass depth-tests against the frontmost layer depth and applies the high quality reflections. Subsequent layers continue to use the Radiance Cache based reflections. * Disabled by default due the constant overheads when any translucent surface is on-screen * New Post Process Volume and Project setting to enable #ROBOMERGE-AUTHOR: daniel.wright #ROBOMERGE-SOURCE: CL 19387917 via CL 19387985 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884) [CL 19391295 by daniel wright in ue5-main branch]
32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "FXRenderingUtils.h"
|
|
#include "MaterialShared.h"
|
|
#include "Lumen/LumenScreenProbeGather.h"
|
|
|
|
bool FFXRenderingUtils::CanMaterialRenderBeforeFXPostOpaque(
|
|
const FSceneViewFamily& ViewFamily,
|
|
const FPrimitiveSceneProxy& SceneProxy,
|
|
const FMaterial& Material)
|
|
{
|
|
const EBlendMode BlendMode = Material.GetBlendMode();
|
|
const bool bTranslucent = IsTranslucentBlendMode(BlendMode);
|
|
|
|
if (!bTranslucent)
|
|
{
|
|
// opaque materials always render before FFXSystemInterface::PostOpaqueRender
|
|
return true;
|
|
}
|
|
|
|
// When rendering Lumen, it's possible a translucent material might render in the LumenTranslucencyRadianceCacheMark pass,
|
|
// which happens before PostRenderOpaque.
|
|
const FScene* Scene = SceneProxy.GetScene().GetRenderScene();
|
|
if (Scene
|
|
&& (CanMaterialRenderInLumenTranslucencyRadianceCacheMarkPass(*Scene, ViewFamily, SceneProxy, Material)
|
|
|| CanMaterialRenderInLumenFrontLayerTranslucencyGBufferPass(*Scene, ViewFamily, SceneProxy, Material)))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
} |