feat: desaturate quest markers for trivial (gray) quests

Trivial/low-level quests now show gray '!' / '?' markers instead of
yellow, matching the in-game distinction between available and trivial
quests. Add grayscale parameter to QuestMarkerRenderer::setMarker and
the push-constant block; application sets grayscale=1.0 for trivial
markers and 0.0 for all others.
This commit is contained in:
Kelsi 2026-03-10 22:26:56 -07:00
parent 19eb7a1fb7
commit 6928b8ddf6
4 changed files with 16 additions and 7 deletions

View file

@ -17,8 +17,9 @@ namespace wowee { namespace rendering {
// Push constant layout matching quest_marker.vert.glsl / quest_marker.frag.glsl
struct QuestMarkerPushConstants {
glm::mat4 model; // 64 bytes, used by vertex shader
float alpha; // 4 bytes, used by fragment shader
glm::mat4 model; // 64 bytes, used by vertex shader
float alpha; // 4 bytes, used by fragment shader
float grayscale; // 4 bytes: 0=colour, 1=desaturated (trivial quests)
};
QuestMarkerRenderer::QuestMarkerRenderer() {
@ -340,8 +341,9 @@ void QuestMarkerRenderer::loadTextures(pipeline::AssetManager* assetManager) {
}
}
void QuestMarkerRenderer::setMarker(uint64_t guid, const glm::vec3& position, int markerType, float boundingHeight) {
markers_[guid] = {position, markerType, boundingHeight};
void QuestMarkerRenderer::setMarker(uint64_t guid, const glm::vec3& position, int markerType,
float boundingHeight, float grayscale) {
markers_[guid] = {position, markerType, boundingHeight, grayscale};
}
void QuestMarkerRenderer::removeMarker(uint64_t guid) {
@ -436,10 +438,11 @@ void QuestMarkerRenderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSe
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout_,
1, 1, &texDescSets_[marker.type], 0, nullptr);
// Push constants: model matrix + alpha
// Push constants: model matrix + alpha + grayscale tint
QuestMarkerPushConstants push{};
push.model = model;
push.alpha = fadeAlpha;
push.grayscale = marker.grayscale;
vkCmdPushConstants(cmd, pipelineLayout_,
VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT,