diff --git a/assets/shaders/celestial.frag.glsl b/assets/shaders/celestial.frag.glsl index a3d673b9..95c8527f 100644 --- a/assets/shaders/celestial.frag.glsl +++ b/assets/shaders/celestial.frag.glsl @@ -31,14 +31,13 @@ void main() { float disc = smoothstep(0.42, 0.35, dist); // Soft glow that fades to zero well within quad bounds - // At dist=0.5 (quad edge), this should be negligible - float glow = exp(-dist * dist * 18.0) * 0.5; + float glow = exp(-dist * dist * 32.0) * 0.5; // Combine disc and glow float alpha = max(disc, glow) * push.intensity; // Fade to zero well before quad edges - float edgeFade = 1.0 - smoothstep(0.35, 0.48, dist); + float edgeFade = 1.0 - smoothstep(0.30, 0.38, dist); alpha *= edgeFade; vec3 color = push.celestialColor.rgb; @@ -56,7 +55,7 @@ void main() { float phaseShadow = smoothstep(-0.1, 0.1, phaseX); alpha *= mix(phaseShadow, 1.0, step(0.5, push.intensity)); - if (alpha < 0.003) discard; + if (alpha < 0.01) discard; // Pre-multiply for additive blending: RGB is the light contribution outColor = vec4(color * alpha, alpha); } diff --git a/assets/shaders/celestial.frag.spv b/assets/shaders/celestial.frag.spv index 9716ef19..54e31886 100644 Binary files a/assets/shaders/celestial.frag.spv and b/assets/shaders/celestial.frag.spv differ diff --git a/assets/shaders/minimap_display.frag.glsl b/assets/shaders/minimap_display.frag.glsl index e2ad702b..ff0477ae 100644 --- a/assets/shaders/minimap_display.frag.glsl +++ b/assets/shaders/minimap_display.frag.glsl @@ -9,6 +9,7 @@ layout(push_constant) uniform Push { float arrowRotation; float zoomRadius; int squareShape; + float opacity; } push; layout(location = 0) in vec2 TexCoord; @@ -63,5 +64,5 @@ void main() { mapColor.rgb *= 1.0 - border * 0.7; } - outColor = mapColor; + outColor = vec4(mapColor.rgb, mapColor.a * push.opacity); } diff --git a/assets/shaders/minimap_display.frag.spv b/assets/shaders/minimap_display.frag.spv index 651e04a8..5fd812cd 100644 Binary files a/assets/shaders/minimap_display.frag.spv and b/assets/shaders/minimap_display.frag.spv differ diff --git a/include/rendering/minimap.hpp b/include/rendering/minimap.hpp index 7ca87922..ca7c5345 100644 --- a/include/rendering/minimap.hpp +++ b/include/rendering/minimap.hpp @@ -53,6 +53,8 @@ public: void zoomIn() { viewRadius = std::max(100.0f, viewRadius - 50.0f); } void zoomOut() { viewRadius = std::min(800.0f, viewRadius + 50.0f); } + void setOpacity(float opacity) { opacity_ = opacity; } + // Public accessors for WorldMap VkTexture* getOrLoadTileTexture(int tileX, int tileY); void ensureTRSParsed() { if (!trsParsed) parseTRS(); } @@ -103,6 +105,7 @@ private: bool enabled = true; bool rotateWithCamera = false; bool squareShape = false; + float opacity_ = 1.0f; // Throttling float updateIntervalSec = 0.25f; diff --git a/src/rendering/minimap.cpp b/src/rendering/minimap.cpp index f5aa54f8..0f44869b 100644 --- a/src/rendering/minimap.cpp +++ b/src/rendering/minimap.cpp @@ -30,7 +30,8 @@ struct MinimapDisplayPush { float arrowRotation; float zoomRadius; int32_t squareShape; -}; // 40 bytes + float opacity; +}; // 44 bytes Minimap::Minimap() = default; @@ -529,6 +530,7 @@ void Minimap::render(VkCommandBuffer cmd, const Camera& playerCamera, push.arrowRotation = arrowRotation; push.zoomRadius = zoomRadius; push.squareShape = squareShape ? 1 : 0; + push.opacity = opacity_; vkCmdPushConstants(cmd, displayPipelineLayout, VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index d68739d7..ab1384ff 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -196,6 +196,16 @@ void GameScreen::render(game::GameHandler& gameHandler) { float prevAlpha = ImGui::GetStyle().Alpha; ImGui::GetStyle().Alpha = uiOpacity_; + // Sync minimap opacity with UI opacity + { + auto* renderer = core::Application::getInstance().getRenderer(); + if (renderer) { + if (auto* minimap = renderer->getMinimap()) { + minimap->setOpacity(uiOpacity_); + } + } + } + // Apply initial settings when renderer becomes available if (!minimapSettingsApplied_) { auto* renderer = core::Application::getInstance().getRenderer(); @@ -6144,7 +6154,7 @@ void GameScreen::renderSettingsWindow() { } ImGui::Separator(); - if (ImGui::Checkbox("Original Soundtrack", &pendingUseOriginalSoundtrack)) { + if (ImGui::Checkbox("Enable WoWee Music", &pendingUseOriginalSoundtrack)) { if (renderer) { if (auto* zm = renderer->getZoneManager()) { zm->setUseOriginalSoundtrack(pendingUseOriginalSoundtrack); @@ -6153,7 +6163,7 @@ void GameScreen::renderSettingsWindow() { saveSettings(); } if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Include original music tracks in zone music rotation"); + ImGui::SetTooltip("Include WoWee music tracks in zone music rotation"); ImGui::Separator(); ImGui::Text("Music");