diff --git a/CMSceneGraph b/CMSceneGraph index f5740162..b10387ad 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit f57401620a52eaf3fdaaf5410beb9528aadaa49a +Subproject commit b10387ad563ced36feb5cdd8eea3cdaed6e68bf6 diff --git a/inc/hgl/shadergen/ShaderCreateInfoVertex.h b/inc/hgl/shadergen/ShaderCreateInfoVertex.h index ca89a0d7..9db65b1e 100644 --- a/inc/hgl/shadergen/ShaderCreateInfoVertex.h +++ b/inc/hgl/shadergen/ShaderCreateInfoVertex.h @@ -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 diff --git a/src/SceneGraph/RenderNode.cpp b/src/SceneGraph/RenderNode.cpp index 748f8b7d..07ccbe1c 100644 --- a/src/SceneGraph/RenderNode.cpp +++ b/src/SceneGraph/RenderNode.cpp @@ -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;