+ | Light array sent to gpu

This commit is contained in:
TheRedShip
2025-01-16 17:17:03 +01:00
parent 787833ac84
commit 02e670195c
9 changed files with 69 additions and 9 deletions

View File

@ -257,12 +257,16 @@ bool SceneParser::parseLine(const std::string &line)
if (it != object_parsers.end())
{
Object *obj = it->second(ss);
(void) _scene->getMaterial(obj->getMaterialIndex()); //verify material
GPUMaterial mat = _scene->getMaterial(obj->getMaterialIndex()); //verify material
if (obj->getType() == Object::Type::PORTAL)
_scene->addObject(static_cast<Portal *>(obj)->createSupportQuad());
_scene->addObject(obj);
if (mat.emission > 0.0)
_scene->updateLightAndObjects(obj->getMaterialIndex());
}
if (identifier == "MAT")