Improving Material shader code generation

This commit is contained in:
Dynamitos
2020-09-19 14:36:50 +02:00
parent 6814587b54
commit facbfed79c
72 changed files with 1049 additions and 329 deletions
+4 -6
View File
@@ -27,7 +27,8 @@ void BasePassMeshProcessor::addMeshBatch(
//TODO query tesselation
const Gfx::ShaderCollection* collection = material->getShaders(Gfx::RenderPassType::BasePass, vertexInput);
const Gfx::ShaderCollection* collection = material->getShaders(Gfx::RenderPassType::BasePass, vertexInput->getType());
assert(collection != nullptr);
Gfx::PRenderCommand renderCommand = graphics->createRenderCommand();
buildMeshDrawCommand(batch,
primitiveComponent,
@@ -79,12 +80,9 @@ void BasePass::render()
{
processor->clearCommands();
graphics->beginRenderPass(renderPass);
for (auto &&primitive : scene->getPrimitives())
for (auto &&primitive : scene->getStaticMeshes())
{
for (auto &&meshBatch : primitive->staticMeshes)
{
processor->addMeshBatch(meshBatch, primitive, renderPass);
}
processor->addMeshBatch(primitive, nullptr, renderPass);
}
graphics->executeCommands(processor->getRenderCommands());
graphics->endRenderPass();