Orchestrates density, MAC transport, optics, froxel mapping, and art. 更多...
#include <FogSystem.h>
Public 成员函数 | |
| FogQuality | quality () const noexcept |
| Quality. | |
| FogQualityBudget | budget () const noexcept |
| Budget. | |
| float | simulationTime () const noexcept |
| Simulation time. | |
| std::uint64_t | frameIndex () const noexcept |
| Frame index. | |
| FogDensityField & | densityField () noexcept |
| Density field. | |
| const FogDensityField & | densityField () const noexcept |
| Density field. | |
| FogProfile & | profile () noexcept |
| Profile. | |
| const FogProfile & | profile () const noexcept |
| Profile. | |
| SceneWind & | wind () noexcept |
| Wind. | |
| const SceneWind & | wind () const noexcept |
| Wind. | |
| MacFluidGrid & | fluid () noexcept |
| Fluid. | |
| const MacFluidGrid & | fluid () const noexcept |
| Fluid. | |
| FogInteractor & | interactor () noexcept |
| Interactor. | |
| const FogInteractor & | interactor () const noexcept |
| Interactor. | |
| BeerLightCache & | beerCache () noexcept |
| Beer cache. | |
| const BeerLightCache & | beerCache () const noexcept |
| Beer cache. | |
| ContinuousArt & | art () noexcept |
| Art. | |
| const ContinuousArt & | art () const noexcept |
| Art. | |
| Result< void > | setQuality (FogQuality quality) |
| Select Fast / Enhanced / PhysicalReference and invalidate caches. | |
| Result< void > | configureDomain (int simWidth, int simHeight, int simDepth, const FogWorldBounds &bounds, float fixedDt=1.f/60.f) |
| Allocate density + MAC over world bounds at the quality froxel-ish resolution. Simulation resolution is independent of froxel display resolution. | |
| Result< void > | seedHeightFog (float baseDensity, float baseHeight, float falloff, float curlScale, std::uint32_t seed=1u) |
| Seed a height-banded fog volume. | |
| Result< FogCflReport > | stepSimulation (float dt) |
| Advance wind + MAC fluid by wall-clock dt (fixed substeps inside). | |
| Result< void > | ensureBeerCache (const glm::vec3 &lightDir, const glm::vec3 &lightColor, float intensity) |
| Refresh BeerLightCache when quality/light/density require it. | |
| Result< FogRayResult > | marchRay (const glm::vec3 &origin, const glm::vec3 &direction, const FogVolumeBound &bound, const glm::vec3 &lightDir, const glm::vec3 &lightColor, float lightIntensity, const glm::vec3 &skyAmbient, const glm::vec3 &groundAmbient, float sceneDepth) const |
| World-space ray march through the live density field. | |
| Result< int > | renderToFroxel (AtmosphereVolume &volume, const glm::mat4 &invViewProj, const glm::vec3 &lightDir, const glm::vec3 &lightColor, float intensity) |
| Inject + integrate the density field into a froxel AtmosphereVolume. | |
| Result< int > | injectToFroxel (AtmosphereVolume &volume, const glm::mat4 &invViewProj) |
| Add MAC density into an existing froxel grid without clearing or integrating. | |
| Result< int > | injectToVolumetric (Volumetric *volumetric) |
| Additive MAC inject into a Volumetric that already holds height fog / volumes. Does not resize, clear, or integrate. Caller still owns uploadFroxel / applyFroxel. | |
| Result< int > | syncToVolumetric (Volumetric *volumetric, const glm::vec3 &lightDir, const glm::vec3 &lightColor, float intensity) |
| Map the live density field into a Volumetric froxel grid and integrate lighting. Resizes the atlas to the quality budget and replaces prior media. Prefer injectToVolumetric when the caller already injected frustum height fog. Caller still owns uploadFroxel / applyFroxel. Uses the Volumetric camera matrix. | |
| Result< FogRayResult > | integrateBeam (const AnalyticBeam &beam, const glm::vec3 &origin, const glm::vec3 &direction, float sceneDepth, float mediumDensity) const |
| Analytic beam integration using the active quality segment count. | |
| Result< std::vector< DustParticle > > | generateDust (int count, float turbulenceMeters, std::uint32_t seed=7u) const |
| Generate procedural dust for the simulation bounds. | |
| ContinuousArtOutput | stylize (const FogRayResult &physical, float viewZ, float neighborOpacity=0.f) const noexcept |
| Apply ContinuousArt to a physical ray result. | |
详细描述
Orchestrates density, MAC transport, optics, froxel mapping, and art.
Data ownership:
- FogDensityField / MacFluidGrid own mutable media state
- FogProfile owns optical constants
- ContinuousArt only reads FogRayResult
- BeerLightCache is a derived acceleration structure
@ownership The FogSystem uniquely owns its lattices, caches and art params. AtmosphereVolume arguments are borrowed for the call only. @lifetime Caller-owned; destroy after the last march/froxel call. @thread Simulation / render thread that created it; not internally synchronized. @reentrancy Public methods are not reentrant and invoke no script callbacks.
在文件 FogSystem.h 第 46 行定义.
成员函数说明
◆ art() [1/2]
|
inlinenoexcept |
Art.
在文件 FogSystem.h 第 84 行定义.
◆ art() [2/2]
|
inlinenoexcept |
Art.
在文件 FogSystem.h 第 82 行定义.
◆ beerCache() [1/2]
|
inlinenoexcept |
Beer cache.
在文件 FogSystem.h 第 80 行定义.
◆ beerCache() [2/2]
|
inlinenoexcept |
Beer cache.
在文件 FogSystem.h 第 78 行定义.
◆ budget()
|
inlinenoexcept |
Budget.
在文件 FogSystem.h 第 51 行定义.
引用了 eve::graphics::fog::budgetFor().
被这些函数引用 ensureBeerCache(), injectToFroxel(), integrateBeam(), marchRay(), renderToFroxel() , 以及 syncToVolumetric().
◆ configureDomain()
| Result< void > eve::graphics::fog::FogSystem::configureDomain | ( | int | simWidth, |
| int | simHeight, | ||
| int | simDepth, | ||
| const FogWorldBounds & | bounds, | ||
| float | fixedDt = 1.f / 60.f |
||
| ) |
Allocate density + MAC over world bounds at the quality froxel-ish resolution. Simulation resolution is independent of froxel display resolution.
在文件 FogSystem.cpp 第 21 行定义.
引用了 bounds, eve::graphics::fog::MacFluidGrid::configure(), eve::graphics::fog::BeerLightCache::invalidate(), eve::graphics::fog::FogDensityField::resize() , 以及 eve::Result< T >::success().
◆ densityField() [1/2]
|
inlinenoexcept |
Density field.
在文件 FogSystem.h 第 60 行定义.
◆ densityField() [2/2]
|
inlinenoexcept |
Density field.
在文件 FogSystem.h 第 58 行定义.
◆ ensureBeerCache()
| Result< void > eve::graphics::fog::FogSystem::ensureBeerCache | ( | const glm::vec3 & | lightDir, |
| const glm::vec3 & | lightColor, | ||
| float | intensity | ||
| ) |
Refresh BeerLightCache when quality/light/density require it.
在文件 FogSystem.cpp 第 52 行定义.
引用了 eve::graphics::fog::FogQualityBudget::beerLightCache, budget(), eve::graphics::fog::budgetFor(), eve::graphics::fog::BeerLightCache::invalidate(), lightColor, lightDir, eve::graphics::fog::BeerLightCache::matches(), eve::NoOp, eve::graphics::fog::BeerLightCache::rebuild(), eve::graphics::fog::FogDensityField::revision(), eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 renderToFroxel() , 以及 syncToVolumetric().
◆ fluid() [1/2]
|
inlinenoexcept |
Fluid.
在文件 FogSystem.h 第 72 行定义.
◆ fluid() [2/2]
|
inlinenoexcept |
Fluid.
在文件 FogSystem.h 第 70 行定义.
◆ frameIndex()
|
inlinenoexcept |
Frame index.
在文件 FogSystem.h 第 55 行定义.
◆ generateDust()
| Result< std::vector< DustParticle > > eve::graphics::fog::FogSystem::generateDust | ( | int | count, |
| float | turbulenceMeters, | ||
| std::uint32_t | seed = 7u |
||
| ) | const |
Generate procedural dust for the simulation bounds.
在文件 FogSystem.cpp 第 192 行定义.
引用了 eve::graphics::fog::FogDensityField::bounds(), count, eve::graphics::fog::ProceduralDust::generate() , 以及 seed.
◆ injectToFroxel()
| Result< int > eve::graphics::fog::FogSystem::injectToFroxel | ( | AtmosphereVolume & | volume, |
| const glm::mat4 & | invViewProj | ||
| ) |
Add MAC density into an existing froxel grid without clearing or integrating.
Use after injectFroxelHeightFog / local FogVolume injection so the fluid is a perturbation on the display path, not a replacement for it.
- 参数
-
volume Borrowed froxel grid; caller owns clear / integrate / upload. invViewProj Inverse view-projection of the active camera.
在文件 FogSystem.cpp 第 113 行定义.
引用了 budget(), eve::graphics::fog::budgetFor(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::fog::FogFroxelBridge::inject(), invViewProj, eve::graphics::fog::FogQualityBudget::occupancySkip, volume , 以及 eve::graphics::fog::FogDensityField::width().
被这些函数引用 injectToVolumetric().
◆ injectToVolumetric()
| Result< int > eve::graphics::fog::FogSystem::injectToVolumetric | ( | Volumetric * | volumetric | ) |
Additive MAC inject into a Volumetric that already holds height fog / volumes. Does not resize, clear, or integrate. Caller still owns uploadFroxel / applyFroxel.
- 参数
-
volumetric Borrowed for the call; not retained. @ownership Borrowed Volumetric; FogSystem does not take ownership. @lifetime Valid only for this call; do not retain across frames via this argument. @thread Simulation / render thread that owns both objects. @reentrancy Not reentrant; invokes no script callbacks.
在文件 FogSystem.cpp 第 123 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::Volumetric::getAtmosphereVolume(), eve::graphics::Volumetric::getInvViewProj(), injectToFroxel(), eve::InvalidArgument , 以及 volume.
◆ integrateBeam()
| Result< FogRayResult > eve::graphics::fog::FogSystem::integrateBeam | ( | const AnalyticBeam & | beam, |
| const glm::vec3 & | origin, | ||
| const glm::vec3 & | direction, | ||
| float | sceneDepth, | ||
| float | mediumDensity | ||
| ) | const |
Analytic beam integration using the active quality segment count.
在文件 FogSystem.cpp 第 184 行定义.
引用了 budget(), eve::graphics::fog::budgetFor(), direction, eve::graphics::fog::AnalyticalVolLight::integrate(), origin , 以及 eve::graphics::fog::FogQualityBudget::volLightSegments.
◆ interactor() [1/2]
|
inlinenoexcept |
Interactor.
在文件 FogSystem.h 第 76 行定义.
◆ interactor() [2/2]
|
inlinenoexcept |
Interactor.
在文件 FogSystem.h 第 74 行定义.
◆ marchRay()
| Result< FogRayResult > eve::graphics::fog::FogSystem::marchRay | ( | const glm::vec3 & | origin, |
| const glm::vec3 & | direction, | ||
| const FogVolumeBound & | bound, | ||
| const glm::vec3 & | lightDir, | ||
| const glm::vec3 & | lightColor, | ||
| float | lightIntensity, | ||
| const glm::vec3 & | skyAmbient, | ||
| const glm::vec3 & | groundAmbient, | ||
| float | sceneDepth | ||
| ) | const |
World-space ray march through the live density field.
在文件 FogSystem.cpp 第 67 行定义.
引用了 eve::graphics::fog::FogQualityBudget::beerLightCache, budget(), eve::graphics::fog::budgetFor(), direction, eve::graphics::fog::FogRayMarch::integrate(), lightColor, lightDir, origin, eve::graphics::fog::PhysicalReference, eve::graphics::fog::FogQualityBudget::raySamples , 以及 eve::graphics::fog::BeerLightCache::valid().
◆ profile() [1/2]
|
inlinenoexcept |
Profile.
在文件 FogSystem.h 第 64 行定义.
◆ profile() [2/2]
|
inlinenoexcept |
Profile.
在文件 FogSystem.h 第 62 行定义.
◆ quality()
|
inlinenoexcept |
◆ renderToFroxel()
| Result< int > eve::graphics::fog::FogSystem::renderToFroxel | ( | AtmosphereVolume & | volume, |
| const glm::mat4 & | invViewProj, | ||
| const glm::vec3 & | lightDir, | ||
| const glm::vec3 & | lightColor, | ||
| float | intensity | ||
| ) |
Inject + integrate the density field into a froxel AtmosphereVolume.
在文件 FogSystem.cpp 第 80 行定义.
引用了 eve::graphics::fog::FogQualityBudget::beerLightCache, eve::graphics::fog::FogDensityField::bounds(), budget(), eve::graphics::fog::budgetFor(), ensureBeerCache(), eve::Result< T >::failure(), eve::graphics::fog::FogQualityBudget::froxelDepth, eve::graphics::fog::FogQualityBudget::froxelHeight, eve::graphics::fog::FogQualityBudget::froxelWidth, eve::graphics::fog::FogQualityBudget::historyWeight, eve::graphics::fog::FogFroxelBridge::inject(), eve::graphics::fog::FogFroxelBridge::integrate(), invViewProj, lightColor, lightDir, eve::graphics::fog::FogQualityBudget::occupancySkip, eve::graphics::fog::FogWorldBounds::size(), eve::graphics::fog::FogQualityBudget::temporalHistory, eve::graphics::fog::BeerLightCache::valid() , 以及 volume.
◆ seedHeightFog()
| Result< void > eve::graphics::fog::FogSystem::seedHeightFog | ( | float | baseDensity, |
| float | baseHeight, | ||
| float | falloff, | ||
| float | curlScale, | ||
| std::uint32_t | seed = 1u |
||
| ) |
Seed a height-banded fog volume.
在文件 FogSystem.cpp 第 31 行定义.
引用了 eve::graphics::fog::BeerLightCache::invalidate(), eve::graphics::fog::MacFluidGrid::pullDensity(), seed, eve::graphics::fog::FogDensityField::seedHeightBand() , 以及 eve::Result< T >::success().
◆ setQuality()
| Result< void > eve::graphics::fog::FogSystem::setQuality | ( | FogQuality | quality | ) |
Select Fast / Enhanced / PhysicalReference and invalidate caches.
在文件 FogSystem.cpp 第 15 行定义.
引用了 eve::graphics::fog::BeerLightCache::invalidate(), quality() , 以及 eve::Result< T >::success().
◆ simulationTime()
|
inlinenoexcept |
Simulation time.
在文件 FogSystem.h 第 53 行定义.
◆ stepSimulation()
| Result< FogCflReport > eve::graphics::fog::FogSystem::stepSimulation | ( | float | dt | ) |
Advance wind + MAC fluid by wall-clock dt (fixed substeps inside).
在文件 FogSystem.cpp 第 41 行定义.
引用了 eve::Result< T >::failure(), eve::graphics::fog::BeerLightCache::invalidate(), eve::graphics::fog::MacFluidGrid::pushDensity() , 以及 eve::graphics::fog::MacFluidGrid::step().
◆ stylize()
|
noexcept |
Apply ContinuousArt to a physical ray result.
在文件 FogSystem.cpp 第 197 行定义.
◆ syncToVolumetric()
| Result< int > eve::graphics::fog::FogSystem::syncToVolumetric | ( | Volumetric * | volumetric, |
| const glm::vec3 & | lightDir, | ||
| const glm::vec3 & | lightColor, | ||
| float | intensity | ||
| ) |
Map the live density field into a Volumetric froxel grid and integrate lighting. Resizes the atlas to the quality budget and replaces prior media. Prefer injectToVolumetric when the caller already injected frustum height fog. Caller still owns uploadFroxel / applyFroxel. Uses the Volumetric camera matrix.
- 参数
-
volumetric Borrowed for the call; not retained. @ownership Borrowed Volumetric; FogSystem does not take ownership. @lifetime Valid only for this call; do not retain across frames via this argument. @thread Simulation / render thread that owns both objects. @reentrancy Not reentrant; invokes no script callbacks.
在文件 FogSystem.cpp 第 137 行定义.
引用了 eve::graphics::fog::FogQualityBudget::beerLightCache, eve::graphics::fog::FogDensityField::bounds(), budget(), eve::graphics::fog::budgetFor(), eve::graphics::Volumetric::configureFroxelGrid(), ensureBeerCache(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::fog::FogQualityBudget::froxelDepth, eve::graphics::fog::FogQualityBudget::froxelHeight, eve::graphics::fog::FogQualityBudget::froxelWidth, eve::graphics::Volumetric::getAtmosphereVolume(), eve::graphics::Volumetric::getInvViewProj(), eve::graphics::fog::FogFroxelBridge::inject(), eve::graphics::fog::FogFroxelBridge::integrate(), eve::InvalidArgument, invViewProj, lightColor, lightDir, eve::graphics::fog::FogQualityBudget::occupancySkip, eve::graphics::fog::FogWorldBounds::size(), eve::graphics::fog::BeerLightCache::valid() , 以及 volume.
◆ wind() [1/2]
|
inlinenoexcept |
Wind.
在文件 FogSystem.h 第 68 行定义.
◆ wind() [2/2]
|
inlinenoexcept |
Wind.
在文件 FogSystem.h 第 66 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/fog/FogSystem.h
- src/modules/graphics/fog/FogSystem.cpp