Skip to content

Commit 5ca26fb

Browse files
committed
fix: update light uniform setup in lit materials
1 parent b20067d commit 5ca26fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/common/systems/forward-renderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ namespace our {
205205
command.material->shader->set("transform", MVP);
206206
if (LitMaterial* litMaterial = dynamic_cast<LitMaterial*>(command.material); litMaterial) {
207207
// if the material is a lit material, we need to set the light uniforms
208+
litMaterial->setLightUniforms(sceneLights);
208209
litMaterial->shader->set("cameraPos", cameraPosition);
209210
litMaterial->shader->set("model", command.localToWorld);
210-
litMaterial->setup(sceneLights);
211211
}
212212
command.mesh->draw();
213213
}
@@ -238,7 +238,7 @@ namespace our {
238238
command.material->shader->set("transform", MVP);
239239
if (LitMaterial* litMaterial = dynamic_cast<LitMaterial*>(command.material); litMaterial) {
240240
// if the material is a lit material, we need to set the light uniforms
241-
litMaterial->setup(sceneLights);
241+
litMaterial->setLightUniforms(sceneLights);
242242
litMaterial->shader->set("cameraPos", cameraPosition);
243243
litMaterial->shader->set("model", command.localToWorld);
244244
}

0 commit comments

Comments
 (0)