mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
a250c20d84
commit
5cfb0817ed
7 changed files with 23 additions and 8 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue