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

Configuration options for a 3D light source representing a purely directional light with infinite range. More...

#include <GREM/graphics_3d/Lights3D.hpp>

Public Member Functions

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

Public Attributes

vec3 direction {0.0f, -1.0f, 0.0f}
 Vector representing the direction of the light, in world coordinates.
Color color = Color::WHITE
 Color of the light, where the alpha component controls the light's intensity.
float shadowMapNormalOffsetBiasConstantFactor = 0.04f
 Constant normal offset bias factor to use when sampling the shadow map of the light.
float shadowMapNormalOffsetBiasSlopeFactor = 1.0f
 Slope-scaled normal offset bias factor to use when sampling the shadow map of the light.
bool shadowMapped = true
 Whether the light should use shadow mapping or not.

Detailed Description

Configuration options for a 3D light source representing a purely directional light with infinite range.

Member Function Documentation

◆ operator==()

bool grem::graphics::DirectionalLightOptions3D::operator== ( const DirectionalLightOptions3D & 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

◆ direction

vec3 grem::graphics::DirectionalLightOptions3D::direction {0.0f, -1.0f, 0.0f}

Vector representing the direction of the light, in world coordinates.

◆ color

Color grem::graphics::DirectionalLightOptions3D::color = Color::WHITE

Color of the light, where the alpha component controls the light's intensity.

◆ shadowMapNormalOffsetBiasConstantFactor

float grem::graphics::DirectionalLightOptions3D::shadowMapNormalOffsetBiasConstantFactor = 0.04f

Constant normal offset bias factor to use when sampling the shadow map of the light.

◆ shadowMapNormalOffsetBiasSlopeFactor

float grem::graphics::DirectionalLightOptions3D::shadowMapNormalOffsetBiasSlopeFactor = 1.0f

Slope-scaled normal offset bias factor to use when sampling the shadow map of the light.

◆ shadowMapped

bool grem::graphics::DirectionalLightOptions3D::shadowMapped = true

Whether the light should use shadow mapping or not.


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