From 34cd5a161dfedad9e3a7871501492b0fcc022907 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 8 Feb 2026 22:35:11 -0800 Subject: [PATCH] Reduce wave amplitude to fix tile boundary gaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each water tile generates waves independently using local coordinates, causing height mismatches at tile boundaries. Reduced amplitude minimizes visible seams. Problem: - Waves calculated per-tile using local vertex positions (aPos) - Adjacent tiles have different local coords at shared boundary - Wave height discontinuity creates visible gaps between tiles Solution: - Reduced ocean wave amplitude: 0.25 → 0.06 (75% reduction) - Reduced canal wave amplitude: 0.10 → 0.04 - Kept frequency and speed for subtle animation - Waves still visible but gaps minimized Technical note: Proper fix would be world-space wave calculation, but requires passing tile offset to shader. This amplitude reduction is simpler and effective for smooth ocean appearance. --- src/rendering/water_renderer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rendering/water_renderer.cpp b/src/rendering/water_renderer.cpp index a1cb6760..794961f6 100644 --- a/src/rendering/water_renderer.cpp +++ b/src/rendering/water_renderer.cpp @@ -413,9 +413,10 @@ void WaterRenderer::render(const Camera& camera, float time) { // City/canal liquid profile: clearer water + stronger ripples/sun shimmer. // Stormwind canals typically use LiquidType 5 in this data set. bool canalProfile = (surface.wmoId != 0) || (surface.liquidType == 5); - float waveAmp = canalProfile ? 0.10f : 0.25f; // Increased from 0.07/0.12 - float waveFreq = canalProfile ? 0.30f : 0.22f; // Increased from 0.18 for more waves - float waveSpeed = canalProfile ? 1.20f : 2.00f; // Increased from 1.60 for more motion + // Reduced wave amplitude to prevent tile seam gaps (tiles don't share wave state) + float waveAmp = canalProfile ? 0.04f : 0.06f; // Subtle waves to avoid boundary gaps + float waveFreq = canalProfile ? 0.30f : 0.22f; // Frequency maintained for visual + float waveSpeed = canalProfile ? 1.20f : 2.00f; // Speed maintained for animation float shimmerStrength = canalProfile ? 0.95f : 0.50f; float alphaScale = canalProfile ? 0.72f : 1.00f;