- From: Isaac Muse via GitHub <noreply@w3.org>
- Date: Thu, 29 Jan 2026 04:02:31 +0000
- To: public-css-archive@w3.org
@svgeesus I'd like to make one small change to the algorithm. Seeing the ray trace algorithm made it into the spec, and even though I've been using the algorithm for a year and half, I started putting it through some extensive testing, just to make sure. This exposed a rare issue that can occur, which is easy for us to fix. Change this: ``` 8. if tnear is infinite (or matches the initial very large value) - return INTERSECTION NOT FOUND ``` to ``` 8. if tnear is greater than 10 - return INTERSECTION NOT FOUND ``` Basically, when this value is getting large, we are really close to the gamut surface. Infinity is basically a perfect scenario, but any large value can indicate we are close enough to the surface to consider we are done. If we accept too large of values, it can throw off our intersection calculation. Just to illustrate the issue. Consider this value `color(srgb 1.0000000000000004 0.19694944045886786 0.026717808177518357)`, which is very close to the surface. On the fourth iteration, we get a very large `tnear` that is not infinity. This causes our intersection to be calculated incorrectly. <img width="800" height="800" alt="Image" src="https://github.com/user-attachments/assets/7bd06be1-cdef-4eda-bd9a-ec573d93a6ae" /> With the fix in place, it clears up the issue we stop. <img width="800" height="800" alt="Image" src="https://github.com/user-attachments/assets/9cf9c8c7-cd83-4ed5-ae85-060a82c11b57" /> -- GitHub Notification of comment by facelessuser Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10579#issuecomment-3815362986 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 29 January 2026 04:02:32 UTC