diff --git a/assets/shaders/minimap_display.frag.glsl b/assets/shaders/minimap_display.frag.glsl index a288d90a..a93917ff 100644 --- a/assets/shaders/minimap_display.frag.glsl +++ b/assets/shaders/minimap_display.frag.glsl @@ -44,8 +44,22 @@ void main() { vec4 mapColor = texture(uComposite, mapUV); - // Player direction arrow is rendered by GameScreen minimap overlays. - // Keep shader output to map imagery only to avoid duplicate indicators. + // Single player direction indicator (center arrow) rendered in-shader. + vec2 local = center; // [-0.5, 0.5] around minimap center + float ac = cos(push.arrowRotation); + float as = sin(push.arrowRotation); + vec2 tip = vec2(0.0, 0.09); + vec2 left = vec2(-0.045, -0.02); + vec2 right = vec2( 0.045, -0.02); + mat2 rot = mat2(ac, -as, as, ac); + tip = rot * tip; + left = rot * left; + right = rot * right; + if (pointInTriangle(local, tip, left, right)) { + mapColor.rgb = vec3(1.0, 0.86, 0.05); + } + float centerDot = smoothstep(0.016, 0.0, length(local)); + mapColor.rgb = mix(mapColor.rgb, vec3(1.0), centerDot * 0.95); // Dark border ring float border = smoothstep(0.48, 0.5, dist); diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 6c4f8f52..18860f94 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -15881,27 +15881,6 @@ void GameScreen::renderMinimapMarkers(game::GameHandler& gameHandler) { return true; }; - // Player position marker — always drawn at minimap center with a directional arrow. - { - // The player is always at centerX, centerY on the minimap. - // Draw a yellow arrow pointing in the player's facing direction. - glm::vec3 fwd = camera->getForward(); - float facing = std::atan2(fwd.y, -fwd.x); // clockwise bearing from North - float cosF = std::cos(facing - bearing); - float sinF = std::sin(facing - bearing); - float arrowLen = 8.0f; - float arrowW = 4.0f; - ImVec2 tip(centerX + sinF * arrowLen, centerY - cosF * arrowLen); - ImVec2 left(centerX - cosF * arrowW - sinF * arrowLen * 0.3f, - centerY - sinF * arrowW + cosF * arrowLen * 0.3f); - ImVec2 right(centerX + cosF * arrowW - sinF * arrowLen * 0.3f, - centerY + sinF * arrowW + cosF * arrowLen * 0.3f); - drawList->AddTriangleFilled(tip, left, right, IM_COL32(255, 220, 0, 255)); - drawList->AddTriangle(tip, left, right, IM_COL32(0, 0, 0, 180), 1.0f); - // White dot at player center - drawList->AddCircleFilled(ImVec2(centerX, centerY), 2.5f, IM_COL32(255, 255, 255, 220)); - } - // Build sets of entries that are incomplete objectives for tracked quests. // minimapQuestEntries: NPC creature entries (npcOrGoId > 0) // minimapQuestGoEntries: game object entries (npcOrGoId < 0, stored as abs value)