MOS
Public Member Functions | Public Attributes | List of all members
mos::gfx::Fog Class Referencefinal

Fog with exponential falloff and near/far color blending. More...

#include <fog.hpp>

Public Member Functions

 Fog (const glm::vec3 &color, float attenuation_factor=0.0f, const float min=0.0f, const float max=1.0f)
 
 Fog (const glm::vec3 &color_near=glm::vec3(1.0f), const glm::vec3 &color_far=glm::vec3(1.0f), float attenuation_factor=0.0f, const float min=0.0f, const float max=1.0f)
 

Public Attributes

glm::vec3 color_near {1.0f}
 Color close to the camera. More...
 
glm::vec3 color_far {1.0f}
 Color far from the camera. More...
 
float attenuation_factor {0.0f}
 Dencity of the fog. More...
 
float min {0.0f}
 Minimum clamp value. More...
 
float max {1.0f}
 Maximum clamp value. More...
 

Detailed Description

Fog with exponential falloff and near/far color blending.

Constructor & Destructor Documentation

◆ Fog() [1/2]

mos::gfx::Fog::Fog ( const glm::vec3 &  color,
float  attenuation_factor = 0.0f,
const float  min = 0.0f,
const float  max = 1.0f 
)
explicit
Parameters
colorColor of the fog.
attenuation_factorFog density.

◆ Fog() [2/2]

mos::gfx::Fog::Fog ( const glm::vec3 &  color_near = glm::vec3(1.0f),
const glm::vec3 &  color_far = glm::vec3(1.0f),
float  attenuation_factor = 0.0f,
const float  min = 0.0f,
const float  max = 1.0f 
)
explicit
Parameters
color_nearClose fog color.
color_farFar fog color.
attenuation_factorFog density.

Member Data Documentation

◆ attenuation_factor

float mos::gfx::Fog::attenuation_factor {0.0f}

Dencity of the fog.

◆ color_far

glm::vec3 mos::gfx::Fog::color_far {1.0f}

Color far from the camera.

◆ color_near

glm::vec3 mos::gfx::Fog::color_near {1.0f}

Color close to the camera.

◆ max

float mos::gfx::Fog::max {1.0f}

Maximum clamp value.

◆ min

float mos::gfx::Fog::min {0.0f}

Minimum clamp value.


The documentation for this class was generated from the following file: