Visual Computing Library  devel
Loading...
Searching...
No Matches
vcl::MaterialUniforms Class Reference

The MaterialUniforms class is responsible for managing the shader uniforms related to a material. More...

#include <vclib/bgfx/drawable/uniforms/material_uniforms.h>

Static Public Member Functions

static void bind ()
 
static void set (const Material &m, bool vertexColorAvailable, const std::array< bool, N_TEXTURES > &textureAvailable, bool vertexTangentAvailable, bool imageBasedLighting)
 

Static Private Attributes

static const uint N_TEXTURES = toUnderlying(Material::TextureType::COUNT)
 
static std::array< float, 4 > sBaseColor = {1.0, 1.0, 1.0, 1.0}
 
static Uniform sBaseColorUniform
 
static std::array< float, 4 > sEmissiveAlphaCutoffPack
 
static Uniform sEmissiveAlphaCutoffPackUniform
 
static std::array< float, 4 > sFactorsPack
 
static Uniform sFactorsPackUniform
 
static std::array< float, 4 > sSettings = {0.0, 0.0, 0.0, 0.0}
 
static Uniform sSettingsUniform
 

Detailed Description

The MaterialUniforms class is responsible for managing the shader uniforms related to a material.

It provides a static interface to set the uniform data based on the current material data and to bind the uniforms to the shader programs.

Member Data Documentation

◆ sEmissiveAlphaCutoffPack

std::array<float, 4> vcl::MaterialUniforms::sEmissiveAlphaCutoffPack
inlinestaticprivate
Initial value:
=
{0.0, 0.0, 0.0, 0.5}

◆ sFactorsPack

std::array<float, 4> vcl::MaterialUniforms::sFactorsPack
inlinestaticprivate
Initial value:
= {
1.0,
1.0,
1.0,
1.0
}

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