VkCV Framework  0.0.1
CV Vulkan framework
vkcv::asset::Material Struct Reference

#include <asset_loader.hpp>

Public Member Functions

bool hasTexture (PBRTextureTarget target) const
 

Public Attributes

uint16_t textureMask
 
int baseColor
 
int metalRough
 
int normal
 
int occlusion
 
int emissive
 
struct {
   float   r
 
   float   g
 
   float   b
 
   float   a
 
baseColorFactor
 
float metallicFactor
 
float roughnessFactor
 
float normalScale
 
float occlusionStrength
 
struct {
   float   r
 
   float   g
 
   float   b
 
emissiveFactor
 

Detailed Description

The asset loader module only supports the PBR-MetallicRoughness model for materials.

Member Function Documentation

◆ hasTexture()

bool vkcv::asset::Material::hasTexture ( PBRTextureTarget  target) const

To signal that a certain texture target is active in this Material struct, its bit is set in the textureMask. You can use this function to check that: if (myMaterial.hasTexture(baseColor)) {...}

Parameters
tThe target to query for
Returns
Boolean to signal whether the texture target is active in the material.

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