Kelsidavis-WoWee/assets/shaders/quest_marker.frag.glsl
Kelsi 6928b8ddf6 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.
2026-03-10 22:26:56 -07:00

21 lines
597 B
GLSL

#version 450
layout(set = 1, binding = 0) uniform sampler2D markerTexture;
layout(push_constant) uniform Push {
mat4 model;
float alpha;
float grayscale; // 0 = full colour, 1 = fully desaturated (trivial quests)
} push;
layout(location = 0) in vec2 TexCoord;
layout(location = 0) out vec4 outColor;
void main() {
vec4 texColor = texture(markerTexture, TexCoord);
if (texColor.a < 0.1) discard;
float lum = dot(texColor.rgb, vec3(0.299, 0.587, 0.114));
vec3 rgb = mix(texColor.rgb, vec3(lum), push.grayscale);
outColor = vec4(rgb, texColor.a * push.alpha);
}