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

Configuration options for an infinitesimally small point light source, which can be used to approximate e.g. a light bulb. More...

#include <GREM/graphics_3d/Lights3D.hpp>

Public Member Functions

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

Public Attributes

vec3 position {0.0f, 0.0f, 0.0f}
 Position of the light, in world coordinates.
float range = 10.0f
 Maximum range of the light, in world coordinates, beyond which the light will have no effect, or a non-positive value for infinite range.
Color color = Color::WHITE
 Color of the light, where the alpha component controls the light's intensity.
float shadowNearZ = 0.01f
 Distance to the near plane of the light's shadow map.
float shadowFarZ = 100.0f
 Distance to the near plane of the light's shadow map.
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 an infinitesimally small point light source, which can be used to approximate e.g. a light bulb.

Member Function Documentation

◆ operator==()

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

◆ position

vec3 grem::graphics::PointLightOptions3D::position {0.0f, 0.0f, 0.0f}

Position of the light, in world coordinates.

◆ range

float grem::graphics::PointLightOptions3D::range = 10.0f

Maximum range of the light, in world coordinates, beyond which the light will have no effect, or a non-positive value for infinite range.

◆ color

Color grem::graphics::PointLightOptions3D::color = Color::WHITE

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

◆ shadowNearZ

float grem::graphics::PointLightOptions3D::shadowNearZ = 0.01f

Distance to the near plane of the light's shadow map.

Must be less than shadowFarZ.

◆ shadowFarZ

float grem::graphics::PointLightOptions3D::shadowFarZ = 100.0f

Distance to the near plane of the light's shadow map.

Must be greater than shadowNearZ.

◆ shadowMapNormalOffsetBiasConstantFactor

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

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

◆ shadowMapNormalOffsetBiasSlopeFactor

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

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

◆ shadowMapped

bool grem::graphics::PointLightOptions3D::shadowMapped = true

Whether the light should use shadow mapping or not.


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