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

Configuration of a 3D sprite instance from a SpriteAtlas to draw. More...

#include <GREM/graphics_3d/Instances3D.hpp>

Public Attributes

vec3 position {0.0f, 0.0f, 0.0f}
 Position, in world coordinates, to draw the sprite at.
quat orientation {0.0f, 0.0f, 0.0f, 1.0f}
 Rotation of the sprite around its SpriteInstance3D::origin.
vec2 size {1.0f, 1.0f}
 Size of the sprite, in world coordinates.
vec2 origin {0.0f, 0.0f}
 Offset, in local vertex coordinates, specifying the origin relative to the bottom left of the sprite.
Color color = Color::WHITE
 Tint color to use in the shader.
Color emissiveColor = Color::INVISIBLE
 Emissive color to use in the shader.
float distanceOrderingBias = 0.0f
 Bias to subtract from the sprite's distance from the camera, which is used for distance ordering when drawing transparent meshes.

Detailed Description

Configuration of a 3D sprite instance from a SpriteAtlas to draw.

Member Data Documentation

◆ position

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

Position, in world coordinates, to draw the sprite at.

◆ orientation

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

Rotation of the sprite around its SpriteInstance3D::origin.

◆ size

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

Size of the sprite, in world coordinates.

◆ origin

vec2 grem::graphics::SpriteInstance3D::origin {0.0f, 0.0f}

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

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

◆ color

Color grem::graphics::SpriteInstance3D::color = Color::WHITE

Tint color to use in the shader.

Note
In the default shaders, the base 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.

◆ emissiveColor

Color grem::graphics::SpriteInstance3D::emissiveColor = Color::INVISIBLE

Emissive color to use in the shader.

Note
In the default shaders, the base color has this value added to it, meaning that a value of Color::INVISIBLE, i.e. RGBA(0, 0, 0, 0) in linear color, represents no modification to the original texture color.

◆ distanceOrderingBias

float grem::graphics::SpriteInstance3D::distanceOrderingBias = 0.0f

Bias to subtract from the sprite's distance from the camera, which is used for distance ordering when drawing transparent meshes.


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