From 31037c11d5638f828e7dda670f59339d4801018d Mon Sep 17 00:00:00 2001 From: facelessuser Date: Thu, 29 Jan 2026 22:30:52 -0700 Subject: [PATCH 1/3] [css-color-4] Correction to ray trace to avoid throwing off our intersection calculation The suggested fix via https://github.com/w3c/csswg-drafts/issues/10579#issuecomment-3815362986 was not the ideal fix and artificially limited `tnear`. This is a numerical instability issue and should be addressed as such by using an epsilon compare to prevent rays that are too small. Related #10579 --- css-color-4/Overview.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css-color-4/Overview.bs b/css-color-4/Overview.bs index b8757467da33..fa4f016b5a20 100644 --- a/css-color-4/Overview.bs +++ b/css-color-4/Overview.bs @@ -6135,7 +6135,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping
  • let |d| be |b| - |a|
  • let |direction|[i] be |d|
  • -
  • if (d != 0): +
  • if abs(|d|) < 1E-15
  • -
  • if (|tnear| > 10) +
  • if |tnear| is infinite (or matches the initial very large value) From db955e104b2aa2869f172dfadbe0d9647a4e1686 Mon Sep 17 00:00:00 2001 From: facelessuser Date: Sun, 1 Feb 2026 21:16:55 -0700 Subject: [PATCH 2/3] A little more buffer --- css-color-4/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-color-4/Overview.bs b/css-color-4/Overview.bs index fa4f016b5a20..513d42fe1a60 100644 --- a/css-color-4/Overview.bs +++ b/css-color-4/Overview.bs @@ -6135,7 +6135,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping
  • let |d| be |b| - |a|
  • let |direction|[i] be |d|
  • -
  • if abs(|d|) < 1E-15 +
  • if abs(|d|) < 1E-12