命名空间 | |
| namespace | vulkan |
类 | |
| struct | VgBackend |
| Opaque backend state for one virtual-geometry renderer. Owned by VirtualGeometryRenderer; allocated/freed by the active backend. 更多... | |
| struct | VgCluster |
| CPU-side processed cluster (before packing into VgGpuCluster). 更多... | |
| struct | VgGpuCluster |
| GPU-mirrored cluster node layout (std430, matches shaders/vg_*.comp). Exactly 4 x uvec4 per cluster: 更多... | |
| struct | VgUniforms |
| class | VirtualGeometry |
| Virtual-geometry module — Nanite-style virtualized geometry rendering on top of the active Graphics backend (Vulkan). See docs/dev/VIRTUAL_GEOMETRY.md. 更多... | |
| struct | VirtualGeometryAsset |
| Fully processed virtual-geometry asset (CPU representation). Produced by Builder from a Mesh; uploaded to GPU SSBOs by the backend. 更多... | |
| class | VirtualGeometryBuilder |
| CPU preprocessor that builds a Nanite-style hierarchical cluster DAG from a triangle mesh: 更多... | |
| class | VirtualGeometryRenderer |
| A virtual-geometry renderer: preprocesses a mesh into a cluster DAG, uploads it to the GPU, then each frame runs GPU-driven culling + a software rasterizer into a visibility buffer. 更多... | |
函数 | |
| int | selectClusters (const VirtualGeometryAsset &asset, float dist, float projScale, float errorPx, std::vector< std::uint32_t > &outSelected) |
| CPU reference implementation of the GPU cluster-DAG LOD selection (mirrors shaders/vg_cull.comp). | |
| void | lodHistogram (const VirtualGeometryAsset &asset, const std::vector< std::uint32_t > &selected, std::vector< int > &perLevelCount) |
| Per-LOD-level counts of the selected clusters (size = maxLod+1). | |
| Module_IMPL (VirtualGeometry, new VirtualGeometry()) | |
| void | vgCreate (VgBackend &be) |
| void | vgDestroy (VgBackend &be) |
| void | vgUpload (VgBackend &be, const VirtualGeometryAsset &asset) |
| void | vgUploadUniforms (VgBackend &be, const VgUniforms &u) |
| void | vgReset (VgBackend &be, int visibleCapacity) |
| int | vgUpdate (VgBackend &be, int clusterCount, int visibleCapacity, int viewW, int viewH) |
| bool | vgReadPixels (VgBackend &be, std::vector< uint32_t > &out) |
函数说明
◆ lodHistogram()
| void eve::virtualgeometry::lodHistogram | ( | const VirtualGeometryAsset & | asset, |
| const std::vector< std::uint32_t > & | selected, | ||
| std::vector< int > & | perLevelCount | ||
| ) |
Per-LOD-level counts of the selected clusters (size = maxLod+1).
在文件 LodSelection.cpp 第 31 行定义.
引用了 c , 以及 eve::virtualgeometry::VirtualGeometryAsset::clusters.
◆ Module_IMPL()
| eve::virtualgeometry::Module_IMPL | ( | VirtualGeometry | , |
| new | VirtualGeometry() | ||
| ) |
◆ selectClusters()
| int eve::virtualgeometry::selectClusters | ( | const VirtualGeometryAsset & | asset, |
| float | dist, | ||
| float | projScale, | ||
| float | errorPx, | ||
| std::vector< std::uint32_t > & | outSelected | ||
| ) |
CPU reference implementation of the GPU cluster-DAG LOD selection (mirrors shaders/vg_cull.comp).
A cluster is selected iff it is the coarsest ancestor whose screen-space geometric error is within errorPx (or a leaf when no ancestor is fine enough). Combined with screenP > errorPx, this emits exactly one cluster per DAG branch (no overlaps, no gaps), so as the camera moves the visible LOD transitions continuously from fine (near) to coarse (far).
screenError(cluster) = errorR * projScale / dist
在文件 LodSelection.cpp 第 8 行定义.
引用了 c, eve::virtualgeometry::VirtualGeometryAsset::clusters, d , 以及 eve::virtualgeometry::VgCluster::errorR.
◆ vgCreate()
| void eve::virtualgeometry::vgCreate | ( | VgBackend & | be | ) |
◆ vgDestroy()
| void eve::virtualgeometry::vgDestroy | ( | VgBackend & | be | ) |
◆ vgReadPixels()
| bool eve::virtualgeometry::vgReadPixels | ( | VgBackend & | be, |
| std::vector< uint32_t > & | out | ||
| ) |
◆ vgReset()
| void eve::virtualgeometry::vgReset | ( | VgBackend & | be, |
| int | visibleCapacity | ||
| ) |
◆ vgUpdate()
| int eve::virtualgeometry::vgUpdate | ( | VgBackend & | be, |
| int | clusterCount, | ||
| int | visibleCapacity, | ||
| int | viewW, | ||
| int | viewH | ||
| ) |
◆ vgUpload()
| void eve::virtualgeometry::vgUpload | ( | VgBackend & | be, |
| const VirtualGeometryAsset & | asset | ||
| ) |
在文件 VulkanVirtualGeometry.cpp 第 99 行定义.
引用了 c, eve::virtualgeometry::VirtualGeometryAsset::clusters, f, eve::virtualgeometry::VirtualGeometryAsset::positions, eve::virtualgeometry::vulkan::VgState::positions, eve::virtualgeometry::VgBackend::state, eve::virtualgeometry::VirtualGeometryAsset::triangles, u, eve::gpgpu::vulkanNewBuffer() , 以及 x.
被这些函数引用 eve::virtualgeometry::VirtualGeometryRenderer::build().
◆ vgUploadUniforms()
| void eve::virtualgeometry::vgUploadUniforms | ( | VgBackend & | be, |
| const VgUniforms & | u | ||
| ) |