RavEngine
Loading...
Searching...
No Matches
RavEngine::PBRMaterialInstance Class Reference

#include <BuiltinMaterials.hpp>

Inheritance diagram for RavEngine::PBRMaterialInstance:
[legend]
Collaboration diagram for RavEngine::PBRMaterialInstance:
[legend]

Public Member Functions

 PBRMaterialInstance (Ref< PBRMaterial > m, uint32_t priority=0)
 
void SetAlbedoTexture (Ref< Texture > texture)
 
void SetNormalTexture (Ref< Texture > texture)
 
void SetSpecularTexture (Ref< Texture > texture)
 
void SetMetallicTexture (Ref< Texture > texture)
 
void SetRoughnessTexture (Ref< Texture > texture)
 
void SetAOTexture (Ref< Texture > texture)
 
void SetEmissiveTexture (Ref< Texture > texture)
 
void SetAlbedoColor (const ColorRGBA &c)
 
void SetMetallicTint (float c)
 
void SetSpecularTint (float c)
 
void SetRoughnessTint (float c)
 
virtual const RGL::untyped_span GetPushConstantData () const override
 
- Public Member Functions inherited from RavEngine::MaterialInstance
auto GetPriority () const
 
const auto & GetBufferBindings () const
 
const auto & GetTextureBindings () const
 
auto GetMat ()
 

Additional Inherited Members

- Static Public Attributes inherited from RavEngine::MaterialInstance
static constexpr uint8_t maxBindingSlots = 12
 
- Protected Member Functions inherited from RavEngine::MaterialInstance
 MaterialInstance (const decltype(mat)&m, const decltype(priority) p=0)
 
- Protected Attributes inherited from RavEngine::MaterialInstance
std::array< RGLBufferPtr, maxBindingSlots > bufferBindings
 
std::array< Ref< Texture >, maxBindingSlots > textureBindings
 
const uint32_t priority
 
MaterialVariant mat
 

Detailed Description

Allows attaching a PBR material to an object. Don't subclass this if you have a custom material. Instead, subclass LitMaterialInstance

Member Function Documentation

◆ GetPushConstantData()

virtual const RGL::untyped_span RavEngine::PBRMaterialInstance::GetPushConstantData ( ) const
inlineoverridevirtual
Returns
a byte view to the push constant data for the material. The data is appended after the viewProj mat4. Returning a span of size 0, or with a nullptr pointer means that the material has no additional push constants.

Reimplemented from RavEngine::MaterialInstance.


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