esp::gfx::PbrDrawable::PBRMaterialCache struct

This cache holds all the material quantities and attributes from the Magnum MaterialData to speed up access in draw.

Public types

struct AnisotropyLayer
struct ClearCoat
struct SpecularLayer
struct TransmissionLayer
struct VolumeLayer

Public variables

Mn::Color4 baseColor
float roughness
float metalness
Mn::Color3 emissiveColor
Mn::Matrix3 textureMatrix
Mn::GL::Texture2D* baseColorTexture
Mn::GL::Texture2D* noneRoughnessMetallicTexture
Mn::GL::Texture2D* emissiveTexture
Mn::GL::Texture2D* normalTexture
float normalTextureScale
struct esp::gfx::PbrDrawable::PBRMaterialCache::ClearCoat clearCoat
float ior_Index
struct esp::gfx::PbrDrawable::PBRMaterialCache::SpecularLayer specularLayer
struct esp::gfx::PbrDrawable::PBRMaterialCache::AnisotropyLayer anisotropyLayer
struct esp::gfx::PbrDrawable::PBRMaterialCache::TransmissionLayer transmissionLayer
struct esp::gfx::PbrDrawable::PBRMaterialCache::VolumeLayer volumeLayer

Variable documentation

Mn::GL::Texture2D* esp::gfx::PbrDrawable::PBRMaterialCache::noneRoughnessMetallicTexture

Currently we only support a single noneRoughnessMetallicTexture texture for both metalness and roughness.

float esp::gfx::PbrDrawable::PBRMaterialCache::ior_Index

Index of refraction of material. Generally between 1-2, although values higher than 2 are possible. Defaults to 1.5.

dielectricSpecular = ((ior - 1)/(ior + 1))^2 default ior value evaluates to dielectricSpecular = 0.04