maybe finished, all examples test OK!
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include<hgl/type/String.h>
|
||||
#include<hgl/type/List.h>
|
||||
#include<hgl/graph/VertexAttrib.h>
|
||||
#include<hgl/graph/VKInterpolation.h>
|
||||
#include<hgl/graph/VKSamplerType.h>
|
||||
@@ -380,6 +381,8 @@ namespace hgl
|
||||
Interpolation interpolation; //插值方式
|
||||
};
|
||||
|
||||
using SVList=List<ShaderVariable>;
|
||||
|
||||
struct ShaderVariableArray
|
||||
{
|
||||
uint count;
|
||||
@@ -531,9 +534,11 @@ namespace hgl
|
||||
|
||||
if(sv->interpolation!=Interpolation::Smooth)
|
||||
{
|
||||
output_string+=InterpolationName[size_t(sv->interpolation)];
|
||||
|
||||
output_string+=" ";
|
||||
if(RangeCheck(sv->interpolation))
|
||||
{
|
||||
output_string+=InterpolationName[size_t(sv->interpolation)];
|
||||
output_string+=" ";
|
||||
}
|
||||
}
|
||||
|
||||
output_string+=sv->type.GetTypename();
|
||||
|
@@ -25,6 +25,7 @@ public:
|
||||
ShaderCreateInfoFragment(MaterialDescriptorInfo *m):ShaderCreateInfo(){ShaderCreateInfo::Init(&fsdi,m);}
|
||||
~ShaderCreateInfoFragment()=default;
|
||||
|
||||
int AddOutput(VIAList &);
|
||||
int AddOutput(const graph::VAType &type,const AnsiString &name,Interpolation inter=Interpolation::Smooth);
|
||||
int AddOutput(const AnsiString &type,const AnsiString &name,Interpolation inter=Interpolation::Smooth);
|
||||
};
|
||||
|
@@ -26,6 +26,7 @@ public:
|
||||
|
||||
bool SetGeom(const Prim &ip,const Prim &op,const uint32_t mv);
|
||||
|
||||
int AddOutput(SVList &);
|
||||
int AddOutput(const ShaderVariableType &type,const AnsiString &name,Interpolation inter=Interpolation::Smooth);
|
||||
void AddMaterialInstanceOutput() override;
|
||||
|
||||
|
@@ -18,6 +18,8 @@ namespace hgl
|
||||
void GetOutputStrcutString(AnsiString &str) override;
|
||||
|
||||
public:
|
||||
|
||||
VIAArray &GetInput(){return vsdi.GetInput();}
|
||||
|
||||
ShaderDescriptorInfo *GetSDI()override{return &vsdi;}
|
||||
|
||||
@@ -26,11 +28,13 @@ namespace hgl
|
||||
ShaderCreateInfoVertex(MaterialDescriptorInfo *m):ShaderCreateInfo(){ShaderCreateInfo::Init(&vsdi,m);}
|
||||
~ShaderCreateInfoVertex()override=default;
|
||||
|
||||
int AddInput(VIAList &);
|
||||
int AddInput(const graph::VAType &type,const AnsiString &name,const VkVertexInputRate input_rate=VK_VERTEX_INPUT_RATE_VERTEX,const VertexInputGroup &group=VertexInputGroup::Basic);
|
||||
int AddInput(const AnsiString &type,const AnsiString &name,const VkVertexInputRate input_rate=VK_VERTEX_INPUT_RATE_VERTEX,const VertexInputGroup &group=VertexInputGroup::Basic);
|
||||
|
||||
int hasInput(const char *);
|
||||
|
||||
int AddOutput(SVList &);
|
||||
int AddOutput(const SVType &type,const AnsiString &name,Interpolation inter=Interpolation::Smooth);
|
||||
void AddMaterialInstanceOutput() override;
|
||||
|
||||
|
Reference in New Issue
Block a user