Cached light-path transmittance used by Fast / Enhanced quality tiers. 更多...
#include <BeerLightCache.h>
类 | |
| struct | LightKey |
| LightKey public API. 更多... | |
Public 成员函数 | |
| std::uint64_t | version () const noexcept |
| bool | valid () const noexcept |
| const LightKey & | key () const noexcept |
| Result< void > | rebuild (const FogDensityField &field, const FogProfile &profile, const glm::vec3 &lightDir, const glm::vec3 &lightColor, float intensity, int samplesPerCell=6) |
| Rebuild transmittance along the primary light for each density cell. | |
| void | invalidate () |
| Mark cache stale (quality change, light cut, etc.). | |
| float | sampleTransmittance (const FogDensityField &field, const glm::vec3 &world) const noexcept |
| Sample cached transmittance at a world position (1 = fully lit). | |
| bool | matches (std::uint64_t densityRevision, const glm::vec3 &lightDir, float intensity) const noexcept |
| True when the cache matches the supplied state. | |
详细描述
Cached light-path transmittance used by Fast / Enhanced quality tiers.
Invalidates when density revision, light state, or view/light direction change.
在文件 BeerLightCache.h 第 20 行定义.
成员函数说明
◆ invalidate()
| void eve::graphics::fog::BeerLightCache::invalidate | ( | ) |
Mark cache stale (quality change, light cut, etc.).
在文件 BeerLightCache.cpp 第 13 行定义.
引用了 eve::graphics::fog::BeerLightCache::LightKey::version.
被这些函数引用 eve::graphics::fog::FogSystem::configureDomain(), eve::graphics::fog::FogSystem::ensureBeerCache(), eve::graphics::fog::FogSystem::seedHeightFog(), eve::graphics::fog::FogSystem::setQuality() , 以及 eve::graphics::fog::FogSystem::stepSimulation().
◆ key()
|
inlinenoexcept |
在文件 BeerLightCache.h 第 33 行定义.
◆ matches()
|
noexcept |
True when the cache matches the supplied state.
在文件 BeerLightCache.cpp 第 18 行定义.
◆ rebuild()
| Result< void > eve::graphics::fog::BeerLightCache::rebuild | ( | const FogDensityField & | field, |
| const FogProfile & | profile, | ||
| const glm::vec3 & | lightDir, | ||
| const glm::vec3 & | lightColor, | ||
| float | intensity, | ||
| int | samplesPerCell = 6 |
||
| ) |
Rebuild transmittance along the primary light for each density cell.
- 返回
- Ok after a successful rebuild, or Rejected on invalid inputs.
在文件 BeerLightCache.cpp 第 27 行定义.
引用了 bounds, cell, eve::graphics::fog::BeerLightCache::LightKey::color, eve::graphics::fog::BeerLightCache::LightKey::densityRevision, dir, eve::graphics::fog::BeerLightCache::LightKey::direction, eve::Diagnostic::error(), eve::graphics::fog::FogProfile::extinctionAt(), eve::Failed, eve::Result< T >::failure(), idx, eve::graphics::fog::BeerLightCache::LightKey::intensity, eve::InvalidArgument, lightColor, lightDir, p, s, eve::Result< T >::success(), eve::graphics::fog::BeerLightCache::LightKey::version, x, y , 以及 z.
◆ sampleTransmittance()
|
noexcept |
Sample cached transmittance at a world position (1 = fully lit).
在文件 BeerLightCache.cpp 第 85 行定义.
引用了 bounds, cell, idx, local, world, x, y , 以及 z.
被这些函数引用 eve::graphics::fog::FogFroxelBridge::integrate() , 以及 eve::graphics::fog::FogRayMarch::integrate().
◆ valid()
|
inlinenoexcept |
◆ version()
|
inlinenoexcept |
在文件 BeerLightCache.h 第 31 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/fog/BeerLightCache.h
- src/modules/graphics/fog/BeerLightCache.cpp