Files

20 lines
900 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// VERTICAL SLICE - NOT FOR PRODUCTION
// 实现 GDD:design/ux/battle.md(§States 结算阶段/道具窗口态——D 区去饱和 + 金橙色相偏移锁输入,
// 明度不变:状态区分只用饱和/色相——art-bible §2 合规化 2026-09-12)。
// 逐格 canvas_item 材质(gl_compatibility 兼容;CanvasGroup 回背缓冲方案为 B5 复议项)。
shader_type canvas_item;
uniform float strength : hint_range(0.0, 1.0) = 0.0;
void fragment() {
vec4 col = COLOR;
float lum = dot(col.rgb, vec3(0.299, 0.587, 0.114));
// 金橙目标色相(#F0A828 族),重标定到原色明度——明度恒定
vec3 gold = vec3(0.941, 0.659, 0.157);
float gold_lum = dot(gold, vec3(0.299, 0.587, 0.114));
vec3 shifted = gold * (lum / max(gold_lum, 0.001));
vec3 desat = vec3(lum);
vec3 mixed = mix(col.rgb, mix(desat, shifted, 0.65), strength);
COLOR = vec4(mixed, col.a);
}