MOS
fog.hpp
1 #pragma once
2 #include <glm/glm.hpp>
3 
4 namespace mos::gfx {
5 
7 class Fog final {
8 public:
11  explicit Fog(const glm::vec3 &color, float attenuation_factor = 0.0f,
12  const float min = 0.0f, const float max = 1.0f);
13 
17  explicit Fog(const glm::vec3 &color_near = glm::vec3(1.0f),
18  const glm::vec3 &color_far = glm::vec3(1.0f),
19  float attenuation_factor = 0.0f, const float min = 0.0f,
20  const float max = 1.0f);
21 
23  glm::vec3 color_near{1.0f};
24 
26  glm::vec3 color_far{1.0f};
27 
29  float attenuation_factor{0.0f};
30 
32  float min{0.0f};
33 
35  float max{1.0f};
36 };
37 } // namespace mos::gfx
Fog with exponential falloff and near/far color blending.
Definition: fog.hpp:7
glm::vec3 color_far
Color far from the camera.
Definition: fog.hpp:26
glm::vec3 color_near
Color close to the camera.
Definition: fog.hpp:23
Fog(const glm::vec3 &color, float attenuation_factor=0.0f, const float min=0.0f, const float max=1.0f)
float max
Maximum clamp value.
Definition: fog.hpp:35
Definition: assets.hpp:17
float min
Minimum clamp value.
Definition: fog.hpp:32
float attenuation_factor
Dencity of the fog.
Definition: fog.hpp:29