HIRO_DRAW
Computer Graphics Structures library
hiro::draw::FacesStyle Struct Reference

Face rendering stylization. More...

Public Types

enum  NormalSource { NormalSource::flat_normals = 0, NormalSource::point_normals = 1, NormalSource::normal_texture = 2 }
 Available sources of normal vector. More...
 

Data Fields

bool back_face_culling = false
 When enabled, faces with flat normal vector turned away from the camera are hidden.
 
bool wireframe = false
 When enabled, only face edges are rendered.
 
hiro::shader::Material material
 Material setting for the faces.
 
hiro::draw::ColorSource color_source = hiro::draw::ColorSource::material
 Color source used to colorize the faces.
 
glw::PTexture2D albedo_texture = nullptr
 Albedo texture. To use, set color source to ColorSource::albedo_map.
 
hiro::draw::FacesStyle::NormalSource normal_source = hiro::draw::FacesStyle::NormalSource::flat_normals
 Normal source used to calculate the lighting.
 
glw::PTexture2D normal_texture = nullptr
 Normal texture. To use, set normal source to NormalSource::normal_map.
 
bool use_matcap = false
 When enabled, color and lighting is picked from matcap sampler texture.
 
glw::PTexture2D matcap_sampler = nullptr
 Matcap sampler. Used only when matcap rendering is enabled.
 

Detailed Description

Face rendering stylization.

Member Enumeration Documentation

◆ NormalSource

Available sources of normal vector.

Enumerator
flat_normals 

Normals are calculated from face orientations.

point_normals 

Per vertex normals are used. Requires normal attribute for vertices.

normal_texture 

Normals are picked from the normal texture. Requires normal texture.