# struct hiro::draw::FacesStyle

## Overview

Face rendering stylization. More…

    #include <ElementRenderer.h>

    struct FacesStyle {
        // enums

        enum NormalSource;

        // fields

        bool back_face_culling = false;
        bool wireframe = false;
        hiro::shader::Material material;
        hiro::draw::ColorSource color_source = hiro::draw::ColorSource::material;
        glw::PTexture2D albedo_texture = nullptr;
        hiro::draw::FacesStyle::NormalSource normal_source = hiro::draw::FacesStyle::NormalSource::flat_normals;
        glw::PTexture2D normal_texture = nullptr;
        bool use_matcap = false;
        glw::PTexture2D matcap_sampler = nullptr;
    };

## Detailed Documentation

Face rendering stylization.

### 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.