File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments