mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Implement WoW-style 3D billboard quest markers
Replace 2D ImGui text markers with proper 3D billboard sprites using BLP textures. Features: - Billboard rendering using Interface\GossipFrame\ BLP textures (yellow !, yellow ?, grey ?) - WoW-style visual effects: bob animation, distance-based scaling, glow pass, distance fade - Proper NPC height positioning with bounding box detection - Camera-facing quads with depth testing but no depth write - Shader-based alpha modulation for glow and fade effects Technical changes: - Created QuestMarkerRenderer class with billboard sprite system - Integrated into Renderer initialization for both online and offline terrain loading - Rewrote updateQuestMarkers() to use billboard system instead of M2 models - Disabled old 2D ImGui renderQuestMarkers() in game_screen.cpp - Added debug logging for initialization and marker tracking Quest markers now render with proper WoW visual fidelity.
This commit is contained in:
parent
084a79a6bc
commit
71d14b77c9
8 changed files with 407 additions and 63 deletions
71
include/rendering/quest_marker_renderer.hpp
Normal file
71
include/rendering/quest_marker_renderer.hpp
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#pragma once
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace wowee {
|
||||
namespace pipeline { class AssetManager; }
|
||||
namespace rendering {
|
||||
|
||||
class Camera;
|
||||
|
||||
/**
|
||||
* Renders quest markers as billboarded sprites above NPCs
|
||||
* Uses BLP textures from Interface\GossipFrame\
|
||||
*/
|
||||
class QuestMarkerRenderer {
|
||||
public:
|
||||
QuestMarkerRenderer();
|
||||
~QuestMarkerRenderer();
|
||||
|
||||
bool initialize(pipeline::AssetManager* assetManager);
|
||||
void shutdown();
|
||||
|
||||
/**
|
||||
* Add or update a quest marker at a position
|
||||
* @param guid NPC GUID
|
||||
* @param position World position (NPC base position)
|
||||
* @param markerType 0=available(!), 1=turnin(?), 2=incomplete(?)
|
||||
* @param boundingHeight NPC bounding height (optional, default 2.0f)
|
||||
*/
|
||||
void setMarker(uint64_t guid, const glm::vec3& position, int markerType, float boundingHeight = 2.0f);
|
||||
|
||||
/**
|
||||
* Remove a quest marker
|
||||
*/
|
||||
void removeMarker(uint64_t guid);
|
||||
|
||||
/**
|
||||
* Clear all markers
|
||||
*/
|
||||
void clear();
|
||||
|
||||
/**
|
||||
* Render all quest markers (call after world rendering, before UI)
|
||||
*/
|
||||
void render(const Camera& camera);
|
||||
|
||||
private:
|
||||
struct Marker {
|
||||
glm::vec3 position;
|
||||
int type; // 0=available, 1=turnin, 2=incomplete
|
||||
float boundingHeight = 2.0f;
|
||||
};
|
||||
|
||||
std::unordered_map<uint64_t, Marker> markers_;
|
||||
|
||||
// OpenGL resources
|
||||
uint32_t vao_ = 0;
|
||||
uint32_t vbo_ = 0;
|
||||
uint32_t shaderProgram_ = 0;
|
||||
uint32_t textures_[3] = {0, 0, 0}; // available, turnin, incomplete
|
||||
|
||||
void createQuad();
|
||||
void loadTextures(pipeline::AssetManager* assetManager);
|
||||
void createShader();
|
||||
};
|
||||
|
||||
} // namespace rendering
|
||||
} // namespace wowee
|
||||
|
|
@ -32,6 +32,7 @@ class CharacterRenderer;
|
|||
class WMORenderer;
|
||||
class M2Renderer;
|
||||
class Minimap;
|
||||
class QuestMarkerRenderer;
|
||||
class Shader;
|
||||
|
||||
class Renderer {
|
||||
|
|
@ -105,6 +106,7 @@ public:
|
|||
WMORenderer* getWMORenderer() const { return wmoRenderer.get(); }
|
||||
M2Renderer* getM2Renderer() const { return m2Renderer.get(); }
|
||||
Minimap* getMinimap() const { return minimap.get(); }
|
||||
QuestMarkerRenderer* getQuestMarkerRenderer() const { return questMarkerRenderer.get(); }
|
||||
const std::string& getCurrentZoneName() const { return currentZoneName; }
|
||||
|
||||
// Third-person character follow
|
||||
|
|
@ -177,6 +179,7 @@ private:
|
|||
std::unique_ptr<WMORenderer> wmoRenderer;
|
||||
std::unique_ptr<M2Renderer> m2Renderer;
|
||||
std::unique_ptr<Minimap> minimap;
|
||||
std::unique_ptr<QuestMarkerRenderer> questMarkerRenderer;
|
||||
std::unique_ptr<audio::MusicManager> musicManager;
|
||||
std::unique_ptr<audio::FootstepManager> footstepManager;
|
||||
std::unique_ptr<audio::ActivitySoundManager> activitySoundManager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue