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

Configuration options for a 3D decal. More...

#include <GREM/graphics_3d/Decals3D.hpp>

Public Member Functions

constexpr bool operator== (const DecalOptions3D &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, in world coordinates, to render the decal at.
float range = 0.5f
 Maximum range from the position, in world coordinates, where the decal will apply to meshes.
quat orientation {0.0f, 0.0f, 0.0f, 1.0f}
 Rotation of the decal around its DecalOptions3D::origin.
vec2 size {1.0f, 1.0f}
 Size of the decal, in world coordinates.
vec2 origin {0.5f, 0.5f}
 Offset, in local vertex coordinates, specifying the origin relative to the bottom left of the decal.
Color color = Color::WHITE
 Tint color to use in the shader.
vec3 emissiveFactor {1.0f, 1.0f, 1.0f}
 Emissive factor to use in the shader.
uint32_t modelInstanceIdentifier = Limits<uint32_t>::MAX
 Model instance identifier that the decal applies to, or the maximum value to apply to all instances.

Detailed Description

Configuration options for a 3D decal.

Member Function Documentation

◆ operator==()

bool grem::graphics::DecalOptions3D::operator== ( const DecalOptions3D & 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::DecalOptions3D::position {0.0f, 0.0f, 0.0f}

Position, in world coordinates, to render the decal at.

◆ range

float grem::graphics::DecalOptions3D::range = 0.5f

Maximum range from the position, in world coordinates, where the decal will apply to meshes.

◆ orientation

quat grem::graphics::DecalOptions3D::orientation {0.0f, 0.0f, 0.0f, 1.0f}

Rotation of the decal around its DecalOptions3D::origin.

◆ size

vec2 grem::graphics::DecalOptions3D::size {1.0f, 1.0f}

Size of the decal, in world coordinates.

◆ origin

vec2 grem::graphics::DecalOptions3D::origin {0.5f, 0.5f}

Offset, in local vertex coordinates, specifying the origin relative to the bottom left of the decal.

For example, a value of (0.5, 0.5) corresponds to the middle of the decal.

◆ color

Color grem::graphics::DecalOptions3D::color = Color::WHITE

Tint color to use in the shader.

Note
In the default shader, the output color is multiplied by this value, meaning that a value of Color::WHITE, i.e. RGBA(1, 1, 1, 1) in linear color, represents no modification to the original texture color.

◆ emissiveFactor

vec3 grem::graphics::DecalOptions3D::emissiveFactor {1.0f, 1.0f, 1.0f}

Emissive factor to use in the shader.

Note
In the default PBR shader, the emissive color is multiplied by this value, meaning that a value of (1, 1, 1) represents no modification to the original emissive map color.

◆ modelInstanceIdentifier

uint32_t grem::graphics::DecalOptions3D::modelInstanceIdentifier = Limits<uint32_t>::MAX

Model instance identifier that the decal applies to, or the maximum value to apply to all instances.


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