From aebbdf210b39e0c18abcaa0e3f5279265e4a961c Mon Sep 17 00:00:00 2001 From: devZoGok Date: Sun, 15 Jun 2025 19:33:20 +0300 Subject: [PATCH] removed lighting skipping --- light.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/light.cpp b/light.cpp index 1e4692e..b7f02bd 100755 --- a/light.cpp +++ b/light.cpp @@ -184,13 +184,11 @@ namespace vb01{ } //TODO replace depth map id literals + //TODO implement logic to skip lighting if the material has lighting disabled void Light::updateShader(vector materials, int thisId, mat4 &proj, mat4 &view){ Vector3 position = node->localToGlobalPosition(Vector3::VEC_ZERO), direction = node->getGlobalAxis(2); for(Material *m : materials){ - Material::BoolUniform *uniform = ((Material::BoolUniform*)m->getUniform("lightingEnabled")); - if(!(uniform && uniform->value)) continue; - Shader *shader = m->getShader(); shader->use(); shader->setInt((int)type, "lights[" + to_string(thisId) + "].type");