summaryrefslogtreecommitdiff
path: root/manuals/chickadee/Blending.html
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-04-13 11:30:50 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-04-13 11:30:50 -0400
commitce9d6e8ad28b2d84d1a292a871c23b66a4654b54 (patch)
treeade44e7bb7b891c9ae0ceba18633ef4b2a911a7c /manuals/chickadee/Blending.html
parent2a30eb2a2d5472be3df1254d5d4d04310314e628 (diff)
Add new guile-sdl2 and chickadee releases.
Diffstat (limited to 'manuals/chickadee/Blending.html')
-rw-r--r--manuals/chickadee/Blending.html116
1 files changed, 97 insertions, 19 deletions
diff --git a/manuals/chickadee/Blending.html b/manuals/chickadee/Blending.html
index 4cf13a7..0a54bbe 100644
--- a/manuals/chickadee/Blending.html
+++ b/manuals/chickadee/Blending.html
@@ -85,40 +85,118 @@ ul.no-bullet {list-style: none}
Next: <a href="Framebuffers.html" accesskey="n" rel="next">Framebuffers</a>, Previous: <a href="3D-Models.html" accesskey="p" rel="prev">3D Models</a>, Up: <a href="Graphics.html" accesskey="u" rel="up">Graphics</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
-<span id="Blending-1"></span><h4 class="subsection">2.3.9 Blending</h4>
+<span id="Blending-1"></span><h4 class="subsection">2.3.10 Blending</h4>
<p>Rendering a scene often involves drawing layers of objects that
overlap each other. Blending determines how two overlapping pixels
are combined in the final image that is rendered to the screen.
-Chickadee provides the following blend modes:
</p>
-<ul>
-<li> <code>replace</code>
-Use the latest color, ignoring all others.
-
-</li><li> <code>alpha</code>
-Blend pixels according to the values of their alpha channels. This is
-the most commonly used blend mode and thus is Chickadee&rsquo;s default
-mode.
-
-</li><li> <code>add</code>
-Add all pixel color values together. The more colors blended
+<p>Chickadee provides the following blend modes:
+</p>
+<dl>
+<dt id="index-blend_003aalpha">Variable: <strong>blend:alpha</strong></dt>
+<dd><p>Blend pixels according to the values of their alpha channels. This is
+the most commonly used blend mode.
+</p></dd></dl>
+
+<dl>
+<dt id="index-blend_003areplace">Variable: <strong>blend:replace</strong></dt>
+<dd><p>Overwrite the output pixel color with the color being drawn.
+</p></dd></dl>
+
+<dl>
+<dt id="index-blend_003aadd">Variable: <strong>blend:add</strong></dt>
+<dd><p>Add all pixel color values together. The more colors blended
together, the more white the final color becomes.
+</p></dd></dl>
-</li><li> <code>subtract</code>
-Subtract all pixel color values. The more colors blended together,
+<dl>
+<dt id="index-blend_003asubtract">Variable: <strong>blend:subtract</strong></dt>
+<dd><p>Subtract all pixel color values. The more colors blended together,
the more black the final color becomes.
+</p></dd></dl>
-</li><li> <code>multiply</code>
+<dl>
+<dt id="index-blend_003amultiply">Variable: <strong>blend:multiply</strong></dt>
+</dl>
-</li><li> <code>darken</code>
+<dl>
+<dt id="index-blend_003adarken">Variable: <strong>blend:darken</strong></dt>
+</dl>
-</li><li> <code>lighten</code>
+<dl>
+<dt id="index-blend_003alighten">Variable: <strong>blend:lighten</strong></dt>
+</dl>
-</li><li> <code>screen</code>
+<dl>
+<dt id="index-blend_003ascreen">Variable: <strong>blend:screen</strong></dt>
+</dl>
+<p>Custom blend modes can be created using the <code>make-blend-mode</code> procedure:
+</p>
+<dl>
+<dt id="index-make_002dblend_002dmode">Procedure: <strong>make-blend-mode</strong> <em>equation source-function destination-function</em></dt>
+<dd><p>Return a new custom blend mode that applies <var>source-function</var> to
+the source color, <var>destination-function</var> to the destination color,
+and finally applies <var>equation</var> to the transformed
+source/destination color values. These arguments are <em>not</em>
+procedures, but symbolic representations of the functions that OpenGL
+supports.
+</p>
+<p>Valid values for <var>equation</var> are:
+</p>
+<ul>
+<li> <code>add</code>
+</li><li> <code>subtract</code>
+</li><li> <code>reverse-subtract</code>
+</li><li> <code>min</code>
+</li><li> <code>max</code>
+</li><li> <code>alpha-min</code>
+</li><li> <code>alpha-max</code>
</li></ul>
+<p>Valid values for <var>source-function</var> are:
+</p>
+<ul>
+<li> <code>zero</code>
+</li><li> <code>one</code>
+</li><li> <code>destination-color</code>
+</li><li> <code>one-minus-destination-color</code>
+</li><li> <code>source-alpha-saturate</code>
+</li><li> <code>source-alpha</code>
+</li><li> <code>one-minus-source-alpha</code>
+</li><li> <code>destination-alpha</code>
+</li><li> <code>one-minus-destination-alpha</code>
+</li><li> <code>constant-color</code>
+</li><li> <code>one-minus-constant-color</code>
+</li><li> <code>constant-alpha</code>
+</li><li> <code>one-minus-constant-alpha</code>
+</li></ul>
+
+<p>Valid values for <var>destination-function</var> are:
+</p>
+<ul>
+<li> <code>zero</code>
+</li><li> <code>one</code>
+</li><li> <code>source-color</code>
+</li><li> <code>one-minus-source-color</code>
+</li><li> <code>source-alpha</code>
+</li><li> <code>one-minus-source-alpha</code>
+</li><li> <code>destination-alpha</code>
+</li><li> <code>one-minus-destination-alpha</code>
+</li><li> <code>constant-color</code>
+</li><li> <code>one-minus-constant-color</code>
+</li><li> <code>constant-alpha</code>
+</li><li> <code>one-minus-constant-alpha</code>
+</li></ul>
+
+</dd></dl>
+
+<hr>
+<div class="header">
+<p>
+Next: <a href="Framebuffers.html" accesskey="n" rel="next">Framebuffers</a>, Previous: <a href="3D-Models.html" accesskey="p" rel="prev">3D Models</a>, Up: <a href="Graphics.html" accesskey="u" rel="up">Graphics</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
+</div>