UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FirstPersonSelfShadow.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "RendererInterface.h"
8
10class FLightSceneInfo;
12
13// Light independent inputs required for rendering first person self-shadow.
25
26// Whether to render first person self-shadow at all.
28
29// Whether the light could cast first person self-shadow. This is similar in spirit to calling Casts*Shadow() on the light proxy
30// and does not check for other conditions unrelated to the light itself, such as whether it is relevant for a given view or
31// if the current platform and configuration supports first person self-shadow at all. For these cases, consider calling
32// ShouldRenderFirstPersonSelfShadowForLight instead.
33bool LightCastsFirstPersonSelfShadow(const FLightSceneInfo& LightSceneInfo);
34
35// Whether to render first person self-shadow for a particular light.
36bool ShouldRenderFirstPersonSelfShadowForLight(const FSceneRendererBase& SceneRenderer, const FSceneViewFamily& ViewFamily, const TArray<FViewInfo>& Views, const FLightSceneInfo& LightSceneInfo);
37
38// Creates the required light independent inputs for RenderFirstPersonSelfShadow().
40
41// Renders first person self-shadow for the passed in light to the given ScreenShadowMaskTexture. Self-shadow is achieved by doing screen space shadow traces for first person pixels in the GBuffer.
42void RenderFirstPersonSelfShadow(FRDGBuilder& GraphBuilder, const FSceneRendererBase& SceneRenderer, const TArray<FViewInfo>& Views, FRDGTextureRef ScreenShadowMaskTexture, const FFirstPersonSelfShadowInputs& Inputs, const FLightSceneInfo& LightSceneInfo);
43
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FFirstPersonSelfShadowInputs CreateFirstPersonSelfShadowInputs(FRDGBuilder &GraphBuilder, const TArray< FViewInfo > &Views, const FMinimalSceneTextures &SceneTextures)
Definition FirstPersonSelfShadow.cpp:250
bool ShouldRenderFirstPersonSelfShadowForLight(const FSceneRendererBase &SceneRenderer, const FSceneViewFamily &ViewFamily, const TArray< FViewInfo > &Views, const FLightSceneInfo &LightSceneInfo)
Definition FirstPersonSelfShadow.cpp:228
bool ShouldRenderFirstPersonSelfShadow(const FSceneViewFamily &ViewFamily)
Definition FirstPersonSelfShadow.cpp:203
void RenderFirstPersonSelfShadow(FRDGBuilder &GraphBuilder, const FSceneRendererBase &SceneRenderer, const TArray< FViewInfo > &Views, FRDGTextureRef ScreenShadowMaskTexture, const FFirstPersonSelfShadowInputs &Inputs, const FLightSceneInfo &LightSceneInfo)
Definition FirstPersonSelfShadow.cpp:306
bool LightCastsFirstPersonSelfShadow(const FLightSceneInfo &LightSceneInfo)
Definition FirstPersonSelfShadow.cpp:210
Definition LightSceneInfo.h:208
Definition RenderGraphBuilder.h:49
Definition RenderGraphResources.h:571
Definition SceneRendering.h:2023
Definition SceneView.h:2212
Definition Array.h:670
Definition FirstPersonSelfShadow.h:17
FRDGTextureRef Normals
Definition FirstPersonSelfShadow.h:19
FRDGTextureRef DepthStencil
Definition FirstPersonSelfShadow.h:20
FIntPoint Resolution
Definition FirstPersonSelfShadow.h:18
Definition FirstPersonSelfShadow.h:15
TArray< FDownsampledTextures, TInlineAllocator< 4 > > DownsampledInputs
Definition FirstPersonSelfShadow.h:23
const FMinimalSceneTextures * SceneTextures
Definition FirstPersonSelfShadow.h:22
Definition SceneTextures.h:52
Definition IntPoint.h:25
static const TIntPoint ZeroValue
Definition IntPoint.h:45