Disable tree light occlusion (fixes strange isolated shadows on open ground)
A mature tree marked a single lightmap cell as an occluder (shaded to 35% + a directional sun-shadow tail up to 7 cells). With mountains gone, trees were the only occluders, so on open soil these showed up as strange dark blobs detached from the (larger, offset) tree sprite. Gated tree occlusion behind TreesCastShade (off) so the forest is evenly lit; the occluder infra stays for light-blocking terrain and re-enabling once tree canopies have a real multi-cell shade footprint. Trade-off: understory shade no longer dims growth under canopy (minor). Engine lighting constants are untouched (would need the submodule workflow). Build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
d196437462
commit
ccb7c960f9
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Language": "ru",
|
||||
"Fullscreen": false,
|
||||
"VSync": true,
|
||||
"Width": 1280,
|
||||
"Height": 720,
|
||||
"Volume": 1,
|
||||
"UiScale": 1,
|
||||
"DeveloperMode": true
|
||||
}
|
||||
@@ -994,10 +994,20 @@ public sealed class WorldScene : Scene
|
||||
return shore.ToArray();
|
||||
}
|
||||
|
||||
// Текущая сетка окклюдеров для лайтмапа: светонепроницаемый террейн (сейчас нет) + зрелые деревья.
|
||||
// Затеняют ли зрелые деревья землю. Сейчас выключено: одиночное дерево = 1 клетка-окклюдер, а спрайт
|
||||
// кроны крупнее и смещён, плюс направленная тень тянется «хвостом» — на открытой почве это читается как
|
||||
// странные оторванные пятна. Вернуть, когда у кроны будет настоящий многоклеточный след затенения.
|
||||
private static readonly bool TreesCastShade = false;
|
||||
|
||||
// Сетка окклюдеров для лайтмапа: светонепроницаемый террейн (сейчас такого нет) + опц. зрелые деревья.
|
||||
private bool[] BuildOccluders()
|
||||
{
|
||||
Array.Copy(_cellOccluderBase, _cellOccluder, _cellOccluder.Length);
|
||||
if (!TreesCastShade)
|
||||
{
|
||||
return _cellOccluder; // ровное освещение — без странных теней от отдельных деревьев
|
||||
}
|
||||
|
||||
Store
|
||||
.Query<PlantGrowth, Transform2D>()
|
||||
.ForEachEntity(
|
||||
|
||||
Reference in New Issue
Block a user