GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::Fog3DOptions Struct Reference

Configuration options for a Fog3D. More...

#include <GREM/graphics_3d/Fog3D.hpp>

Public Member Functions

constexpr bool operator== (const Fog3DOptions &other) const noexcept=default
 Compare these options to another set of options for equality.

Public Attributes

float startDistance = 0.0f
 Distance from the camera's position to where visible fog starts.
float endDistance = 1000.0f
 Distance from the camera's position to where fog reaches its maximum density.
Color color = Color::INVISIBLE
 Color of the fog, where the alpha component represents the fraction of the maximum density reached by the fog at its end distance.
vec3 skyFadeDirection {0.0f, 1.0f, 0.0f}
 Direction in which the fog gradually fades out to reveal the skybox according to skyFadeMinAngle and skyFadeMaxAngle (typically towards the sky).
float skyFadeMinAngle = 1.4835299f
 Angle from skyFadeDirection, in radians, at which fog starts to appear in the skybox.
float skyFadeMaxAngle = 1.5707963f
 Angle from skyFadeDirection, in radians, at which fog reaches its maximum density in the skybox.

Detailed Description

Configuration options for a Fog3D.

Member Function Documentation

◆ operator==()

bool grem::graphics::Fog3DOptions::operator== ( const Fog3DOptions & other) const
nodiscardconstexprdefaultnoexcept

Compare these options to another set of options for equality.

Parameters
otherthe options to compare these to.
Returns
true if the options are equal, false otherwise.

Member Data Documentation

◆ startDistance

float grem::graphics::Fog3DOptions::startDistance = 0.0f

Distance from the camera's position to where visible fog starts.

Must be less than endDistance.

◆ endDistance

float grem::graphics::Fog3DOptions::endDistance = 1000.0f

Distance from the camera's position to where fog reaches its maximum density.

Must be greater than startDistance.

◆ color

Color grem::graphics::Fog3DOptions::color = Color::INVISIBLE

Color of the fog, where the alpha component represents the fraction of the maximum density reached by the fog at its end distance.

◆ skyFadeDirection

vec3 grem::graphics::Fog3DOptions::skyFadeDirection {0.0f, 1.0f, 0.0f}

Direction in which the fog gradually fades out to reveal the skybox according to skyFadeMinAngle and skyFadeMaxAngle (typically towards the sky).

◆ skyFadeMinAngle

float grem::graphics::Fog3DOptions::skyFadeMinAngle = 1.4835299f

Angle from skyFadeDirection, in radians, at which fog starts to appear in the skybox.

Note
If this is greater than or equal to skyFadeMaxAngle, sky fog is disabled.

◆ skyFadeMaxAngle

float grem::graphics::Fog3DOptions::skyFadeMaxAngle = 1.5707963f

Angle from skyFadeDirection, in radians, at which fog reaches its maximum density in the skybox.

Note
If this is less than or equal to skyFadeMinAngle, directional fade is disabled.

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