4#ifndef GREM_GRAPHICS_3D_FOG_3D_HPP
5#define GREM_GRAPHICS_3D_FOG_3D_HPP
149 GREM_API(graphics_3d)
void flush()
const;
153 mutable bool parameterBufferDirty =
true;
Floating-point linear RGBA color in the Rec.
Definition Color.hpp:60
static const Color INVISIBLE
Definition Color.hpp:70
Persistent system managing the rendering context of a Window.
Definition Device.hpp:68
void setFog(const Fog3DOptions &newFogOptions)
Set the fog parameters.
Fog3D(Device &device, const Fog3DOptions &options={})
Construct a fog.
UniformBuffer< Parameters, "Fog3DParameters"> ParameterBuffer
Shader buffer for fog parameters.
Definition Fog3D.hpp:115
Fog3DOptions getOptions() const noexcept
Get the configuration options of the fog.
Definition Fog3D.hpp:142
Persistent system that provides 3D rendering capabilities.
Definition Renderer3D.hpp:120
Definition buffer_layouts.hpp:20
vec< 4, float > vec4
Definition math.hpp:440
vec< 3, float > vec3
Definition math.hpp:439
Configuration options for a Fog3D.
Definition Fog3D.hpp:25
vec3 skyFadeDirection
Direction in which the fog gradually fades out to reveal the skybox according to skyFadeMinAngle and ...
Definition Fog3D.hpp:52
float endDistance
Distance from the camera's position to where fog reaches its maximum density.
Definition Fog3D.hpp:39
float startDistance
Distance from the camera's position to where visible fog starts.
Definition Fog3D.hpp:31
constexpr bool operator==(const Fog3DOptions &other) const noexcept=default
Compare these options to another set of options for equality.
Color color
Color of the fog, where the alpha component represents the fraction of the maximum density reached by...
Definition Fog3D.hpp:45
float skyFadeMaxAngle
Angle from skyFadeDirection, in radians, at which fog reaches its maximum density in the skybox.
Definition Fog3D.hpp:70
float skyFadeMinAngle
Angle from skyFadeDirection, in radians, at which fog starts to appear in the skybox.
Definition Fog3D.hpp:61
Struct of shader parameters representing the fog's appearance.
Definition Fog3D.hpp:88
vec3 fogSkyFadeDirection
Direction in which the fog gradually fades out to reveal the skybox (typically towards the sky).
Definition Fog3D.hpp:111
vec4 fogColorAndMaxDensity
Color (XYZ) and fraction of maximum density (W) reached by fog at its end distance.
Definition Fog3D.hpp:105
vec4 fogStartAndEndDistancesAndSkyFadeMinAndMaxAngleCosines
Distance from the camera's position to where visible fog starts (X) and to where it reaches its maxim...
Definition Fog3D.hpp:99