![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <InstanceCullingOcclusionQuery.h>
Public Member Functions | |
| uint32 | Render (FRDGBuilder &GraphBuilder, FGPUScene &GPUScene, FViewInfo &View) |
| void | RenderDebug (FRDGBuilder &GraphBuilder, FGPUScene &GPUScene, const FViewInfo &View, const FIntRect &ViewRect, FRDGTextureRef SceneColor, FRDGTextureRef SceneDepth) |
| void | MarkInstancesVisible (FRDGBuilder &GraphBuilder, TConstArrayView< FGPUSceneInstanceRange > Ranges) |
| void | EndFrame (FRDGBuilder &GraphBuilder) |
| bool | IsCompatibleWithView (const FViewInfo &View) |
Public Attributes | |
| TRefCountPtr< FRDGPooledBuffer > | InstanceOcclusionQueryBuffer |
| EPixelFormat | InstanceOcclusionQueryBufferFormat = PF_Unknown |
Implements accurate per-instance occlusion culling similar to FOcclusionFeedback, except using GPUScene.
| void FInstanceCullingOcclusionQueryRenderer::EndFrame | ( | FRDGBuilder & | GraphBuilder | ) |
Perform various book-keeping tasks that must run at the end of each frame Saves view ID mapping data, extracts result buffer to be available next frame, etc.
| void FInstanceCullingOcclusionQueryRenderer::MarkInstancesVisible | ( | FRDGBuilder & | GraphBuilder, |
| TConstArrayView< FGPUSceneInstanceRange > | Ranges | ||
| ) |
Mark blocks of occlusion query buffer entries as visible in all views. Required, for example, when GPUScene instances are invalidated betwen frames, i.e. when when GPUScene instance buffer slot is re-allocated.
| uint32 FInstanceCullingOcclusionQueryRenderer::Render | ( | FRDGBuilder & | GraphBuilder, |
| FGPUScene & | GPUScene, | ||
| FViewInfo & | View | ||
| ) |
Perform per-instance occlusion culling using HZB and software occlusion queries. Returns view-specific bit mask that should be used when interpreting query result buffer, since it contains 1 bit per view.
| void FInstanceCullingOcclusionQueryRenderer::RenderDebug | ( | FRDGBuilder & | GraphBuilder, |
| FGPUScene & | GPUScene, | ||
| const FViewInfo & | View, | ||
| const FIntRect & | ViewRect, | ||
| FRDGTextureRef | SceneColor, | ||
| FRDGTextureRef | SceneDepth | ||
| ) |
Render object bounding boxes, color-coded based on visibility
| TRefCountPtr<FRDGPooledBuffer> FInstanceCullingOcclusionQueryRenderer::InstanceOcclusionQueryBuffer |
One uint8 per instance in GPUScene, with 1 bit per view Available when when instance culling is enabled and r.InstanceCulling.OcclusionQueries=1. Contains data for previous frame. Assumes that GPUScene instance indices are consistent.
| EPixelFormat FInstanceCullingOcclusionQueryRenderer::InstanceOcclusionQueryBufferFormat = PF_Unknown |