You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* This avoids GPU under-utilization in scenes where a very large number of individual occlusion queries is issued * Possible r.SceneDepthHZBAsyncCompute values: * 0: Don't use async compute (default) * 1: Use async compute, start as soon as possible * 2: Use async compute, start after ComputeLightGrid.CompactLinks pass #preflight 636c555f7c2b5051903a24ca #rb Graham.Wihlidal [CL 23072519 by yuriy odonnell in ue5-main branch]
42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "ScenePrivate.h"
|
|
#include "RenderGraph.h"
|
|
#include "SceneTextureParameters.h"
|
|
|
|
struct FBuildHZBAsyncComputeParams
|
|
{
|
|
FRDGPassRef Prerequisite = nullptr;
|
|
};
|
|
|
|
static constexpr EPixelFormat BuildHZBDefaultPixelFormat = PF_R16F;
|
|
|
|
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 = BuildHZBDefaultPixelFormat,
|
|
const FBuildHZBAsyncComputeParams* AsyncComputeParams = nullptr);
|
|
|
|
// Build only the furthest HZB
|
|
void BuildHZBFurthest(
|
|
FRDGBuilder& GraphBuilder,
|
|
FRDGTextureRef SceneDepth,
|
|
FRDGTextureRef VisBufferTexture,
|
|
const FIntRect ViewRect,
|
|
ERHIFeatureLevel::Type FeatureLevel,
|
|
EShaderPlatform ShaderPlatform,
|
|
const TCHAR* FurthestHZBName,
|
|
FRDGTextureRef* OutFurthestHZBTexture,
|
|
EPixelFormat Format = BuildHZBDefaultPixelFormat,
|
|
const FBuildHZBAsyncComputeParams* AsyncComputeParams = nullptr);
|