Magenta highlights blend toward white; name gem cut recipes per stone.
G in magenta mask lightens tier tints like dual-channel whiteBlend; jewelering shows Cut Tourmaline etc. instead of generic Cut gem.
@@ -156,8 +156,7 @@ const TINT_LIT_SPRITE_FRAG = [
156
156
" if (abs(color.r - color.b) * 255.0 <= 2.01 && color.g < color.r) {",
157
157
" float L = color.r;",
158
158
" float gBlend = color.r > 0.0 ? clamp(color.g / color.r, 0.0, 1.0) : 0.0;",
159
" float tintLuma = dot(u_tintColor, vec3(0.2126, 0.7152, 0.0722));",
160
" rgb = mix(u_tintColor, vec3(tintLuma), gBlend) * L;",
159
" rgb = mix(u_tintColor, vec3(1.0), gBlend) * L;",
161
160
" }",
162
161
" }",
163
162
" if (u_wade > 0.5 && fromBottom < 5.0) {",
@@ -282,8 +281,7 @@ const TIGHT_FIT_TINT_LIT_SPRITE_FRAG = [
282
281
" if (abs(color.r - color.b) * 255.0 <= 2.01 && color.g < color.r) {",
283
282
" float L = color.r;",
284
283
" float gBlend = color.r > 0.0 ? clamp(color.g / color.r, 0.0, 1.0) : 0.0;",
285
" float tintLuma = dot(u_tintColor, vec3(0.2126, 0.7152, 0.0722));",
286
" rgb = mix(u_tintColor, vec3(tintLuma), gBlend) * L;",
284
" rgb = mix(u_tintColor, vec3(1.0), gBlend) * L;",
287
285
" }",
288
286
" }",
289
287
" if (u_wade > 0.5 && fromBottom < 5.0) {",
@@ -156,8 +156,7 @@ const TINT_LIT_SPRITE_FRAG = [156
" if (abs(color.r - color.b) * 255.0 <= 2.01 && color.g < color.r) {",156
" if (abs(color.r - color.b) * 255.0 <= 2.01 && color.g < color.r) {",157
" float L = color.r;",157
" float L = color.r;",158
" float gBlend = color.r > 0.0 ? clamp(color.g / color.r, 0.0, 1.0) : 0.0;",158
" float gBlend = color.r > 0.0 ? clamp(color.g / color.r, 0.0, 1.0) : 0.0;",159
" float tintLuma = dot(u_tintColor, vec3(0.2126, 0.7152, 0.0722));",159
" rgb = mix(u_tintColor, vec3(1.0), gBlend) * L;",160
" rgb = mix(u_tintColor, vec3(tintLuma), gBlend) * L;",161
" }",160
" }",162
" }",161
" }",163
" if (u_wade > 0.5 && fromBottom < 5.0) {",162
" if (u_wade > 0.5 && fromBottom < 5.0) {",@@ -282,8 +281,7 @@ const TIGHT_FIT_TINT_LIT_SPRITE_FRAG = [282
" if (abs(color.r - color.b) * 255.0 <= 2.01 && color.g < color.r) {",281
" if (abs(color.r - color.b) * 255.0 <= 2.01 && color.g < color.r) {",283
" float L = color.r;",282
" float L = color.r;",284
" float gBlend = color.r > 0.0 ? clamp(color.g / color.r, 0.0, 1.0) : 0.0;",283
" float gBlend = color.r > 0.0 ? clamp(color.g / color.r, 0.0, 1.0) : 0.0;",285
" float tintLuma = dot(u_tintColor, vec3(0.2126, 0.7152, 0.0722));",284
" rgb = mix(u_tintColor, vec3(1.0), gBlend) * L;",286
" rgb = mix(u_tintColor, vec3(tintLuma), gBlend) * L;",287
" }",285
" }",288
" }",286
" }",289
" if (u_wade > 0.5 && fromBottom < 5.0) {",287
" if (u_wade > 0.5 && fromBottom < 5.0) {",@@ -134,6 +134,7 @@ test("jewelering cuts rough gems; staff recipes need cut gems", () =>
134
134
{
135
135
const cut = recipeDefinition("cut-tourmaline");
136
136
assert.ok(cut);
137
assert.equal(cut.craftGroupLabel, "Cut Tourmaline");
137
138
assert.equal(cut.stationId, CraftingStationId.jeweleringStation);
138
139
assert.equal(cut.skillId, SkillId.jewelering);
139
140
assert.equal(cut.minSkillLevel, tierSmeltSkillLevel(GemTier.tourmaline));
@@ -134,6 +134,7 @@ test("jewelering cuts rough gems; staff recipes need cut gems", () =>134
{134
{135
const cut = recipeDefinition("cut-tourmaline");135
const cut = recipeDefinition("cut-tourmaline");136
assert.ok(cut);136
assert.ok(cut);137
assert.equal(cut.craftGroupLabel, "Cut Tourmaline");137
assert.equal(cut.stationId, CraftingStationId.jeweleringStation);138
assert.equal(cut.stationId, CraftingStationId.jeweleringStation);138
assert.equal(cut.skillId, SkillId.jewelering);139
assert.equal(cut.skillId, SkillId.jewelering);139
assert.equal(cut.minSkillLevel, tierSmeltSkillLevel(GemTier.tourmaline));140
assert.equal(cut.minSkillLevel, tierSmeltSkillLevel(GemTier.tourmaline));@@ -28,25 +28,26 @@ test("magenta tintable when R==B and G < R", () =>
28
28
assert.equal(isMagentaTintable(0.5, 0.5, 0.5), false);
29
29
});
30
30
31
test("magenta tint preserves lightness and desaturates with G", () =>
31
test("magenta tint preserves lightness and highlights blend toward white", () =>
32
32
{
33
const tint = { r: 0, g: 1, b: 0 };
33
const tint = { r: 0.2, g: 0.4, b: 0.8 };
34
34
const dark = magentaTintedRgb(50 / 255, 0, 50 / 255, tint);
35
35
const light = magentaTintedRgb(1, 0, 1, tint);
36
assert.ok(dark.g < light.g);
37
const desat = magentaTintedRgb(120 / 255, 50 / 255, 120 / 255, tint);
36
assert.ok(dark.b < light.b);
37
const highlight = magentaTintedRgb(120 / 255, 50 / 255, 120 / 255, tint);
38
38
const pure = magentaTintedRgb(120 / 255, 0, 120 / 255, tint);
39
assert.ok(desat.r > pure.r);
39
assert.ok(highlight.g > pure.g);
40
assert.ok(highlight.r > pure.r);
40
41
});
41
42
42
test("dark target tints stay dark even on high-G magenta highlights", () =>
43
test("magenta G channel adds shiny white on dark tier tints", () =>
43
44
{
44
45
const coal = { r: 23 / 255, g: 23 / 255, b: 24 / 255 };
45
46
const pure = magentaTintedRgb(1, 0, 1, coal);
46
47
const highlight = magentaTintedRgb(1, 179 / 255, 1, coal);
47
48
assert.ok(pure.r < 0.12);
48
assert.ok(highlight.r < 0.15, `highlight washed out: ${highlight.r}`);
49
assert.ok(Math.abs(highlight.r - pure.r) < 0.05);
49
assert.ok(highlight.r > pure.r, "high-G magenta should shine toward white");
50
assert.ok(highlight.g > pure.g);
50
51
});
51
52
52
53
test("resolveItemTint uses potion instance color and tier tints", () =>
@@ -28,25 +28,26 @@ test("magenta tintable when R==B and G < R", () =>28
assert.equal(isMagentaTintable(0.5, 0.5, 0.5), false);28
assert.equal(isMagentaTintable(0.5, 0.5, 0.5), false);29
});29
});30
30
31
test("magenta tint preserves lightness and desaturates with G", () =>31
test("magenta tint preserves lightness and highlights blend toward white", () =>32
{32
{33
const tint = { r: 0, g: 1, b: 0 };33
const tint = { r: 0.2, g: 0.4, b: 0.8 };34
const dark = magentaTintedRgb(50 / 255, 0, 50 / 255, tint);34
const dark = magentaTintedRgb(50 / 255, 0, 50 / 255, tint);35
const light = magentaTintedRgb(1, 0, 1, tint);35
const light = magentaTintedRgb(1, 0, 1, tint);36
assert.ok(dark.g < light.g);36
assert.ok(dark.b < light.b);37
const desat = magentaTintedRgb(120 / 255, 50 / 255, 120 / 255, tint);37
const highlight = magentaTintedRgb(120 / 255, 50 / 255, 120 / 255, tint);38
const pure = magentaTintedRgb(120 / 255, 0, 120 / 255, tint);38
const pure = magentaTintedRgb(120 / 255, 0, 120 / 255, tint);39
assert.ok(desat.r > pure.r);39
assert.ok(highlight.g > pure.g);40
assert.ok(highlight.r > pure.r);40
});41
});41
42
42
test("dark target tints stay dark even on high-G magenta highlights", () =>43
test("magenta G channel adds shiny white on dark tier tints", () =>43
{44
{44
const coal = { r: 23 / 255, g: 23 / 255, b: 24 / 255 };45
const coal = { r: 23 / 255, g: 23 / 255, b: 24 / 255 };45
const pure = magentaTintedRgb(1, 0, 1, coal);46
const pure = magentaTintedRgb(1, 0, 1, coal);46
const highlight = magentaTintedRgb(1, 179 / 255, 1, coal);47
const highlight = magentaTintedRgb(1, 179 / 255, 1, coal);47
assert.ok(pure.r < 0.12);48
assert.ok(pure.r < 0.12);48
assert.ok(highlight.r < 0.15, `highlight washed out: ${highlight.r}`);49
assert.ok(highlight.r > pure.r, "high-G magenta should shine toward white");49
assert.ok(Math.abs(highlight.r - pure.r) < 0.05);50
assert.ok(highlight.g > pure.g);50
});51
});51
52
52
test("resolveItemTint uses potion instance color and tier tints", () =>53
test("resolveItemTint uses potion instance color and tier tints", () =>