|
Nebula
|
#include <terraincontext.h>
Inherits Graphics::GraphicsContext.
Classes | |
| struct | TerrainLoadInfo |
| struct | TerrainRuntimeInfo |
Public Member Functions | |
| TerrainContext () | |
| constructor | |
| virtual | ~TerrainContext () |
| destructor | |
Public Member Functions inherited from Graphics::GraphicsContext | |
| GraphicsContext () | |
| constructor | |
| virtual | ~GraphicsContext () |
| destructor | |
Static Public Member Functions | |
| static void | Create (const TerrainSetupSettings &settings) |
| create terrain context | |
| static void | Discard () |
| destroy terrain context | |
| static void | SetupTerrain (const Graphics::GraphicsEntityId entity, const Resources::ResourceName &heightMap, const Resources::ResourceName &decisionMap, bool enableRayTracing) |
| setup new terrain surface from texture and settings | |
| static TerrainBiomeId | CreateBiome (const BiomeSettings &settings) |
| setup a new biome | |
| static void | SetBiomeSlopeThreshold (TerrainBiomeId id, float threshold) |
| set biome slope threshold | |
| static void | SetBiomeHeightThreshold (TerrainBiomeId id, float threshold) |
| set biome height threshold | |
| static void | SetSun (const Graphics::GraphicsEntityId sun) |
| Set the sun entity for terrain shadows. | |
| static void | CullPatches (const Ptr< Graphics::View > &view, const Graphics::FrameContext &ctx) |
| cull terrain patches | |
| static void | UpdateLOD (const Ptr< Graphics::View > &view, const Graphics::FrameContext &ctx) |
| update sparse texture mips | |
| static void | RenderUI (const Graphics::FrameContext &ctx) |
| render IMGUI | |
| static void | ClearCache () |
| clear the tile cache (use when we need to force update the terrain) | |
| static void | SetVisible (bool visible) |
| static bool | GetVisible () |
| static void | OnRenderDebug (uint32_t flags) |
| debug rendering | |
Private Types | |
| enum | { Terrain_LoadInfo , Terrain_RuntimeInfo } |
| enum | { TerrainBiome_Settings , TerrainBiome_Index , TerrainBiome_MaskTexture } |
| typedef Ids::IdAllocator< TerrainLoadInfo, TerrainRuntimeInfo > | TerrainAllocator |
| typedef Ids::IdAllocator< BiomeSettings, uint32_t > | TerrainBiomeAllocator |
Private Member Functions | |
| __DeclareContext () | |
Static Private Member Functions | |
| static Graphics::ContextEntityId | Alloc () |
| allocate a new slice for this context | |
| static void | Dealloc (Graphics::ContextEntityId id) |
| deallocate a slice | |
Static Private Attributes | |
| static TerrainAllocator | terrainAllocator |
| static TerrainBiomeAllocator | terrainBiomeAllocator |
Additional Inherited Members | |
Static Protected Member Functions inherited from Graphics::GraphicsContext | |
| static void | InternalRegisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state) |
| static void | InternalDeregisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state) |
| template<class ID_ALLOCATOR> | |
| static void | InternalDefragment (ID_ALLOCATOR &allocator, Graphics::GraphicsContextState &&state) |
|
private |
|
private |
| Terrain::TerrainContext::TerrainContext | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
staticprivate |
allocate a new slice for this context
|
static |
clear the tile cache (use when we need to force update the terrain)
|
static |
create terrain context
Adaptive terrain virtual texturing setup
Passes:
Why don't we just render the terrain directly and sample our input textures? Well, it would require a lot of work for the terrain splatting shader, especially if we want to have features like roads and procedural decals. This is called an optimization. LOL.
|
static |
setup a new biome
|
static |
cull terrain patches
|
staticprivate |
deallocate a slice
|
static |
destroy terrain context
|
static |
|
static |
debug rendering
|
static |
render IMGUI
|
static |
set biome height threshold
|
static |
set biome slope threshold
|
static |
Set the sun entity for terrain shadows.
|
static |
setup new terrain surface from texture and settings
Setup with raytracing
|
static |
|
static |
update sparse texture mips
|
staticprivate |
|
staticprivate |