Fix sun quad visibility, minimap opacity, audio scaling, and rename music toggle

- Tighten celestial glow falloff and edge fade to eliminate visible quad boundary
- Add opacity support to minimap display shader, synced with UI opacity setting
- Fix audio double/triple-scaling by removing redundant master volume multiplications
- Rename "Original Soundtrack" toggle to "Enable WoWee Music"
- Add About tab with developer info and GitHub link
This commit is contained in:
Kelsi 2026-02-23 08:01:20 -08:00
parent a250c20d84
commit 5cfb0817ed
7 changed files with 23 additions and 8 deletions

View file

@ -31,14 +31,13 @@ void main() {
float disc = smoothstep(0.42, 0.35, dist); float disc = smoothstep(0.42, 0.35, dist);
// Soft glow that fades to zero well within quad bounds // 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 * 32.0) * 0.5;
float glow = exp(-dist * dist * 18.0) * 0.5;
// Combine disc and glow // Combine disc and glow
float alpha = max(disc, glow) * push.intensity; float alpha = max(disc, glow) * push.intensity;
// Fade to zero well before quad edges // 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; alpha *= edgeFade;
vec3 color = push.celestialColor.rgb; vec3 color = push.celestialColor.rgb;
@ -56,7 +55,7 @@ void main() {
float phaseShadow = smoothstep(-0.1, 0.1, phaseX); float phaseShadow = smoothstep(-0.1, 0.1, phaseX);
alpha *= mix(phaseShadow, 1.0, step(0.5, push.intensity)); 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 // Pre-multiply for additive blending: RGB is the light contribution
outColor = vec4(color * alpha, alpha); outColor = vec4(color * alpha, alpha);
} }

Binary file not shown.

View file

@ -9,6 +9,7 @@ layout(push_constant) uniform Push {
float arrowRotation; float arrowRotation;
float zoomRadius; float zoomRadius;
int squareShape; int squareShape;
float opacity;
} push; } push;
layout(location = 0) in vec2 TexCoord; layout(location = 0) in vec2 TexCoord;
@ -63,5 +64,5 @@ void main() {
mapColor.rgb *= 1.0 - border * 0.7; mapColor.rgb *= 1.0 - border * 0.7;
} }
outColor = mapColor; outColor = vec4(mapColor.rgb, mapColor.a * push.opacity);
} }

View file

@ -53,6 +53,8 @@ public:
void zoomIn() { viewRadius = std::max(100.0f, viewRadius - 50.0f); } void zoomIn() { viewRadius = std::max(100.0f, viewRadius - 50.0f); }
void zoomOut() { viewRadius = std::min(800.0f, viewRadius + 50.0f); } void zoomOut() { viewRadius = std::min(800.0f, viewRadius + 50.0f); }
void setOpacity(float opacity) { opacity_ = opacity; }
// Public accessors for WorldMap // Public accessors for WorldMap
VkTexture* getOrLoadTileTexture(int tileX, int tileY); VkTexture* getOrLoadTileTexture(int tileX, int tileY);
void ensureTRSParsed() { if (!trsParsed) parseTRS(); } void ensureTRSParsed() { if (!trsParsed) parseTRS(); }
@ -103,6 +105,7 @@ private:
bool enabled = true; bool enabled = true;
bool rotateWithCamera = false; bool rotateWithCamera = false;
bool squareShape = false; bool squareShape = false;
float opacity_ = 1.0f;
// Throttling // Throttling
float updateIntervalSec = 0.25f; float updateIntervalSec = 0.25f;

View file

@ -30,7 +30,8 @@ struct MinimapDisplayPush {
float arrowRotation; float arrowRotation;
float zoomRadius; float zoomRadius;
int32_t squareShape; int32_t squareShape;
}; // 40 bytes float opacity;
}; // 44 bytes
Minimap::Minimap() = default; Minimap::Minimap() = default;
@ -529,6 +530,7 @@ void Minimap::render(VkCommandBuffer cmd, const Camera& playerCamera,
push.arrowRotation = arrowRotation; push.arrowRotation = arrowRotation;
push.zoomRadius = zoomRadius; push.zoomRadius = zoomRadius;
push.squareShape = squareShape ? 1 : 0; push.squareShape = squareShape ? 1 : 0;
push.opacity = opacity_;
vkCmdPushConstants(cmd, displayPipelineLayout, vkCmdPushConstants(cmd, displayPipelineLayout,
VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT,

View file

@ -196,6 +196,16 @@ void GameScreen::render(game::GameHandler& gameHandler) {
float prevAlpha = ImGui::GetStyle().Alpha; float prevAlpha = ImGui::GetStyle().Alpha;
ImGui::GetStyle().Alpha = uiOpacity_; 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 // Apply initial settings when renderer becomes available
if (!minimapSettingsApplied_) { if (!minimapSettingsApplied_) {
auto* renderer = core::Application::getInstance().getRenderer(); auto* renderer = core::Application::getInstance().getRenderer();
@ -6144,7 +6154,7 @@ void GameScreen::renderSettingsWindow() {
} }
ImGui::Separator(); ImGui::Separator();
if (ImGui::Checkbox("Original Soundtrack", &pendingUseOriginalSoundtrack)) { if (ImGui::Checkbox("Enable WoWee Music", &pendingUseOriginalSoundtrack)) {
if (renderer) { if (renderer) {
if (auto* zm = renderer->getZoneManager()) { if (auto* zm = renderer->getZoneManager()) {
zm->setUseOriginalSoundtrack(pendingUseOriginalSoundtrack); zm->setUseOriginalSoundtrack(pendingUseOriginalSoundtrack);
@ -6153,7 +6163,7 @@ void GameScreen::renderSettingsWindow() {
saveSettings(); saveSettings();
} }
if (ImGui::IsItemHovered()) 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::Separator();
ImGui::Text("Music"); ImGui::Text("Music");