Updated call sites to ensure that KRPipeline::setUniform calls are made before KRPipeline::bind calls.

Eliminated kraken::SetUniform helper functions, which are no longer used.
This commit is contained in:
2022-07-07 21:37:10 -07:00
parent 560f7da9e7
commit 7d36a0036c
8 changed files with 16 additions and 45 deletions

View File

@@ -152,11 +152,10 @@ 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.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);
pShader->setUniform(KRPipeline::KRENGINE_UNIFORM_LIGHT_INTENSITY, m_intensity * 0.01f);
pShader->bind(ri.commandBuffer, *ri.camera, ri.viewport, getModelMatrix(), nullptr, &this_light, nullptr, ri.renderPass, Vector3::Zero(), 0.0f, Vector4::Zero());
// Render a full screen quad
m_pContext->getMeshManager()->bindVBO(ri.commandBuffer, &vertices, 1.0f);