Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions css-color-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6300,8 +6300,8 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
<li>if |origin_rgb| is not in gamut
<ul>
<!-- we do, so perform chroma reduction -->
<li>let |low| be 0.0 + 1E-6 <a href="#raytrace-footnote-1"><sup>1</sup></a></li>
<li>let |high| be 1.0 - 1E-6 <a href="#raytrace-footnote-2"><sup>2</sup></a></li>
<li>let |low| be 0.0 + 1E-12 <a href="#raytrace-footnote-1"><sup>1</sup></a></li>
<li>let |high| be 1.0 - 1E-12 <a href="#raytrace-footnote-2"><sup>2</sup></a></li>
<li>let |last| be |origin_rgb|</li>
<li>for (i=0; i&lt;4; i++)
<ul>
Expand Down Expand Up @@ -6339,7 +6339,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
<li>let clip(|color|) be a function which converts |color| to |destination|,
clamps each component to the bounds of the reference range for that component
and returns the result</li>
<li>set |clipped| to clip(|current|)</li>
<li>set |clipped| to clip(|origin_rgb|)</li>
<li>return |clipped| as the gamut mapped color</li>
</ol>

Expand All @@ -6366,7 +6366,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
<li>let |d| be |b| - |a|</li>
<li>let |direction| <i>[i]</i> be |d|</li>
<!-- Non parallel cases -->
<li>if abs(|d|) < 1E-12
<li>if abs(|d|) > 1E-12 <a href="#raytrace-footnote-7"><sup>7</sup></a></li>
<ul>
<li>let |inv_d| be 1 / |d|</li>
<li>let |t1| be (|bmin| <i>[i]</i> - |a| ) * |inv_d| </li>
Expand All @@ -6392,7 +6392,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
<li>if |tnear| &lt; 0
<ul>
<li>let |tnear| be |tfar|
<a href="#raytrace-footnote-7"><sup>7</sup></a>
<a href="#raytrace-footnote-8"><sup>8</sup></a>
</li>
</ul>
</li>
Expand All @@ -6416,7 +6416,7 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
It is assumed the minimum value is 0
and that all channels have the same minimum.
The value should be small relative to the unit type.
64 bit could easily be as small as 1e-14, but 1e-6 is fine in practice.</li>
The specifed value of 1e-12 is for 64-bit, but for 32-bit, 1e-6 should be used.</li>
<li id="raytrace-footnote-2">
1.0 represents the maximum in-gamut channel value,
and it is assumed all channels have the same maximum.</li>
Expand All @@ -6438,7 +6438,10 @@ Sample Pseudocode for the Ray Trace Gamut Mapping</h4>
this simplifies to a single constant
rather than a 3-element array.</li>
<li id="raytrace-footnote-7">
favoring the first intersection in the direction |start| -> |end| .
The value should be small relative to the unit type.
The specifed value of 1e-12 is for 64-bit, but for 32-bit, 1e-6 should be used.</li>
<li id="raytrace-footnote-8">
favoring the first intersection in the direction |start| -> |end| .</li>
</ol>

</div>
Expand Down
Loading