Refactoring to reduce parameter count for KRPipeline::bind, passing by RenderInfo

This commit is contained in:
2024-09-21 17:16:13 -07:00
parent d7672d31f4
commit 8bee10c768
18 changed files with 105 additions and 94 deletions

View File

@@ -121,7 +121,7 @@ void KRPointLight::render(RenderInfo& ri)
pShader->setPushConstant(KRPipeline::PushConstant::light_decay_start, getDecayStart());
pShader->setPushConstant(KRPipeline::PushConstant::light_cutoff, KRLIGHT_MIN_INFLUENCE);
pShader->setPushConstant(KRPipeline::PushConstant::light_position, light_position);
pShader->bind(ri.commandBuffer, *ri.camera, *ri.viewport, sphereModelMatrix, &this_light, nullptr, nullptr, ri.renderPass);
pShader->bind(ri, sphereModelMatrix); // TODO: Pass light index to shader
if (bInsideLight) {
// Render a full screen quad