解决camPos设置错误

dev-VirtualTexture
wuyize 2022-07-24 22:42:46 +08:00
parent 094af63389
commit 549a91ec72
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ void RendererWidget::paintGL()
QOpenGLVertexArrayObject::Binder vaoBinder(&quadVAO); QOpenGLVertexArrayObject::Binder vaoBinder(&quadVAO);
finalProgramPtr->bind(); finalProgramPtr->bind();
finalProgramPtr->setUniformValue(modelProgramPtr->uniformLocation("camPos"), camera.Position); finalProgramPtr->setUniformValue("camPos", camera.Position);
lightPositions[0] = camera.Position; lightPositions[0] = camera.Position;
finalProgramPtr->setUniformValueArray("lightPositions", lightPositions, 4); finalProgramPtr->setUniformValueArray("lightPositions", lightPositions, 4);
finalProgramPtr->setUniformValueArray("lightColors", lightColors, 4); finalProgramPtr->setUniformValueArray("lightColors", lightColors, 4);