fix(render): A7 Fix D D-2 — EnvCell shell binds its own per-cell light set (#140)
The cell shell read whatever light set (SSBO 4/5) WbDrawDispatcher last left bound, lighting walls with a leaked set. EnvCellRenderer now uploads its own binding=4 global lights (frame PointSnapshot via GlobalLightPacker) + a binding=5 per-instance set, computed per cell by LightManager.SelectForObject over the cell's world bounds (mirrors _cellIdToSlot + WbDrawDispatcher.ComputeEntityLightSet). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cf62793304
commit
c62da825fe
2 changed files with 106 additions and 0 deletions
|
|
@ -7775,6 +7775,7 @@ public sealed class GameWindow : IDisposable
|
|||
// SceneLighting UBO built below (binding=1) — terrain/sky read those.
|
||||
Lighting.BuildPointLightSnapshot(camPos);
|
||||
_wbDrawDispatcher?.SetSceneLights(Lighting.PointSnapshot);
|
||||
_envCellRenderer?.SetPointSnapshot(Lighting.PointSnapshot); // A7 Fix D (D-2)
|
||||
|
||||
var ubo = AcDream.Core.Lighting.SceneLightingUbo.Build(
|
||||
Lighting, in atmo, camPos, (float)WorldTime.DayFraction);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue