Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Map: second lighting and grade pass towards the promo's warm golden look (Refs #2427) (#2881)

Eyal Golanc8397dc3c743
diff --git a/changelog.d/2427-golden-light.md b/changelog.d/2427-golden-light.md
new file mode 100644
index 000000000..aca4a701b
--- /dev/null
+++ b/changelog.d/2427-golden-light.md
@@ -0,0 +1,4 @@
+### Changed
+- The map's light and colour grade take a second pass towards the promo's warm golden look (#2427): a stronger sun with a
+ lighter fill, and hue curves that turn the land's terracotta and green fields to gold. The owner's exposure stays, the
+ open sea keeps its brightness and is slightly bluer, and the sand keeps its hue.
diff --git a/docs/visual-v1.md b/docs/visual-v1.md
index ff36d077a..4a311f6c7 100644
--- a/docs/visual-v1.md
+++ b/docs/visual-v1.md
@@ -3543,3 +3543,32 @@ Captures and colour-blind comparison images were retained locally with hashes. L
are in-engine captures at the source above; right panels are the existing AI-generated promo references,
not gameplay. Pending: a person's look at judea30 and the transport anomaly noted above. No simulation hash,
human review flag, licence declaration or release gate changed.
+
+## Issue #2427: second lighting and grade pass (warm golden land, sea held)
+Branch `visual/2427`. The issue called the land flat khaki next to promo 03. Measured on main at the gameplay pose, in WebGL, the land's means are already near the promo's. What differs is the spread: the promo's lit ground runs wider (hue 15-40 degrees) and its shade is greyer, ours sits in a narrow terracotta band with a pink cast. Much of that band in the frame is the territory tint of the 15 May 1948 control layer (`_ScBorderTint`), which the editor's `MapCapture.Promo` does not draw: orange-red over the hills, blue over the Israeli plain, which turns its fields lilac-grey. That tint is the borders lane's (#2431), not the grade's. Hypothesis, not tested: most of what is left between this pass and the promo's hills is the tint and the land's own colours.
+
+- **What changed.** `MapLighting`: sun 1.6 -> 1.8, colour (1.00, 0.84, 0.64) -> (1.00, 0.83, 0.63), the fill about a tenth lower, as colours (0.47, 0.54, 0.65), (0.43, 0.415, 0.38), (0.235, 0.20, 0.155). `MapGrade`: contrast 18 -> 20, and a `ColorCurves` with three LUT curves: `HueVsHue` (terracotta up, greens down, to gold), `HueVsSat` (the land, and a narrow band at the sea's own hue), `LumVsSat` (dark tones 9% less saturated). Post exposure 0.45, vignette 0.26 / 0.45, temperature, tint, split toning and global saturation are untouched. The sun's elevation and azimuth are unchanged (27 degrees changed the picture little; the land bake's bush shadows follow azimuth 285).
+- **Why hue curves.** #38 found one global grade cannot warm the land and keep the sea. No hue moves at the sea or the stripes, so that limit does not apply. The ambient does not reach the water (`ScWaterShade` reads the sun, not the SH). The sun does: a stronger sun lights the sea with its colour, and the first version of this pass took gameplay03's open sea from warmth -0.202 to -0.187, the #38 failure (found in review; the changelog then wrongly said the sea stayed). The fix is a saturation band at the sea's own hue, 8% at 0.57-0.592 ending at 0.606, short of the ruled stripe, with the sun's blue back near main's (0.63) and less dark-tone desaturation. A band to 0.615 pushed the stripe to 3.1 deltaE76. All three curves are inputs to the same LUT: no pass and no shader variant added. Keys are flat (zero tangents): smoothed tangents overshot into the sea's hue and took 0.011 off its luma.
+- **Bloom.** Not brought back. In the editor, LDR bloom 0.2 above 0.8 moved the gameplay land's luma by 0.003 and the Negev's mean by about 3/255 against the same grade without it: nothing a player would see, so no cost run was needed. SSAO was not tried (Tier decisions: metre radius cannot reach km relief).
+
+WebGL `?shot`, 1920x1080, main `5f8fa9fcd` against this grade on `14fcb0c3b` plus these values; crops as in "Issue #38: grade retune":
+
+| | promo | main | this grade |
+|---|---|---|---|
+| g03 land mean colour | (130, 104, 84) | (143, 114, 89) | (145, 115, 87) |
+| g03 land luma / p5 / contrast | 0.425 / 0.145 / 0.187 | 0.464 / 0.148 / 0.179 | 0.468 / 0.147 / 0.188 |
+| g03 land saturation / warmth | 0.364 / 0.181 | 0.404 / 0.212 | 0.422 / 0.230 |
+| g03 land hue, rose index | 26.6, +5 | 27.2, +5 | 28.9, +2 |
+| g03 open sea luma / p5 / warmth | 0.351 / 0.295 / -0.248 | 0.326 / 0.273 / -0.202 | 0.329 / 0.273 / -0.206 |
+| whole frame saturation / contrast / warmth, g03 | 0.37 / 0.196 / 0.078 | 0.40 / 0.174 / 0.080 | 0.42 / 0.179 / 0.091 |
+| palette distance g03 / d02 | | 0.32 / 0.53 | 0.32 / 0.49 |
+| d02 sand / sea warmth (bands [0.304, 0.456] / [-0.312, -0.208]) | 0.380 / -0.260 | 0.319 / -0.225 | 0.347 / -0.237 |
+| d02 Negev mean colour, pixels clipped in the crop | (190, 156, 128) | (201, 169, 113), 0.016% | (205, 170, 111), 0.088% |
+| d02 table mean colour | | (59, 44, 31) | (58, 44, 34) |
+
+- **What held it back.** A stronger first fit (sun 1.8, fill a quarter lower, land saturation 0.476 in the editor, against 0.401 on main) read more golden but failed five existing tests. No test or threshold was changed for this; the values were brought back until they pass: olive crown saturation 0.431 (bar 0.37), `TheBeachIsWide...` luma 0.685 (bar 0.72), `TheBakesCarveTheRelief` ratio 1.06 (bar 1.08), a neutral band's colour-blind distance 14.6 (bar 15) and the A2 wash 1.29 (bar 1.3). The beach's luma floor is why the land stays as bright as main's, 0.468 against the promo's 0.425. If the owner wants the stronger look, these are the bars to revisit: that is a design call, not a tuning step.
+- **Readability.** Editor renders at the gameplay pose: `ThePrimaryStripeIsTheDeeperBlueOfTheRuling` 2.6 deltaE76 (main 2.1, the #519 bound about 3), `TheSunlitDesertDoesNotClip` 0.00% in the Negev and at gameplay03, olive crown saturation 0.356 (bar 0.37). `TheLandReadsGoldenAndTheSeaHolds` guards the sea at gameplay03 in the editor: luma at least main's 0.368 and warmth at most main's -0.218 (it fails on the first version, -0.208). The editor read the second attempt as level with main while WebGL still read 0.005 greyer, so that guard is a floor, not proof: the WebGL number above is the one to trust.
+- **Board mode (`?hex-tiles`).** `HexLook` multiplies the sun by 1.22 (2.196 now, 1.952 on main) and sets saturation +30 over these curves. `HexBoardCapture.Run -board tel_aviv -boardOnly`, 1920x1080, in the editor on both sides: no pixel of the board at or over 0.995 in any channel on either side; mean board colour (136, 151, 57) -> (160, 154, 38), so its greens go more yellow, saturation 0.776 -> 0.802. The local ground textures are absent here, so this is the flat-colour fallback, not the textured board, and `HexLook` was not changed.
+- **HUD.** The top bar and date plate are pixel-identical between the two WebGL shots at gameplay03 (mean difference 0.00-0.01/255); the translucent help bar and legend move by 0.3 and 0.85/255 on average, and the minimap's frame by about 0.8/255 where map shows through. English and Hebrew composited frames were looked at, before and after. Label pills were looked at, not measured.
+- **Cost: NOT MEASURED.** `?vprofile` needs `machine_lock.py --exclusive` and the lanes may not take it. By construction only LUT inputs changed (as in #38), but that is an argument, not a number; the sun and ambient are uniforms. Boot: NOT MEASURED. The web build, uncompressed, is 555 MB on both sides by `du`; `wasm` 65,092 KB and `data` 36,072 KB on this branch.
+- **Seen, not changed.** Close views (hero06negev) show contour bands on the terrain before and after; not caused by this pass.
diff --git a/unity/Assets/Scripts/Map/MapGrade.cs b/unity/Assets/Scripts/Map/MapGrade.cs
index 6d01231c1..2a598b8d5 100644
--- a/unity/Assets/Scripts/Map/MapGrade.cs
+++ b/unity/Assets/Scripts/Map/MapGrade.cs
@@ -8,7 +8,8 @@ namespace Statecraft.Game.Map
/// <summary>The map's colour grade (research notes §1, §2.2 "Colour grading"): a Neutral tonemapper owned by the map (the
/// pipeline assets' template profile already applied one; without any, the graded Negev clips about 2.5% of its
/// pixels: GradeTests.TheSunlitDesertDoesNotClip), brighter, more contrast with darker shadows, slightly less saturated,
- /// a warm white balance with a touch of green tint, near-neutral shadows and highlights, and a dark-navy vignette. LDR
+ /// a warm white balance with a touch of green tint, near-neutral shadows and highlights, hue curves that turn the land to
+ /// gold (issue #2427), and a dark-navy vignette. LDR
/// grading on both tiers: the tonemapper and one LUT in the uber pass.
///
/// Issue #38 retune (docs/visual-v1.md, "Issue #38: grade retune"), fitted on WebGL frames against promo 03's land and
@@ -34,11 +35,13 @@ namespace Statecraft.Game.Map
/// 16 (merge-point carry, review I1): with Track B's palette the merged WebGL diorama02 measured 0.53 against the
/// promo's 0.43 at 16; the bar is promo + 0.05 (docs/visual-v1.md "Merge point").</summary>
public const float Saturation = -7f;
- /// <summary>Issue #38: Contrast 18 (was 14) and PostExposure 0.45 (was 0.15): crisper, with the low end pulled down by
+ /// <summary>Issue #2427: Contrast 20 (#38's 18), for the land's depth; the sea sits below the contrast's pivot, and the
+ /// stronger sun (MapLighting.SunIntensity) gives back what it takes. PostExposure stays the owner's 0.45.
+ /// Issue #38: Contrast 18 (was 14) and PostExposure 0.45 (was 0.15): crisper, with the low end pulled down by
/// the balance below and the mid-tones lifted back (owner's decision on #519, 2026-10-15, "Exposure 0.45, sea slightly
/// darker"). Tint -2 (was 2): a touch of green instead of magenta, part of the owner's "Less pink" (2026-10-15), so the
/// land does not read rose.</summary>
- public const float PostExposure = 0.45f, Contrast = 18f, Tint = -2f;
+ public const float PostExposure = 0.45f, Contrast = 20f, Tint = -2f;
/// <summary>Issue #38: balance -31 (was -15). The vignette stays at 0.26 and 0.45: the retune's stronger, softer 0.34 and
/// 0.84 darkened gameplay03's sea, which sits on the frame's left edge, well below promo 03's (owner's rule on #519:
/// "if the sea is still dark, use main's vignette"; docs/visual-v1.md, "Issue #38: grade retune").</summary>
@@ -54,6 +57,40 @@ namespace Statecraft.Game.Map
public static readonly Color SplitHighlights = new Color(0.84f, 0.87f, 0.835f);
public static readonly Color VignetteColour = new Color(0.05f, 0.06f, 0.10f);
+ /// <summary>Issue #2427: saturation by linear luminance (0 = no change): dark tones lose 9%, which keeps the hill olives
+ /// grey (KitTests' olive crowns: 0.331 on main, promo 0.274-0.370) under the warmer light and comes towards the promo's
+ /// shade (saturation about 0.3 against our 0.46). It ends at 0.09, about the sea's mean; the sea's mean colour moves
+ /// by under 1/255 (GradeTests' TheLandReadsGoldenAndTheSeaHolds).</summary>
+ public static readonly Keyframe[] LumVsSat = { Key(0f, -0.045f), Key(0.075f, -0.045f), Key(0.09f, 0f), Key(1f, 0f) };
+
+ static Keyframe Key(float at, float value) => new Keyframe(at, 0.5f + value, 0f, 0f);
+
+ /// <summary>Issue #2427: the land's golden turn, as an offset to the hue of each colour (hue 0-1 in linear HSV, 0 = no
+ /// change; docs/visual-v1.md, "Issue #2427"). The land's terracotta (hue about 0.06) moves up and the green fields (0.2)
+ /// move down, so they meet at gold. Flat at the reds (roofs, the other side's stripe, up to 0.035), at the sand (0.09-0.13:
+ /// shifting it took the dune coast under SeaTests' luma floor) and from 0.38 up (the surf, the sea, the Israeli stripe),
+ /// which is what one global grade
+ /// could not do (#38: warm grades turned the sea grey). Flat keys, so no curve overshoots
+ /// between them: smoothed tangents leaked a shift into the sea's hue, 0.011 of luma. LUT inputs: no pass, no variant.</summary>
+ public static readonly Keyframe[] HueVsHue =
+ {
+ Key(0f, 0f), Key(0.035f, 0f), Key(0.06f, 0.013f), Key(0.08f, 0.002f), Key(0.09f, 0f), Key(0.13f, 0f), Key(0.15f, -0.004f),
+ Key(0.2f, -0.03f), Key(0.3f, -0.02f), Key(0.38f, 0f), Key(1f, 0f),
+ };
+
+ /// <summary>Issue #2427: saturation by hue (0 = no change, 0.5 would double it): richer land, the sand unchanged, so the
+ /// Negev stays clear of mustard. The band at 0.57-0.592 is the open sea's own hue (WebGL, gameplay03: 0.576-0.602, 5th to
+ /// 95th percentile): the water multiplies by the sun's colour (ScWaterShade), so the stronger sun would turn it greyer, warmth -0.202 ->
+ /// -0.187 in WebGL against the promo's -0.248, the #38 failure; 8% more saturation, at the same luma, brings it to -0.206.
+ /// It ends at 0.606 to keep off the ruled stripe's blue (a band to 0.615 took the stripe to 3.1 deltaE76, over the
+ /// owner's bound of about 3; this one 2.6). Global Saturation stays
+ /// -7: raising it moves every hue (a trial at +2: sea warmth -0.216 -> -0.238).</summary>
+ public static readonly Keyframe[] HueVsSat =
+ {
+ Key(0f, 0f), Key(0.025f, 0f), Key(0.055f, 0.02f), Key(0.075f, 0.015f), Key(0.09f, 0f), Key(0.5f, 0f), Key(0.57f, 0.04f), Key(0.592f, 0.04f),
+ Key(0.606f, 0f), Key(1f, 0f),
+ };
+
public static void Apply(VolumeProfile profile)
{
var tm = profile.Add<Tonemapping>(true); tm.mode.Override(Tonemapper);
@@ -63,6 +100,10 @@ namespace Statecraft.Game.Map
var wb = profile.Add<WhiteBalance>(true); wb.temperature.Override(Temperature); wb.tint.Override(Tint);
var st = profile.Add<SplitToning>(true);
st.shadows.Override(SplitShadows); st.highlights.Override(SplitHighlights); st.balance.Override(SplitBalance);
+ var curves = profile.Add<ColorCurves>(true);
+ curves.hueVsHue.Override(new TextureCurve(HueVsHue, 0.5f, true, new Vector2(0f, 1f)));
+ curves.hueVsSat.Override(new TextureCurve(HueVsSat, 0.5f, true, new Vector2(0f, 1f)));
+ curves.lumVsSat.Override(new TextureCurve(LumVsSat, 0.5f, false, new Vector2(0f, 1f)));
var v = profile.Add<Vignette>(true);
v.intensity.Override(VignetteIntensity); v.smoothness.Override(VignetteSmoothness); v.color.Override(VignetteColour);
v.center.Override(new Vector2(0.5f, 0.5f)); v.rounded.Override(false);
@@ -73,7 +114,7 @@ namespace Statecraft.Game.Map
public static void SetActive(VolumeProfile profile, bool on)
{
foreach (var c in profile.components)
- if (c is Tonemapping || c is ColorAdjustments || c is WhiteBalance || c is SplitToning || c is Vignette) c.active = on;
+ if (c is Tonemapping || c is ColorAdjustments || c is WhiteBalance || c is SplitToning || c is ColorCurves || c is Vignette) c.active = on;
}
}
}
diff --git a/unity/Assets/Scripts/Map/MapLighting.cs b/unity/Assets/Scripts/Map/MapLighting.cs
index 87efe06fe..0d50dec8c 100644
--- a/unity/Assets/Scripts/Map/MapLighting.cs
+++ b/unity/Assets/Scripts/Map/MapLighting.cs
@@ -9,16 +9,22 @@ namespace Statecraft.Game.Map
{
/// <summary>The map's light (research notes §1 "Lighting", promo 03): a low, warm late-afternoon sun from the
/// west-north-west, whose long shadows fall to the right of the default view, and a cool sky fill that keeps the shadow
- /// side readable. The sun is fixed in the world, so orbiting the camera moves the light across the screen.</summary>
+ /// side readable. The sun is fixed in the world, so orbiting the camera moves the light across the screen.
+ ///
+ /// Issue #2427 (docs/visual-v1.md, "Issue #2427"): more of the land's light comes from the sun (1.8, was 1.6) and a tenth
+ /// less from the fill (was 0.52, 0.60, 0.72 / 0.48, 0.46, 0.42 / 0.26, 0.22, 0.17), a touch less green in the sun (was 1.00,
+ /// 0.84, 0.64; a bluer 0.61 greyed the sea). The relief reads deeper, and the sea, which reads the sun but not the ambient
+ /// (ScWaterShade), holds its luma at the owner's exposure; MapGrade.HueVsSat gives back its blue. A deeper cut of the fill (a quarter) took TerrainShaderTests' relief ratio from 1.11 to 1.06,
+ /// under its 1.08. The elevation stays 30: a 27-degree trial changed the picture little.</summary>
public static class MapLighting
{
public const float SunElevation = 30f; // degrees above the horizon
public const float SunAzimuth = 285f; // degrees clockwise from north: west-north-west
- public const float SunIntensity = 1.6f;
- public static readonly Color SunColour = new Color(1.00f, 0.84f, 0.64f);
- public static readonly Color AmbientSky = new Color(0.52f, 0.60f, 0.72f);
- public static readonly Color AmbientEquator = new Color(0.48f, 0.46f, 0.42f);
- public static readonly Color AmbientGround = new Color(0.26f, 0.22f, 0.17f);
+ public const float SunIntensity = 1.8f;
+ public static readonly Color SunColour = new Color(1.00f, 0.83f, 0.63f);
+ public static readonly Color AmbientSky = new Color(0.47f, 0.54f, 0.65f);
+ public static readonly Color AmbientEquator = new Color(0.43f, 0.415f, 0.38f);
+ public static readonly Color AmbientGround = new Color(0.235f, 0.2f, 0.155f);
/// <summary>Records the sun's transform and light settings and the active scene's ambient, and returns the action that
/// puts them back (review M1: CameraRig.Init registers it as its first teardown action, so destroying the map leaves
diff --git a/unity/Assets/Tests/EditMode/GradeTests.cs b/unity/Assets/Tests/EditMode/GradeTests.cs
index 16eb4e945..f57521a28 100644
--- a/unity/Assets/Tests/EditMode/GradeTests.cs
+++ b/unity/Assets/Tests/EditMode/GradeTests.cs
@@ -312,6 +312,68 @@ public class GradeTests
Assert.That(ratio, Is.InRange(0.98f, 1.12f));
}
+ /// <summary>Issue #2427: the land's golden turn lives in hue curves, so it cannot touch what the owner ruled on: at the
+ /// blues of the sea and the Israeli stripe, the cyan surf and the reds of the roofs and the other side's stripe no hue
+ /// moves, and saturation moves only in a narrow band at the sea's hue. The land's terracotta moves up to gold and the green fields down to it, without folding (a hue never passes
+ /// the next one); the sand keeps its hue and saturation, because the dune coast has to stay bright (SeaTests'
+ /// TheBeachIsWideOnTheDuneCoastAndNarrowUnderTheKurkar, 0.72 of luma: a first fit that shifted it read 0.685). Dark tones
+ /// lose a little saturation, so the hill olives stay grey (KitTests' TheHillOliveCrownsAreDarkWithPaleSunlitTops, and the
+ /// promo's shade is about 0.3 against our 0.46), and the sea's middle tones do not. The "grade" toggle takes the curves
+ /// off with the rest.</summary>
+ [Test]
+ public void TheGoldenCurvesTurnTheLandAndLeaveTheSeaAlone()
+ {
+ var (_, _, profile) = Open();
+ Assert.IsTrue(profile.TryGet<ColorCurves>(out var cc), "the grade has hue curves");
+ float Hue(float h) => cc.hueVsHue.value.Evaluate(h) - 0.5f; float Sat(float h) => cc.hueVsSat.value.Evaluate(h) * 2f;
+ foreach (var h in new[] { 0f, 0.01f, 0.02f, 0.4f, 0.45f, 0.5f, 0.55f, 0.58f, 0.6f, 0.65f, 0.8f, 0.95f, 0.99f })
+ Assert.AreEqual(0f, Hue(h), 1e-3f, $"hue {h}: no hue shift");
+ foreach (var h in new[] { 0f, 0.01f, 0.02f, 0.4f, 0.45f, 0.5f, 0.65f, 0.8f, 0.95f, 0.99f })
+ Assert.AreEqual(1f, Sat(h), 2e-3f, $"hue {h}: no saturation change");
+ Assert.Greater(Sat(0.585f), 1.06f, "the sea's own blue gains what the warmer sun takes from it");
+ Assert.Greater(Hue(0.06f), 0.005f, "terracotta moves towards gold"); Assert.Less(Hue(0.2f), -0.01f, "green fields move towards olive gold");
+ Assert.Greater(Sat(0.06f), 1.03f, "the land is richer");
+ Assert.AreEqual(0f, Hue(0.11f), 1e-3f, "the sand keeps its hue"); Assert.AreEqual(1f, Sat(0.11f), 2e-3f, "and its saturation");
+ float Lum(float l) => cc.lumVsSat.value.Evaluate(l) * 2f;
+ Assert.Less(Lum(0.05f), 0.95f, "dark tones lose saturation"); Assert.AreEqual(1f, Lum(0.12f), 2e-3f, "the sea's mean and everything over it do not");
+ for (float h = 0f; h < 0.4f; h += 0.002f) Assert.Greater(h + 0.002f + Hue(h + 0.002f), h + Hue(h), $"hue {h}: the curve does not fold");
+ MapGrade.SetActive(profile, false); Assert.IsFalse(cc.active, "the toggle takes the curves off");
+ MapGrade.SetActive(profile, true); Assert.IsTrue(cc.active);
+ }
+
+ /// <summary>Rendered at the gameplay pose, issue #2427. The land turns warmer and less rose (main: warmth 0.241, rose
+ /// +0.005), while the open sea holds on both of the owner's counts: no darker than main's (0.368, #519) and no greyer
+ /// (warmth -0.218, the #38 failure). The sun warms the water (ScWaterShade multiplies by its colour), so the curves give
+ /// the sea's own hues back what it takes; the control shows they do that without moving its luma.</summary>
+ [UnityTest]
+ public IEnumerator TheLandReadsGoldenAndTheSeaHolds()
+ {
+ var (map, rig, profile) = Open();
+ yield return null;
+ PromoPose.Gameplay03.Apply(rig, map.Frame); rig.TopInset = 0f; rig.Apply();
+ var cam = Camera.main;
+ VisualToggles.Set("trees", false); // the ground's colour, not the groves'
+ static Color Crop(RenderSample s, float x0, float x1)
+ {
+ Color sum = Color.black; int n = 0;
+ for (int y = (int)(s.Height * 0.3f); y < s.Height * 0.7f; y++) for (int x = (int)(s.Width * x0); x < s.Width * x1; x++) { sum += s.At(x, y); n++; }
+ return sum / n;
+ }
+ var s = RenderSample.Render(cam, 480, 270);
+ Color land = Crop(s, 0.55f, 0.95f), sea = Crop(s, 0.02f, 0.28f);
+ float warmth = land.r - land.b, seaLuma = RenderSample.Luma(sea), rose = (land.r - land.g) - (land.g - land.b);
+ TestContext.WriteLine($"land {land} warmth {warmth:0.000} rose {rose:0.000} luma {RenderSample.Luma(land):0.000}; sea {sea} luma {seaLuma:0.000}");
+ Assert.GreaterOrEqual(warmth, 0.265f, "the land is warm");
+ Assert.LessOrEqual(rose, -0.01f, "golden, not rose (the owner's \"Less pink\" on #519)");
+ Assert.GreaterOrEqual(seaLuma, 0.368f, "the sea is no darker than main's (#519)");
+ Assert.LessOrEqual(sea.r - sea.b, -0.218f, "the sea is no greyer than main's: the stronger, warmer sun must not warm it (#38)");
+ Assert.IsTrue(profile.TryGet<ColorCurves>(out var cc), "the grade has hue curves");
+ cc.active = false; var off = Crop(RenderSample.Render(cam, 480, 270), 0.02f, 0.28f); cc.active = true;
+ TestContext.WriteLine($"sea with the curves off {off}, warmth {off.r - off.b:0.000}");
+ Assert.AreEqual(RenderSample.Luma(off), seaLuma, 1f / 255f, "the curves leave the sea's luma");
+ Assert.Less(sea.r - sea.b, off.r - off.b, "and they make it bluer, not greyer");
+ }
+
/// <summary>Rendered: MapGrade's vignette darkens the corners relative to the centre more than the vignette it replaces
/// (the pipeline's template profile, Settings/SampleSceneProfile, applies a 0.2 black one, which "plain" still shows).</summary>
[UnityTest]
diff --git a/unity/Assets/Tests/EditMode/LightingTests.cs b/unity/Assets/Tests/EditMode/LightingTests.cs
index 30165abf2..2760c3f80 100644
--- a/unity/Assets/Tests/EditMode/LightingTests.cs
+++ b/unity/Assets/Tests/EditMode/LightingTests.cs
@@ -56,7 +56,7 @@ public class LightingTests
// hold a sharp trilight). The evaluated linear values stay pinned so a change to the colours is a visible decision.
var e = new Color[3]; RenderSettings.ambientProbe.Evaluate(new[] { Vector3.up, Vector3.right, Vector3.down }, e);
TestContext.WriteLine($"ambient evaluated (linear) up {e[0]} horizon {e[1]} down {e[2]}; horizon sRGB {e[1].gamma}");
- var expected = new[] { new Color(0.216f, 0.255f, 0.326f), new Color(0.184f, 0.179f, 0.171f), new Color(0.119f, 0.103f, 0.080f) };
+ var expected = new[] { new Color(0.173f, 0.203f, 0.261f), new Color(0.146f, 0.143f, 0.138f), new Color(0.095f, 0.083f, 0.065f) }; // issue #2427
for (int i = 0; i < 3; i++)
{
Assert.AreEqual(expected[i].r, e[i].r, 0.01f, $"direction {i} r"); Assert.AreEqual(expected[i].g, e[i].g, 0.01f, $"direction {i} g");