UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CustomDepthRendering.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "RenderGraphFwd.h"
6#include "RHIDefinitions.h"
7#include "RHIFwd.h"
8#include "RHIShaderPlatform.h"
9
11{
12 // Renders custom depth before the base pass. Can be more efficient with AsyncCompute and enables use with DBuffer decals.
14
15 // Renders after the base pass.
17};
18
19// Returns the location in the frame where custom depth is rendered.
21
23{
24 static FCustomDepthTextures Create(FRDGBuilder& GraphBuilder, FIntPoint CustomDepthExtent, EShaderPlatform ShaderPlatform, bool bRequireMultiView, uint16 MobileMultiViewRenderTargetNumLayers);
25 bool IsValid() const
26 {
27 return Depth != nullptr;
28 }
29
32
33 // Denotes that the depth and stencil buffers had to be split to separate, non-depth textures (and thus Depth cannot be bound
34 // as a depth/stencil buffer). This can happen when Nanite renders custom depth on platforms with HW that cannot write stencil
35 // values per-pixel from a shader.
37
38 // Actions to use when initially rendering to custom depth / stencil.
41};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ECustomDepthPassLocation
Definition CustomDepthRendering.h:11
ECustomDepthPassLocation GetCustomDepthPassLocation(EShaderPlatform Platform)
Definition CustomDepthRendering.cpp:51
ERenderTargetLoadAction
Definition RHIDefinitions.h:1253
EShaderPlatform
Definition RHIShaderPlatform.h:11
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition RenderGraphBuilder.h:49
Definition RenderGraphResources.h:839
Definition RenderGraphResources.h:571
Definition CustomDepthRendering.h:23
ERenderTargetLoadAction StencilAction
Definition CustomDepthRendering.h:40
ERenderTargetLoadAction DepthAction
Definition CustomDepthRendering.h:39
FRDGTextureSRVRef Stencil
Definition CustomDepthRendering.h:31
FRDGTextureRef Depth
Definition CustomDepthRendering.h:30
bool bSeparateStencilBuffer
Definition CustomDepthRendering.h:36
bool IsValid() const
Definition CustomDepthRendering.h:25
Definition IntPoint.h:25