fixed Viewport UBO bug.

This commit is contained in:
hyzboy 2024-03-12 22:54:33 +08:00
parent 9d704eb33d
commit 13b2ca0575
2 changed files with 6 additions and 2 deletions

View File

@ -35,8 +35,10 @@ bool Std2DMaterial::CustomVertexShader(ShaderCreateInfoVertex *vsc)
if(cfg->coordinate_system==CoordinateSystem2D::Ortho) if(cfg->coordinate_system==CoordinateSystem2D::Ortho)
{ {
mci->AddStruct(SBS_ViewportInfo);
mci->AddUBO(VK_SHADER_STAGE_ALL_GRAPHICS, mci->AddUBO(VK_SHADER_STAGE_ALL_GRAPHICS,
DescriptorSetType::Global, DescriptorSetType::Static,
SBS_ViewportInfo); SBS_ViewportInfo);
} }

View File

@ -37,8 +37,10 @@ bool Std3DMaterial::CustomVertexShader(ShaderCreateInfoVertex *vsc)
// vsc->AddFunction(func::GetNormal); // vsc->AddFunction(func::GetNormal);
//} //}
mci->AddStruct(SBS_ViewportInfo);
mci->AddUBO(VK_SHADER_STAGE_ALL_GRAPHICS, mci->AddUBO(VK_SHADER_STAGE_ALL_GRAPHICS,
DescriptorSetType::Global, DescriptorSetType::Static,
SBS_ViewportInfo); SBS_ViewportInfo);
return(true); return(true);