Fix setting light poition for models.

This commit is contained in:
Shaun Reed 2025-03-23 09:08:15 -04:00
parent 95fd1e9977
commit 5984763d43

View File

@ -485,7 +485,7 @@ void QtkScene::update()
// Helper lambda to set the light position used by GLSL shaders on the model.
// TODO: This could be a helper function on the Model class.
auto setLightPosition = [](const std::string & lightName, Model * model) {
if (auto light = Model::getInstance(lightName.c_str()); light) {
if (auto light = MeshRenderer::getInstance(lightName.c_str()); light) {
QVector3D position = light->getTransform().getTranslation();
model->setUniform("uLight.position", position);
} else {