mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
only setting uniforms for lit materials
This commit is contained in:
@@ -188,6 +188,9 @@ namespace vb01{
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user