2023-01-21 18:43:21 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include "MaterialInterface.h"
|
|
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
|
|
|
|
DECLARE_REF(Material)
|
|
|
|
|
class MaterialInstance : public MaterialInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
2023-01-29 18:58:59 +01:00
|
|
|
MaterialInstance(Gfx::PGraphics graphics, PMaterial baseMaterial);
|
2023-01-21 18:43:21 +01:00
|
|
|
virtual ~MaterialInstance();
|
|
|
|
|
virtual Gfx::PDescriptorSet createDescriptorSet();
|
|
|
|
|
virtual Gfx::PDescriptorLayout getDescriptorLayout() const;
|
|
|
|
|
|
|
|
|
|
// The name of the generated material shader, opposed to the name of the .asset file
|
|
|
|
|
virtual const std::string& getName();
|
|
|
|
|
virtual const Gfx::ShaderCollection* getShaders(Gfx::RenderPassType renderPass, VertexInputType* vertexInput) const;
|
|
|
|
|
virtual Gfx::ShaderCollection& createShaders(Gfx::PGraphics graphics, Gfx::RenderPassType renderPass, VertexInputType* vertexInput);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
PMaterial baseMaterial;
|
|
|
|
|
};
|
|
|
|
|
DEFINE_REF(MaterialInstance)
|
|
|
|
|
} // namespace Seele
|