2023-06-02 20:45:19 +08:00
|
|
|
|
#ifndef HGL_GRAPH_MTL_2D_CREATE_CONFIG_INCLUDE
|
|
|
|
|
#define HGL_GRAPH_MTL_2D_CREATE_CONFIG_INCLUDE
|
2023-05-15 21:52:57 +08:00
|
|
|
|
|
|
|
|
|
#include<hgl/graph/mtl/MaterialConfig.h>
|
|
|
|
|
#include<hgl/graph/CoordinateSystem.h>
|
|
|
|
|
|
|
|
|
|
STD_MTL_NAMESPACE_BEGIN
|
2023-06-02 20:45:19 +08:00
|
|
|
|
struct Material2DCreateConfig:public MaterialCreateConfig
|
2023-05-15 21:52:57 +08:00
|
|
|
|
{
|
|
|
|
|
CoordinateSystem2D coordinate_system; ///<使用的坐标系
|
|
|
|
|
|
|
|
|
|
bool local_to_world; ///<包含LocalToWorld矩阵
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2023-06-02 20:45:19 +08:00
|
|
|
|
Material2DCreateConfig(const GPUDeviceAttribute *da,const AnsiString &name):MaterialCreateConfig(da,name)
|
2023-05-15 21:52:57 +08:00
|
|
|
|
{
|
2023-05-15 22:05:21 +08:00
|
|
|
|
rt_output.color=1; //输出一个颜色
|
|
|
|
|
rt_output.depth=false; //不输出深度
|
|
|
|
|
rt_output.stencil=false; //不输出stencil
|
2023-05-15 21:52:57 +08:00
|
|
|
|
|
|
|
|
|
coordinate_system=CoordinateSystem2D::NDC;
|
|
|
|
|
local_to_world=false;
|
|
|
|
|
}
|
2023-06-02 20:45:19 +08:00
|
|
|
|
};//struct Material2DCreateConfig:public MaterialCreateConfig
|
2023-05-16 15:27:51 +08:00
|
|
|
|
|
2023-09-21 20:46:08 +08:00
|
|
|
|
namespace SamplerName
|
|
|
|
|
{
|
|
|
|
|
constexpr const char Color[]="TextureColor";
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-02 20:45:19 +08:00
|
|
|
|
MaterialCreateInfo *CreateVertexColor2D(const Material2DCreateConfig *);
|
|
|
|
|
MaterialCreateInfo *CreatePureColor2D(const Material2DCreateConfig *);
|
2023-09-21 20:46:08 +08:00
|
|
|
|
MaterialCreateInfo *CreatePureTexture2D(const Material2DCreateConfig *);
|
2023-09-21 21:36:55 +08:00
|
|
|
|
MaterialCreateInfo *CreateRectTexture2D(const Material2DCreateConfig *);
|
2023-05-15 21:52:57 +08:00
|
|
|
|
STD_MTL_NAMESPACE_END
|
2023-06-02 20:45:19 +08:00
|
|
|
|
#endif//HGL_GRAPH_MTL_2D_CREATE_CONFIG_INCLUDE
|