#pragma once #include #include "resources/shader.h" #include "resources/texture.h" // a material is just a shader with assigned textures/parameters namespace engine { // copyable class Material { public: Material(Renderer* renderer, std::shared_ptr shader); ~Material(); Material& operator=(const Material&) = delete; void SetAlbedoTexture(std::shared_ptr texture); void SetNormalTexture(std::shared_ptr texture); void SetOcclusionRoughnessMetallicTexture(std::shared_ptr texture); const gfx::DescriptorSet* GetDescriptorSet() { return material_set_; } Shader* GetShader() { return shader_.get(); } private: const std::shared_ptr shader_; std::shared_ptr texture_albedo_; std::shared_ptr texture_normal_; std::shared_ptr texture_occlusion_roughness_metallic_; const gfx::DescriptorSet* material_set_ = nullptr; Renderer* const renderer_; }; } // namespace engine