|
CeresEngine 0.2.0
A game development framework
|
A renderer material that represents a PBR model material. More...
#include <CeresEngine/Renderer/RendererMaterial.hpp>
Classes | |
| class | Property |
Public Member Functions | |
| RendererMaterialPBR (RendererMaterialManager &manager, const SPtr< PBRMaterial > &material) | |
Creates a new renderer material from the given model on the given render API device. | |
| void | prepare (RendererContext &context) override |
| Prepares the material for the rendering of the current frame. | |
| void | fillResourceSetDescriptor (GPUShaderResourceSetBindings &bindings) const final |
Fills a ReflectedResourceSetDescriptor with the material parameters. | |
| const GPUShaderProgramPtr & | getShaderProgram () const final |
| Gets the shader program used by the material. | |
| const GPUUniformBuffer & | getUniformBuffer () const final |
| Returns the uniform buffer that holds material parameters. | |
| const GPUResourceSetPtr & | getResourceSet () const final |
| Returns the ResourceSet that holds material parameters. | |
| GPUResourceSetDescriptor | getResourceSetDescriptor () const final |
| Returns the ResourceSet bindings that holds material parameters. | |
| const PBRMaterialModel & | getModel () const noexcept |
| A copy of the PBR material model structure. | |
| void | bind (GPUCommandBuffer &commandBuffer) final |
| Binds the material to the given command buffer. | |
Public Member Functions inherited from CeresEngine::RendererMaterial | |
| RendererMaterial (RendererMaterialManager &manager) | |
| Creates a new renderer material. | |
| virtual | ~RendererMaterial ()=default |
| Virtual defaulted destructor. | |
| UInt32 | getID () const noexcept |
| A unique ID that can be used to uniquely identify the material in the bindless material resource set. | |
| bool | isDirty () const noexcept |
| void | markAsDirty () noexcept |
Public Attributes | |
| const Property< Color > | baseColor |
| A material channel that represents the base color (or albedo) of the material. | |
| const Property< double > | roughness |
| A material channel that represents the roughness map of the material. | |
| const Property< double > | metallic |
| A material channel that represents the metallic map of the material. | |
| const Property< Vector3 > | normal |
| A material channel that represents the normal map of the material. | |
| const Property< Color > | emission |
| The material emission property. | |
| const Property< Vector3 > | displacement |
| The material displacement property. | |
| const Property< double > | ambientOcclusion |
| The material ambient occlusion property. | |
Private Member Functions | |
| void | onImageChanged () |
| void | didChangeMaterialModel (const PBRMaterialModel &newModel) |
An event called whenever the associated PBRMaterialModel has a property changed. | |
Private Attributes | |
| SPtr< PBRMaterial > | mMaterial |
| The material resource referneced by this renderer material. | |
| PBRMaterialModel | mModel |
| A copy of the PBR material model structure. | |
| GPUShaderProgramPtr | mShaderProgram |
| The deferred PBR shader program. | |
| GPUPipelineLayoutPtr | mPipelineLayout |
| The deferred PBR shader pipeline layout. | |
| GPUDynamicUniformBuffer< PBRMaterialParams > | mUniformBuffer |
| The uniform buffer that holds GPU parameters for the material. | |
| GPUResourceSetDescriptor | mResourceSetDescriptor |
| GPUResourceSetPtr | mResourceSet |
| The ResourceSet with renderer material parameters. | |
| UInt64 | mHash = ~0u |
Friends | |
| class | RendererMaterialManager |
Additional Inherited Members | |
Protected Attributes inherited from CeresEngine::RendererMaterial | |
| RendererMaterialManager & | mManager |
| The material manager that owns and manages this material instance. | |
| Renderer & | mRenderer |
| The renderer that owns the material. | |
| UInt32 | mID = ~0u |
| A unique ID that can be used to uniquely identify the material in the bindless material resource set. | |
| bool | mDirty = true |
A renderer material that represents a PBR model material.
|
explicit |
Creates a new renderer material from the given model on the given render API device.
|
finalvirtual |
Binds the material to the given command buffer.
Implements CeresEngine::RendererMaterial.
|
private |
An event called whenever the associated PBRMaterialModel has a property changed.
|
finalvirtual |
Fills a ReflectedResourceSetDescriptor with the material parameters.
The parameters are filled by name.
| bindings | The bindings to be filled with material parameters. |
Implements CeresEngine::RendererMaterial.
|
inlinenoexcept |
A copy of the PBR material model structure.
|
inlinefinalvirtual |
Returns the ResourceSet that holds material parameters.
Implements CeresEngine::RendererMaterial.
|
inlinefinalvirtual |
Returns the ResourceSet bindings that holds material parameters.
Implements CeresEngine::RendererMaterial.
|
inlinefinalvirtual |
Gets the shader program used by the material.
Implements CeresEngine::RendererMaterial.
|
inlinefinalvirtual |
Returns the uniform buffer that holds material parameters.
Implements CeresEngine::RendererMaterial.
|
private |
|
overridevirtual |
Prepares the material for the rendering of the current frame.
This will update uniform buffers and perform any other necessary operations necessary for rendering. All prepared data must be view independent.
| context | A context struct that contains parameters given by the renderer. |
Implements CeresEngine::RendererMaterial.
|
friend |
The material ambient occlusion property.
A material channel that represents the base color (or albedo) of the material.
The material displacement property.
A material channel that represents the metallic map of the material.
|
private |
|
private |
The material resource referneced by this renderer material.
|
private |
A copy of the PBR material model structure.
|
private |
The deferred PBR shader pipeline layout.
This is used to create new ResourceSets and is inferred from the shader program.
|
private |
The ResourceSet with renderer material parameters.
|
private |
|
private |
The deferred PBR shader program.
|
private |
The uniform buffer that holds GPU parameters for the material.
A material channel that represents the normal map of the material.
A material channel that represents the roughness map of the material.