UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SceneTextureReductions.cpp File Reference

Classes

class  FHZBBuildPS
 
class  FHZBBuildCS
 

Functions

 IMPLEMENT_GLOBAL_SHADER (FHZBBuildPS, "/Engine/Private/HZB.usf", "HZBBuildPS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FHZBBuildCS, "/Engine/Private/HZB.usf", "HZBBuildCS", SF_Compute)
 
void BuildHZB (FRDGBuilder &GraphBuilder, FRDGTextureRef SceneDepth, FRDGTextureRef VisBufferTexture, const FIntRect ViewRect, ERHIFeatureLevel::Type FeatureLevel, EShaderPlatform ShaderPlatform, const TCHAR *ClosestHZBName, FRDGTextureRef *OutClosestHZBTexture, const TCHAR *FurthestHZBName, FRDGTextureRef *OutFurthestHZBTexture, EPixelFormat Format, const FBuildHZBAsyncComputeParams *AsyncComputeParams, const Froxel::FViewData *OutFroxelViewData, FExtraParameters ExtraParameters)
 
void BuildHZBFurthest (FRDGBuilder &GraphBuilder, FRDGTextureRef SceneDepth, FRDGTextureRef VisBufferTexture, const FIntRect ViewRect, ERHIFeatureLevel::Type FeatureLevel, EShaderPlatform ShaderPlatform, const TCHAR *FurthestHZBName, FRDGTextureRef *OutFurthestHZBTexture, EPixelFormat Format, const FBuildHZBAsyncComputeParams *AsyncComputeParams, FExtraParameters ExtraParameters)
 

Function Documentation

◆ BuildHZB()

void BuildHZB ( FRDGBuilder GraphBuilder,
FRDGTextureRef  SceneDepth,
FRDGTextureRef  VisBufferTexture,
const FIntRect  ViewRect,
ERHIFeatureLevel::Type  FeatureLevel,
EShaderPlatform  ShaderPlatform,
const TCHAR ClosestHZBName,
FRDGTextureRef OutClosestHZBTexture,
const TCHAR FurthestHZBName,
FRDGTextureRef OutFurthestHZBTexture,
EPixelFormat  Format,
const FBuildHZBAsyncComputeParams AsyncComputeParams,
const Froxel::FViewData OutFroxelViewData,
FExtraParameters  ExtraParameters 
)

Closest and furthest HZB are intentionally in separate render target, because majority of the case you only one or the other. Keeping them separate avoid doubling the size in cache for this cases, to avoid performance regression.

◆ BuildHZBFurthest()

void BuildHZBFurthest ( FRDGBuilder GraphBuilder,
FRDGTextureRef  SceneDepth,
FRDGTextureRef  VisBufferTexture,
const FIntRect  ViewRect,
ERHIFeatureLevel::Type  FeatureLevel,
EShaderPlatform  ShaderPlatform,
const TCHAR FurthestHZBName,
FRDGTextureRef OutFurthestHZBTexture,
EPixelFormat  Format,
const FBuildHZBAsyncComputeParams AsyncComputeParams,
FExtraParameters  ExtraParameters 
)

◆ IMPLEMENT_GLOBAL_SHADER() [1/2]

IMPLEMENT_GLOBAL_SHADER ( FHZBBuildCS  ,
"/Engine/Private/HZB.usf"  ,
"HZBBuildCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/2]

IMPLEMENT_GLOBAL_SHADER ( FHZBBuildPS  ,
"/Engine/Private/HZB.usf"  ,
"HZBBuildPS"  ,
SF_Pixel   
)