Nebula
|
The occupancy quad tree implements a tree which allows for a quick search.
The texture tile cache keeps track of which texture tiles should be used based on a last recently used heuristic.
Terrain rendering subsystem.
Classes | |
struct | BiomeMaterial |
struct | BiomeMaterialBuilder |
struct | BiomeParameters |
struct | BiomeSettings |
struct | BiomeSettingsBuilder |
struct | IndirectionEntry |
class | OccupancyQuadTree |
struct | PhysicalTileUpdate |
struct | SubTexture |
struct | SubTextureCompressed |
struct | SubTextureUpdateJobOutput |
struct | SubTextureUpdateJobUniforms |
struct | TerrainBiomeId |
class | TerrainContext |
struct | TerrainQuad |
struct | TerrainSetupSettings |
struct | TerrainTri |
struct | TerrainVert |
class | TextureTileCache |
struct | TileCacheEntry |
Enumerations | |
enum | BiomeLoadBits { AlbedoLoaded = 0x1 , NormalLoaded = 0x2 , MaterialLoaded = 0x4 , MaskLoaded = 0x8 , WeightsLoaded = 0x10 } |
enum class | SubTextureUpdateState : uint8 { NoChange , Deleted , Created , Grew , Shrank } |
Functions | |
__ImplementContext (TerrainContext, TerrainContext::terrainAllocator) | |
void | PackSubTexture (const SubTexture &subTex, TerrainSubTexture &compressed) |
void | UnpackPageDataEntry (uint *packed, uint &status, uint &subTextureIndex, uint &mip, uint &maxMip, uint &subTextureTileX, uint &subTextureTileY) |
Unpack from packed ushort vectors to full size. | |
template<typename T > | |
uint | Upload (T *data, uint size, uint alignment) |
void | IndirectionUpdate (uint mip, uint physicalOffsetX, uint physicalOffsetY, uint indirectionOffsetX, uint indirectionOffsetY, uint subTextureTileX, uint subTextureTileY) |
void | IndirectionErase (uint mip, uint indirectionOffsetX, uint indirectionOffsetY, uint subTextureTileX, uint subTextureTileY) |
void | IndirectionMoveGrow (uint oldMaxMip, uint oldTiles, const Math::uint2 &oldCoord, uint newMaxMip, uint newTiles, const Math::uint2 &newCoord) |
Copies mip chain from old region to new region which is bigger by mapping mips 0..X to 1..X in the new region. | |
void | IndirectionMoveShrink (uint oldMaxMip, uint oldTiles, const Math::uint2 &oldCoord, uint newMaxMip, uint newTiles, const Math::uint2 &newCoord) |
Copies mip chain from old region to new region which is smaller, mapping mips 0..X to 0..X-1 in the new region. | |
void | IndirectionClear (uint mips, uint tiles, const Math::uint2 &coord) |
Clear old region. | |
void | TerrainCullJob (const Jobs::JobFuncContext &ctx) |
|
strong |
Terrain::__ImplementContext | ( | TerrainContext | , |
TerrainContext::terrainAllocator | ) |
void Terrain::IndirectionClear | ( | uint | mips, |
uint | tiles, | ||
const Math::uint2 & | coord ) |
Clear old region.
void Terrain::IndirectionErase | ( | uint | mip, |
uint | indirectionOffsetX, | ||
uint | indirectionOffsetY, | ||
uint | subTextureTileX, | ||
uint | subTextureTileY ) |
void Terrain::IndirectionMoveGrow | ( | uint | oldMaxMip, |
uint | oldTiles, | ||
const Math::uint2 & | oldCoord, | ||
uint | newMaxMip, | ||
uint | newTiles, | ||
const Math::uint2 & | newCoord ) |
Copies mip chain from old region to new region which is bigger by mapping mips 0..X to 1..X in the new region.
void Terrain::IndirectionMoveShrink | ( | uint | oldMaxMip, |
uint | oldTiles, | ||
const Math::uint2 & | oldCoord, | ||
uint | newMaxMip, | ||
uint | newTiles, | ||
const Math::uint2 & | newCoord ) |
Copies mip chain from old region to new region which is smaller, mapping mips 0..X to 0..X-1 in the new region.
void Terrain::IndirectionUpdate | ( | uint | mip, |
uint | physicalOffsetX, | ||
uint | physicalOffsetY, | ||
uint | indirectionOffsetX, | ||
uint | indirectionOffsetY, | ||
uint | subTextureTileX, | ||
uint | subTextureTileY ) |
void Terrain::PackSubTexture | ( | const SubTexture & | subTex, |
TerrainSubTexture & | compressed ) |
void Terrain::TerrainCullJob | ( | const Jobs::JobFuncContext & | ctx | ) |
void Terrain::UnpackPageDataEntry | ( | uint * | packed, |
uint & | status, | ||
uint & | subTextureIndex, | ||
uint & | mip, | ||
uint & | maxMip, | ||
uint & | subTextureTileX, | ||
uint & | subTextureTileY ) |
Unpack from packed ushort vectors to full size.
CoreGraphics::BufferId Terrain::biomeBuffer |
IndexT Terrain::biomeCounter |
Threading::AtomicCounter Terrain::biomeLoaded[Terrain::MAX_BIOMES][4] |
uint Terrain::biomeLowresGenerated[Terrain::MAX_BIOMES] |
CoreGraphics::TextureId Terrain::biomeMasks[Terrain::MAX_BIOMES] |
Terrain::MaterialLayers Terrain::biomeMaterials |
Util::Array<CoreGraphics::TextureId> Terrain::biomeTextures |
CoreGraphics::TextureId Terrain::biomeWeights[Terrain::MAX_BIOMES] |
Math::vec4 Terrain::cachedSunDirection |
|
static |
CoreGraphics::BufferId Terrain::constantsBuffer |
bool Terrain::debugRender |
Util::FixedArray<TerrainSubTexture> Terrain::gpuSubTextures |
CoreGraphics::VertexAlloc Terrain::indexBuffer |
Util::FixedArray<IndirectionEntry> Terrain::indirectionBuffer |
Util::Array<CoreGraphics::BufferCopy, 4> Terrain::indirectionBufferClearsThisFrame |
Util::Array<CoreGraphics::BufferCopy, 4> Terrain::indirectionBufferUpdatesThisFrame |
Util::Array<IndirectionEntry> Terrain::indirectionEntryUpdates |
Util::FixedArray<uint> Terrain::indirectionMipOffsets |
Util::FixedArray<uint> Terrain::indirectionMipSizes |
const uint Terrain::IndirectionNumMips = Math::log2(SubTextureMaxTiles) + 1 |
OccupancyQuadTree Terrain::indirectionOccupancy |
CoreGraphics::TextureId Terrain::indirectionTexture |
Util::Array<CoreGraphics::TextureCopy, 4> Terrain::indirectionTextureClearsThisFrame |
Util::Array<CoreGraphics::TextureCopy> Terrain::indirectionTextureCopies |
CoreGraphics::TextureId Terrain::indirectionTextureCopy |
Util::Array<CoreGraphics::TextureCopy, 4> Terrain::indirectionTextureFromCopiesThisFrame |
const uint Terrain::IndirectionTextureSize = 2048 |
Util::Array<CoreGraphics::TextureCopy, 4> Terrain::indirectionTextureToCopiesThisFrame |
Util::Array<CoreGraphics::TextureCopy, 4> Terrain::indirectionTextureUpdatesThisFrame |
CoreGraphics::BufferSet Terrain::indirectionUploadBuffers |
Util::FixedArray<uint> Terrain::indirectionUploadOffsets |
|
static |
SizeT Terrain::layers |
CoreGraphics::TextureId Terrain::lowresAlbedo |
const uint Terrain::LowresFallbackMips = Math::log2(LowresFallbackSize) + 1 |
const uint Terrain::LowresFallbackSize = 4096 |
CoreGraphics::TextureId Terrain::lowresMaterial |
CoreGraphics::TextureId Terrain::lowresNormal |
CoreGraphics::ResourceTableId Terrain::meshGenTable |
CoreGraphics::ShaderProgramId Terrain::meshProgram |
float Terrain::mipLoadDistance = 1500.0f |
float Terrain::mipRenderPadding = 150.0f |
SizeT Terrain::numPageBufferUpdateEntries |
SizeT Terrain::numPatches |
Threading::AtomicCounter Terrain::numPatchesThisFrame |
uint Terrain::numPixels |
SizeT Terrain::numTris |
CoreGraphics::BufferId Terrain::pageStatusBuffer |
CoreGraphics::BufferId Terrain::pageUpdateListBuffer |
CoreGraphics::BufferSet Terrain::pageUpdateReadbackBuffers |
CoreGraphics::BufferId Terrain::patchBuffer |
CoreGraphics::BufferSet Terrain::patchConstants |
CoreGraphics::TextureId Terrain::physicalAlbedoCacheBC |
CoreGraphics::TextureViewId Terrain::physicalAlbedoCacheBCWrite |
CoreGraphics::TextureId Terrain::physicalMaterialCacheBC |
CoreGraphics::TextureViewId Terrain::physicalMaterialCacheBCWrite |
CoreGraphics::TextureId Terrain::physicalNormalCacheBC |
CoreGraphics::TextureViewId Terrain::physicalNormalCacheBCWrite |
const uint Terrain::PhysicalTextureNumTiles = 32 |
const uint Terrain::PhysicalTexturePaddedSize = (PhysicalTextureTilePaddedSize) * PhysicalTextureNumTiles |
const uint Terrain::PhysicalTextureSize = (PhysicalTextureTileSize) * PhysicalTextureNumTiles |
TextureTileCache Terrain::physicalTextureTileCache |
const uint Terrain::PhysicalTextureTileHalfPadding = 4 |
OccupancyQuadTree Terrain::physicalTextureTileOccupancy |
const uint Terrain::PhysicalTextureTilePaddedSize = PhysicalTextureTileSize + PhysicalTextureTilePadding |
const uint Terrain::PhysicalTextureTilePadding = PhysicalTextureTileHalfPadding * 2 |
const uint Terrain::PhysicalTextureTileSize = 256 |
struct { ... } Terrain::raytracingState |
bool Terrain::renderToggle |
CoreGraphics::ResourceTableId Terrain::resourceTable |
CoreGraphics::BufferId Terrain::runtimeConstants |
CoreGraphics::ResourceTableId Terrain::runtimeTable |
Threading::AtomicCounter Terrain::sectionCullDoneCounter = 0 |
Threading::Event Terrain::sectionCullFinishedEvent |
TerrainSetupSettings Terrain::settings |
IndexT Terrain::setupBlasFrame |
bool Terrain::shadowMapInvalid |
CoreGraphics::BufferId Terrain::subTextureBuffer |
const float Terrain::SubTextureFadeStart = 200.0f |
Terrain::SubTextureUpdateJobOutput Terrain::subTextureJobOutputs[SubTextureMaxUpdates] |
const uint Terrain::SubTextureMaxPixels = 65536 |
const uint Terrain::SubTextureMaxTiles = 256 |
const uint Terrain::SubTextureMaxUpdates = 1024 |
Threading::AtomicCounter Terrain::subTextureNumOutputs |
const float Terrain::SubTextureRange = 300.0f |
Util::FixedArray<SubTexture> Terrain::subTextures |
Threading::AtomicCounter Terrain::subtexturesDoneCounter = 0 |
Threading::Event Terrain::subtexturesFinishedEvent |
CoreGraphics::BufferSet Terrain::subtextureStagingBuffers |
const float Terrain::SubTextureSwapDistance = 10.0f |
const uint Terrain::SubTextureWorldSize = 64 |
Graphics::GraphicsEntityId Terrain::sun |
Threading::CriticalSection Terrain::syncPoint |
CoreGraphics::BufferId Terrain::systemConstants |
CoreGraphics::ResourceTableSet Terrain::systemTable |
CoreGraphics::ShaderProgramId Terrain::terrainPageClearUpdateBufferProgram |
CoreGraphics::TextureId Terrain::terrainPosBuffer |
CoreGraphics::PipelineId Terrain::terrainPrepassPipeline |
CoreGraphics::ShaderProgramId Terrain::terrainPrepassProgram |
CoreGraphics::PipelineId Terrain::terrainResolvePipeline |
CoreGraphics::ShaderProgramId Terrain::terrainResolveProgram |
std::function<void()> Terrain::terrainSetupCallback |
CoreGraphics::ShaderId Terrain::terrainShader |
CoreGraphics::TextureId Terrain::terrainShadowMap |
const uint Terrain::TerrainShadowMapSize = 2048 |
CoreGraphics::ShaderProgramId Terrain::terrainShadowProgram |
CoreGraphics::ResourceTableId Terrain::terrainShadowResourceTable |
struct { ... } Terrain::terrainState |
CoreGraphics::ShaderProgramId Terrain::terrainTileWriteProgram |
struct { ... } Terrain::terrainVirtualTileState |
CoreGraphics::ShaderProgramId Terrain::terrainWriteLowresProgram |
CoreGraphics::ShaderId Terrain::tileShader |
CoreGraphics::BufferWithStaging Terrain::tileWriteBufferSet |
Util::Array<TerrainTileWrite::TileWrite> Terrain::tileWrites |
Util::Array<TerrainTileWrite::TileWrite> Terrain::tileWritesThisFrame |
bool Terrain::updateLowres = false |
bool Terrain::updateMesh = false |
bool Terrain::updateShadowMap |
CoreGraphics::VertexAlloc Terrain::vertexBuffer |
bool Terrain::virtualSubtextureBufferUpdate |
CoreGraphics::VertexLayoutId Terrain::vlo |
CoreGraphics::WindowId Terrain::wnd |