2020-06-02 11:46:18 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include "MinimalEngine.h"
|
|
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
|
|
|
|
struct ExpressionInput
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
struct ExpressionOutput
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
struct ShaderExpression
|
|
|
|
|
{
|
|
|
|
|
};
|
2020-10-03 11:00:10 +02:00
|
|
|
DECLARE_NAME_REF(Gfx, DescriptorSet);
|
2020-06-02 11:46:18 +02:00
|
|
|
struct ShaderParameter : public ShaderExpression
|
|
|
|
|
{
|
|
|
|
|
std::string name;
|
2020-10-03 11:00:10 +02:00
|
|
|
uint32 byteOffset;
|
|
|
|
|
uint32 binding;
|
|
|
|
|
ShaderParameter(std::string name, uint32 byteOffset, uint32 binding);
|
|
|
|
|
virtual ~ShaderParameter();
|
|
|
|
|
// update a descriptorset, in case of a uniform buffer, copy the data to the dst + byteOffset
|
|
|
|
|
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) = 0;
|
2020-06-02 11:46:18 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(ShaderParameter);
|
|
|
|
|
struct FloatParameter : public ShaderParameter
|
|
|
|
|
{
|
2020-10-03 11:00:10 +02:00
|
|
|
float data;
|
|
|
|
|
FloatParameter(std::string name, uint32 byteOffset, uint32 binding);
|
|
|
|
|
virtual ~FloatParameter();
|
|
|
|
|
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
2020-06-02 11:46:18 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(FloatParameter);
|
|
|
|
|
struct VectorParameter : public ShaderParameter
|
|
|
|
|
{
|
2020-10-03 11:00:10 +02:00
|
|
|
Vector data;
|
|
|
|
|
VectorParameter(std::string name, uint32 byteOffset, uint32 binding);
|
|
|
|
|
virtual ~VectorParameter();
|
|
|
|
|
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
2020-06-02 11:46:18 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(VectorParameter);
|
2020-10-03 11:00:10 +02:00
|
|
|
DECLARE_REF(TextureAsset);
|
2020-06-02 11:46:18 +02:00
|
|
|
struct TextureParameter : public ShaderParameter
|
|
|
|
|
{
|
2020-10-03 11:00:10 +02:00
|
|
|
PTextureAsset data;
|
|
|
|
|
TextureParameter(std::string name, uint32 byteOffset, uint32 binding);
|
|
|
|
|
virtual ~TextureParameter();
|
|
|
|
|
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
2020-06-02 11:46:18 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(TextureParameter);
|
|
|
|
|
DECLARE_NAME_REF(Gfx, SamplerState);
|
|
|
|
|
struct SamplerParameter : public ShaderParameter
|
|
|
|
|
{
|
2020-10-03 11:00:10 +02:00
|
|
|
Gfx::PSamplerState data;
|
|
|
|
|
SamplerParameter(std::string name, uint32 byteOffset, uint32 binding);
|
|
|
|
|
virtual ~SamplerParameter();
|
|
|
|
|
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
2020-06-02 11:46:18 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(SamplerParameter);
|
|
|
|
|
|
|
|
|
|
} // namespace Seele
|