mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-17 02:24:07 +02:00
#23 fix ambient cubes for cutscene actors
This commit is contained in:
@@ -1369,11 +1369,9 @@ struct Level : IGame {
|
|||||||
vec3 pos = controller->getPos();
|
vec3 pos = controller->getPos();
|
||||||
if (ambientCache) {
|
if (ambientCache) {
|
||||||
AmbientCache::Cube cube;
|
AmbientCache::Cube cube;
|
||||||
if (Core::stats.frame != controller->jointsFrame) {
|
ambientCache->getAmbient(roomIndex, pos, cube);
|
||||||
ambientCache->getAmbient(roomIndex, pos, cube);
|
if (cube.status == AmbientCache::Cube::READY)
|
||||||
if (cube.status == AmbientCache::Cube::READY)
|
memcpy(controller->ambient, cube.colors, sizeof(cube.colors)); // store last calculated ambient into controller
|
||||||
memcpy(controller->ambient, cube.colors, sizeof(cube.colors)); // store last calculated ambient into controller
|
|
||||||
}
|
|
||||||
Core::active.shader->setParam(uAmbient, controller->ambient[0], 6);
|
Core::active.shader->setParam(uAmbient, controller->ambient[0], 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user