Skip to content
Snippets Groups Projects
Commit cdbfa863 authored by Lars Hoerttrich's avatar Lars Hoerttrich
Browse files

[#57] moved descriptorSetHandle to material-class

parent 49066023
No related branches found
No related tags found
1 merge request!44Resolve "Material (Modul)"
Pipeline #25648 failed
#pragma once
#include <vkcv/Handles.hpp>
namespace vkcv::material {
class Material {
private:
public:
const DescriptorSetHandle m_DescriptorSetHandle;
protected:
Material(const DescriptorSetHandle& setHandle);
};
}
......@@ -2,7 +2,6 @@
#include <vector>
#include <vkcv/Handles.hpp>
#include <vkcv/DescriptorConfig.hpp>
#include <vkcv/Core.hpp>
......@@ -13,15 +12,17 @@ namespace vkcv::material
{
class PBRMaterial : Material
{
private:
PBRMaterial(const ImageHandle& colorImg,
const SamplerHandle& colorSmp,
const ImageHandle& normalImg,
const SamplerHandle& normalSmp,
const ImageHandle& metRoughImg,
const SamplerHandle& metRoughSmp,
const DescriptorSetHandle& setHandle) noexcept;
public:
PBRMaterial() = delete;
PBRMaterial(const ImageHandle &colorImg,
const SamplerHandle &colorSmp,
const ImageHandle &normalImg,
const SamplerHandle &normalSmp,
const ImageHandle &metRoughImg,
const SamplerHandle &metRoughSmp,
const DescriptorSetHandle &setHandle) noexcept;
const ImageHandle m_ColorTexture;
const SamplerHandle m_ColorSampler;
......@@ -35,8 +36,6 @@ namespace vkcv::material
// ImageHandle m_OcclusionTexture;
// SamplerHandle m_EmissiveTexture;
const DescriptorSetHandle m_DescriptorSetHandle;
/*
* Returns the material's necessary descriptor bindings which serves as its descriptor layout
* The binding is in the following order:
......
......@@ -5,4 +5,8 @@ namespace vkcv::material {
//TODO
Material::Material(const DescriptorSetHandle& setHandle) : m_DescriptorSetHandle(setHandle)
{
}
}
......@@ -17,7 +17,7 @@ namespace vkcv::material
m_NormalSampler(normalSmp),
m_MetRoughTexture(metRoughImg),
m_MetRoughSampler(metRoughSmp),
m_DescriptorSetHandle(setHandle)
Material(setHandle)
{
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment