feat(lighting): seed estable per emissor (no deriva pel moviment)
This commit is contained in:
1 parent
0046d526b0
commit
5cc8e349a5
5 files changed
+35
-15
No files matched your search
@@ -1022,13 +1022,13 @@ void GameScene::applyLightingPass() {
|
||||
for (const auto& p : players_) {
|
||||
if (p->isOutOfPlay()) { continue; }
|
||||
const auto C = p->getLightCenter();
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = PLAYER_R, .flicker = PLAYER_FLICKER});
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = PLAYER_R, .seed = p->getLightSeed(), .flicker = PLAYER_FLICKER});
|
||||
}
|
||||
for (const auto* e : entity_manager_.getEntities()) {
|
||||
const int R = e->getLightRadius();
|
||||
if (R <= 0) { continue; }
|
||||
const auto C = e->getLightCenter();
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = R, .flicker = e->getLightFlicker()});
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = R, .seed = e->getLightSeed(), .flicker = e->getLightFlicker()});
|
||||
}
|
||||
Lighting::apply(Screen::get().getCanvasArgb(),
|
||||
Screen::get().getCanvasWidth(),
|
||||
|
||||
Reference in new issue
Block a user