Implemented automatic binding of push constants at runtime using SPIRV-Reflection.

Replaced GL uniforms with Vulkan push constants.
This commit is contained in:
2022-07-07 19:29:50 -07:00
parent 88a1ca186b
commit 560f7da9e7
16 changed files with 148 additions and 309 deletions

View File

@@ -152,7 +152,7 @@ void KRDirectionalLight::render(RenderInfo& ri) {
info.modelFormat = KRMesh::model_format_t::KRENGINE_MODEL_FORMAT_STRIP;
KRPipeline *pShader = getContext().getPipelineManager()->getPipeline(*ri.surface, info);
pShader->bind(*ri.camera, ri.viewport, getModelMatrix(), nullptr, &this_light, nullptr, ri.renderPass, Vector3::Zero(), 0.0f, Vector4::Zero());
pShader->bind(ri.commandBuffer, *ri.camera, ri.viewport, getModelMatrix(), nullptr, &this_light, nullptr, ri.renderPass, Vector3::Zero(), 0.0f, Vector4::Zero());
pShader->setUniform(KRPipeline::KRENGINE_UNIFORM_LIGHT_DIRECTION_VIEW_SPACE, light_direction_view_space);
pShader->setUniform(KRPipeline::KRENGINE_UNIFORM_LIGHT_COLOR, m_color);