diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-21 14:46:35 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-21 14:46:35 +0800 |
| commit | 655c22afe53b740e795f66c4da57714985ddccec (patch) | |
| tree | 536ea52dbb6c388ac0ebf87586117bd0f9845a86 | |
| parent | 60fe11875a06d3d883ec82db08bd97b0e8999862 (diff) | |
| download | living-village-655c22afe53b740e795f66c4da57714985ddccec.tar.gz | |
fix(desktop): 夜灯光晕径向衰减防过曝
夜晚灯笼光晕由三层高不透明矩形改为四层宽环径向衰减(外圈 alpha 9→渐强),核心亮度压到 34 并去掉全白芯层,灯笼本图块在夜色下保持可读;Xvfb 夜景 hěllo 帧自证:暖色簇 776/745 采样像素、近白过曝核心消失。
| -rw-r--r-- | src/LivingVillage.Desktop/Game.fs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index 51fa74d..79c6fec 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -681,18 +681,22 @@ type LivingVillageGame() as this = profile.WorldTint // Warm lantern glows strengthen as night falls (pure function of tick phase). + // Soft radial falloff made of wide translucent rings; no hot white core, + // the lantern sprite itself stays readable underneath. if profile.LanternGlow > 0.3f then let glow = profile.LanternGlow - let haloAlpha = int (90.0f * glow) + let haloAlpha = int (34.0f * glow) + let ringAlpha = int (18.0f * glow) for prop in renderPlan.Props do match prop.Kind with | RiverLantern -> let position = VillageArt.worldTile renderPlan prop.Position let screenX = position.X * Sim.tilePixels - int camera.X + Sim.tilePixels / 2 let screenY = position.Y * Sim.tilePixels - int camera.Y - Sim.tilePixels / 2 - spriteBatch.Draw(pixel, Rectangle(screenX - 22, screenY - 22, 60, 60), Color(252, 216, 148, int (float32 haloAlpha * 0.35f))) - spriteBatch.Draw(pixel, Rectangle(screenX - 14, screenY - 14, 44, 44), Color(252, 216, 148, haloAlpha)) - spriteBatch.Draw(pixel, Rectangle(screenX - 8, screenY - 8, 32, 32), Color(255, 236, 180, haloAlpha)) + spriteBatch.Draw(pixel, Rectangle(screenX - 30, screenY - 30, 76, 76), Color(252, 196, 128, int (float32 ringAlpha * 0.5f))) + spriteBatch.Draw(pixel, Rectangle(screenX - 24, screenY - 24, 64, 64), Color(252, 206, 148, ringAlpha)) + spriteBatch.Draw(pixel, Rectangle(screenX - 18, screenY - 18, 52, 52), Color(252, 216, 148, haloAlpha)) + spriteBatch.Draw(pixel, Rectangle(screenX - 12, screenY - 12, 40, 40), Color(255, 226, 168, haloAlpha)) | _ -> () let avatarSpec = VillageArt.avatarSpriteSpec avatarFacing world.Tick |
