used simply VAT at ShaderCreateInfoVertex.h
This commit is contained in:
parent
8340209697
commit
9316135942
@ -1 +1 @@
|
||||
Subproject commit f57401620a52eaf3fdaaf5410beb9528aadaa49a
|
||||
Subproject commit b10387ad563ced36feb5cdd8eea3cdaed6e68bf6
|
@ -21,31 +21,24 @@ namespace hgl
|
||||
|
||||
void AddMaterialID()
|
||||
{
|
||||
constexpr const VAT vat{VertexAttribType::BaseType::UInt,1}; //使用uint8
|
||||
|
||||
AddInput(vat,VAN::MaterialInstanceID,VK_VERTEX_INPUT_RATE_VERTEX,VertexInputGroup::MaterialInstanceID);
|
||||
AddInput(VAT_UINT,VAN::MaterialInstanceID,VK_VERTEX_INPUT_RATE_INSTANCE,VertexInputGroup::MaterialInstanceID);
|
||||
}
|
||||
|
||||
void AddJoint()
|
||||
{
|
||||
constexpr const VAT id {VertexAttribType::BaseType::UInt,4}; //使用uint8[4]
|
||||
constexpr const VAT weight {VertexAttribType::BaseType::Float,4}; //使用uint8[4]
|
||||
|
||||
AddInput(id, VAN::JointID, VK_VERTEX_INPUT_RATE_VERTEX,VertexInputGroup::JointID);
|
||||
AddInput(weight,VAN::JointWeight,VK_VERTEX_INPUT_RATE_VERTEX,VertexInputGroup::JointWeight);
|
||||
AddInput(VAT_UVEC4, VAN::JointID, VK_VERTEX_INPUT_RATE_VERTEX,VertexInputGroup::JointID);
|
||||
AddInput(VAT_VEC4, VAN::JointWeight,VK_VERTEX_INPUT_RATE_VERTEX,VertexInputGroup::JointWeight);
|
||||
}
|
||||
|
||||
void AddLocalToWorld()
|
||||
{
|
||||
constexpr const VAT vat{VertexAttribType::BaseType::Float,4}; //使用float[4]
|
||||
|
||||
char name[]= "LocalToWorld_?";
|
||||
|
||||
for(uint i=0;i<4;i++)
|
||||
{
|
||||
name[sizeof(name)-2]='0'+i;
|
||||
|
||||
AddInput(vat,name,VK_VERTEX_INPUT_RATE_INSTANCE,VertexInputGroup::LocalToWorld);
|
||||
AddInput(VAT_VEC4,name,VK_VERTEX_INPUT_RATE_INSTANCE,VertexInputGroup::LocalToWorld);
|
||||
}
|
||||
}
|
||||
};//class ShaderCreateInfoVertex:public ShaderCreateInfo
|
||||
|
@ -86,7 +86,7 @@ namespace hgl
|
||||
uint mi_count; ///<材质实例数量
|
||||
|
||||
uint mi_size; ///<单个材质实例数量长度
|
||||
DeviceBuffer *mi_data_buffer; ///<材质实例数据UBO
|
||||
DeviceBuffer *mi_data_buffer; ///<材质实例数据UBO/SSBO
|
||||
|
||||
VBO *mi_id;
|
||||
VkBuffer mi_id_buffer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user