- Pass vertex color and normal via uniform buffer when the attribute isn't available
This commit is contained in:
parent
1430d9012e
commit
05a6896d4f
8 changed files with 38 additions and 14 deletions
|
|
@ -89,8 +89,13 @@ int VkRenderPassManager::GetVertexFormat(int numBindingPoints, int numAttributes
|
|||
VkVertexFormat fmt;
|
||||
fmt.NumBindingPoints = numBindingPoints;
|
||||
fmt.Stride = stride;
|
||||
fmt.UseVertexData = false;
|
||||
for (int j = 0; j < numAttributes; j++)
|
||||
{
|
||||
if (attrs[j].location == VATTR_COLOR)
|
||||
fmt.UseVertexData = true;
|
||||
fmt.Attrs.push_back(attrs[j]);
|
||||
}
|
||||
VertexFormats.push_back(fmt);
|
||||
return (int)VertexFormats.size() - 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue