载入中...
搜索中...
未找到
FogRayMarch.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4#include "common/Result.h"
9
10#include <optional>
11
12#include <glm/vec3.hpp>
13
14namespace eve::graphics::fog {
15
19 enum class Kind : uint8_t { SkyShell, HeightLayer, Obb };
20
22 float skyRadius = 200.f;
23 float heightMin = 0.f;
24 float heightMax = 8.f;
25 glm::vec3 obbCenter{0.f};
26 glm::vec3 obbHalfExtents{4.f};
27 glm::vec3 obbAxisX{1.f, 0.f, 0.f};
28 glm::vec3 obbAxisY{0.f, 1.f, 0.f};
29 glm::vec3 obbAxisZ{0.f, 0.f, 1.f};
30};
31
39public:
41 [[nodiscard]] static std::optional<FogRayInterval> intersectBound(const glm::vec3& origin,
42 const glm::vec3& direction,
43 const FogVolumeBound& bound);
44
50 [[nodiscard]] Result<FogRayResult> integrate(const FogDensityField& field, const FogProfile& profile,
51 const glm::vec3& origin, const glm::vec3& direction,
52 const FogVolumeBound& bound, const glm::vec3& lightDir,
53 const glm::vec3& lightColor, float lightIntensity,
54 const glm::vec3& skyAmbient, const glm::vec3& groundAmbient,
55 int sampleCount, float sceneDepth,
56 const BeerLightCache* beerCache,
57 bool useAnalyticSegments) const;
58};
59
60} // namespace eve::graphics::fog
#define EVENGINE_API_WORLD
Definition Export.h:109
Move-only, checked operation results for the common layer.
V3 origin
Definition RoadBake.cpp:138
RoadLaneDirection direction
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Cached light-path transmittance used by Fast / Enhanced quality tiers.
World-space density bands, curl assist velocity, and lighting helpers.
Unit-density optical profile for participating media.
Definition FogProfile.h:16
World-space fog ray marcher with Beer–Lambert extinction and HG phase.
Definition FogRayMarch.h:38
Analytic volume used to bound a camera ray before sampling.
Definition FogRayMarch.h:17
glm::vec4 lightColor
glm::vec4 lightDir