Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 4015

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: csplugincommon/softshader/types.h Source File (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>csplugincommon/softshader/types.h</h1><a href="types_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2005 by Jorrit Tyberghein</span>
<a name="l00003"></a>00003 <span class="comment">              (C) 2005 by Frank Richter</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00007"></a>00007 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment">    Library General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00016"></a>00016 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00017"></a>00017 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __CS_CSPLUGINCOMMON_SOFTSHADER_TYPES_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __CS_CSPLUGINCOMMON_SOFTSHADER_TYPES_H__</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="fixed_8h.html" title="Fixed-point number classes.">csgeom/fixed.h</a>"</span>
<a name="l00028"></a>00028 
<a name="l00032"></a>00032 <span class="keyword">namespace </span>CS
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034 <span class="keyword">namespace </span>PluginCommon
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036   <span class="keyword">namespace </span>SoftShader
<a name="l00037"></a>00037   {
<a name="l00039"></a><a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#c3cae92639297bf4079b8721c43dcb61">00039</a>     <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#c3cae92639297bf4079b8721c43dcb61" title="Maximum number of vertex buffers supported.">maxBuffers</a> = 16;
<a name="l00041"></a><a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#3b8d057a47c98a410d605bebe49f4177">00041</a>     <span class="keyword">typedef</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> <a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#3b8d057a47c98a410d605bebe49f4177" title="Type for a bit mask of buffers.">BuffersMask</a>;
<a name="l00043"></a><a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#0dbb7d03fcabcf39439e6a69d7b13089">00043</a>     <span class="keyword">typedef</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> <a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#0dbb7d03fcabcf39439e6a69d7b13089" title="Type for a bit mask of textures.">TexturesMask</a>;
<a name="l00044"></a>00044   
<a name="l00046"></a>00046     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00047"></a><a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#3e8faba68b10819a14d92e839f0cdcee">00047</a>     <span class="keyword">static</span> <span class="keyword">inline</span> T <a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#3e8faba68b10819a14d92e839f0cdcee" title="Helper function to linearly interpolate.">Lerp</a> (<span class="keyword">const</span> T&amp; a, <span class="keyword">const</span> T&amp; b, <span class="keywordtype">float</span> f)
<a name="l00048"></a>00048     { <span class="keywordflow">return</span> a + (b-a) * f; }
<a name="l00049"></a>00049   
<a name="l00051"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html">00051</a>     <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html" title="Interpolator for a polygon edge.">InterpolateEdgePersp</a>
<a name="l00052"></a>00052     {
<a name="l00054"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#686b19614db9e445108e77c6f56c7d87">00054</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#686b19614db9e445108e77c6f56c7d87" title="X coordinate.">x</a>;
<a name="l00056"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#89304eac4608f9506d01e3abf7d50806">00056</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#89304eac4608f9506d01e3abf7d50806" title="X per-scanline delta.">dxdy</a>;
<a name="l00058"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9">00058</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a>;
<a name="l00060"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#ad2481f87be4f405c972bc6814a1440e">00060</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#ad2481f87be4f405c972bc6814a1440e" title="Inverse Z per-scanline delta.">dIzdy</a>;
<a name="l00062"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html">00062</a>       <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html" title="A single interpolated buffer value.">PerFloat</a>
<a name="l00063"></a>00063       {
<a name="l00065"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84">00065</a>         <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a>;
<a name="l00067"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#bde29414558f17979596935bb787105f">00067</a>         <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#bde29414558f17979596935bb787105f" title="Buffer value div Z per-scanline delta.">dIcdy</a>;
<a name="l00069"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#50b158edd860bd2b835fae69addbaea0">00069</a>         <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#50b158edd860bd2b835fae69addbaea0" title="Un-divided buffer value.">c</a>;
<a name="l00070"></a>00070       } <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[<a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#c3cae92639297bf4079b8721c43dcb61" title="Maximum number of vertex buffers supported.">maxBuffers</a>*4];
<a name="l00071"></a>00071   
<a name="l00073"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#0b6b561bd36933a1eb8a28c02e051ef8">00073</a>       <span class="keywordtype">void</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#0b6b561bd36933a1eb8a28c02e051ef8" title="Setup interpolator.">Setup</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>* vertices, <span class="keyword">const</span> <span class="keywordtype">float</span>* floats, 
<a name="l00074"></a>00074         <span class="keyword">const</span> <span class="keywordtype">size_t</span> floatNum, <span class="keywordtype">size_t</span> sv, <span class="keywordtype">size_t</span> fv, <span class="keywordtype">int</span> sy)
<a name="l00075"></a>00075       {
<a name="l00076"></a>00076         <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> vsv (vertices[sv]);
<a name="l00077"></a>00077         <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> vfv (vertices[fv]);
<a name="l00078"></a>00078   
<a name="l00079"></a>00079         <span class="keywordtype">float</span> dy = vsv.<a class="code" href="classcsVector3.html#e0a74264b61eb5d61da63b3c101af719" title="The Y component of the vector.">y</a> - vfv.<a class="code" href="classcsVector3.html#e0a74264b61eb5d61da63b3c101af719" title="The Y component of the vector.">y</a>;
<a name="l00080"></a>00080         <span class="keywordflow">if</span> (dy)
<a name="l00081"></a>00081         {
<a name="l00082"></a>00082           <span class="keywordtype">float</span> inv_dy = 1 / dy;
<a name="l00083"></a>00083           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#686b19614db9e445108e77c6f56c7d87" title="X coordinate.">x</a> = vsv.<a class="code" href="classcsVector3.html#823fdba459ff91e8a5e6834ded7c815f" title="The X component of the vector.">x</a>;
<a name="l00084"></a>00084           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#89304eac4608f9506d01e3abf7d50806" title="X per-scanline delta.">dxdy</a> = (vfv.<a class="code" href="classcsVector3.html#823fdba459ff91e8a5e6834ded7c815f" title="The X component of the vector.">x</a> - <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#686b19614db9e445108e77c6f56c7d87" title="X coordinate.">x</a>) * inv_dy;
<a name="l00085"></a>00085           <span class="keyword">const</span> <span class="keywordtype">float</span> Isz = vsv.<a class="code" href="classcsVector3.html#3f761bd195c7ccec59ea863a87a1ad05" title="The Z component of the vector.">z</a>; <span class="comment">// Z coord already inverted here</span>
<a name="l00086"></a>00086           <span class="keyword">const</span> <span class="keywordtype">float</span> Ifz = vfv.<a class="code" href="classcsVector3.html#3f761bd195c7ccec59ea863a87a1ad05" title="The Z component of the vector.">z</a>;
<a name="l00087"></a>00087           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#ad2481f87be4f405c972bc6814a1440e" title="Inverse Z per-scanline delta.">dIzdy</a> = (Ifz - Isz) * inv_dy;
<a name="l00088"></a>00088   
<a name="l00089"></a>00089           <span class="comment">// horizontal pixel correction</span>
<a name="l00090"></a>00090           <span class="keywordtype">float</span> deltaX = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#89304eac4608f9506d01e3abf7d50806" title="X per-scanline delta.">dxdy</a> *
<a name="l00091"></a>00091             (vsv.<a class="code" href="classcsVector3.html#e0a74264b61eb5d61da63b3c101af719" title="The Y component of the vector.">y</a> - (float (sy) - 0.5));
<a name="l00092"></a>00092           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#686b19614db9e445108e77c6f56c7d87" title="X coordinate.">x</a> += deltaX;
<a name="l00093"></a>00093   
<a name="l00094"></a>00094           <span class="comment">// apply sub-pixel accuracy factor</span>
<a name="l00095"></a>00095           <span class="keywordtype">float</span> Factor;
<a name="l00096"></a>00096           <span class="keywordflow">if</span> (vfv.<a class="code" href="classcsVector3.html#823fdba459ff91e8a5e6834ded7c815f" title="The X component of the vector.">x</a> != vsv.<a class="code" href="classcsVector3.html#823fdba459ff91e8a5e6834ded7c815f" title="The X component of the vector.">x</a>)
<a name="l00097"></a>00097             Factor = deltaX / (vfv.<a class="code" href="classcsVector3.html#823fdba459ff91e8a5e6834ded7c815f" title="The X component of the vector.">x</a> - vsv.<a class="code" href="classcsVector3.html#823fdba459ff91e8a5e6834ded7c815f" title="The X component of the vector.">x</a>);
<a name="l00098"></a>00098           <span class="keywordflow">else</span>
<a name="l00099"></a>00099             Factor = 0;
<a name="l00100"></a>00100   
<a name="l00101"></a>00101           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a> = <a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#3e8faba68b10819a14d92e839f0cdcee" title="Helper function to linearly interpolate.">Lerp</a> (Isz, Ifz, Factor);
<a name="l00102"></a>00102           <span class="keyword">const</span> <span class="keywordtype">float</span> z = 1.0f/<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a>;
<a name="l00103"></a>00103   
<a name="l00104"></a>00104             <span class="comment">// Z coord already inverted here</span>
<a name="l00105"></a>00105           <span class="keyword">const</span> <span class="keywordtype">float</span>* Icsv = floats + sv*floatNum;
<a name="l00106"></a>00106           <span class="keyword">const</span> <span class="keywordtype">float</span>* Icfv = floats + fv*floatNum;
<a name="l00107"></a>00107           <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> f = 0; f &lt; floatNum; f++)
<a name="l00108"></a>00108           {
<a name="l00109"></a>00109             <span class="keyword">const</span> <span class="keywordtype">float</span> fs = *Icsv++; 
<a name="l00110"></a>00110             <span class="keyword">const</span> <span class="keywordtype">float</span> ff = *Icfv++; 
<a name="l00111"></a>00111             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a> = <a class="code" href="namespaceCS_1_1PluginCommon_1_1SoftShader.html#3e8faba68b10819a14d92e839f0cdcee" title="Helper function to linearly interpolate.">Lerp</a> (fs, ff, Factor);
<a name="l00112"></a>00112             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#50b158edd860bd2b835fae69addbaea0" title="Un-divided buffer value.">c</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a> * z;
<a name="l00113"></a>00113             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#bde29414558f17979596935bb787105f" title="Buffer value div Z per-scanline delta.">dIcdy</a> = (ff - fs) * inv_dy;
<a name="l00114"></a>00114           }
<a name="l00115"></a>00115         } <span class="comment">/* endif */</span>
<a name="l00116"></a>00116       }
<a name="l00118"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#55dd9b1a118c5029609f5668615c2324">00118</a>       <span class="keywordtype">void</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#55dd9b1a118c5029609f5668615c2324" title="Advance a line down.">Advance</a> (<span class="keyword">const</span> <span class="keywordtype">size_t</span> floatNum)
<a name="l00119"></a>00119       {
<a name="l00120"></a>00120         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#ad2481f87be4f405c972bc6814a1440e" title="Inverse Z per-scanline delta.">dIzdy</a>;
<a name="l00121"></a>00121         <span class="keyword">const</span> <span class="keywordtype">float</span> z = 1.0f/<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a>;
<a name="l00122"></a>00122   
<a name="l00123"></a>00123         <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> f = 0; f &lt; floatNum; f++)
<a name="l00124"></a>00124         {
<a name="l00125"></a>00125           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#bde29414558f17979596935bb787105f" title="Buffer value div Z per-scanline delta.">dIcdy</a>;
<a name="l00126"></a>00126           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#50b158edd860bd2b835fae69addbaea0" title="Un-divided buffer value.">c</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a> * z;
<a name="l00127"></a>00127         }
<a name="l00128"></a>00128         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#686b19614db9e445108e77c6f56c7d87" title="X coordinate.">x</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#89304eac4608f9506d01e3abf7d50806" title="X per-scanline delta.">dxdy</a>;
<a name="l00129"></a>00129       }
<a name="l00130"></a>00130     };
<a name="l00132"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html">00132</a>     <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html" title="Interpolator over a scanline, common code.">InterpolateScanlinePerspCommon</a>
<a name="l00133"></a>00133     {
<a name="l00135"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0">00135</a>       <a class="code" href="classcsFixed24.html" title="Encapsulation of a 8.24 fixed-point number.">csFixed24</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0" title="1/z and per-pixel delta">Iz</a>, <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fdd54bc0db7b728c7bb559702f53b78b">dIzdx</a>;
<a name="l00137"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c">00137</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a>, <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a>, <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fa32c2ef7f7cccfc540f731d518d9863">dIzdx_fLast</a>;
<a name="l00138"></a>00138     };
<a name="l00139"></a>00139   
<a name="l00141"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html">00141</a>     <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html" title="Undivided buffer values.">ScanlineComp</a>
<a name="l00142"></a>00142     {
<a name="l00144"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1757576f4bfeb432fa93da8cd2b08c5b">00144</a>       <a class="code" href="classcsFixed16.html" title="Encapsulation of a 16.16 fixed-point number.">csFixed16</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1757576f4bfeb432fa93da8cd2b08c5b" title="&amp;quot;Direct&amp;quot; component">c</a>;
<a name="l00146"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1ea1b6c7e30fb9a5dec58d6858295d1c">00146</a>       <a class="code" href="classcsFixed16.html" title="Encapsulation of a 16.16 fixed-point number.">csFixed16</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1ea1b6c7e30fb9a5dec58d6858295d1c" title="&amp;quot;Direct&amp;quot; component delta">dcdx</a>;
<a name="l00147"></a>00147     };
<a name="l00149"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html">00149</a>     <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html" title="Buffer values div Z.">ScanlineCompDivZ</a>
<a name="l00150"></a>00150     {
<a name="l00152"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6">00152</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a>;
<a name="l00154"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#a5952693003844d6947c9ea711550985">00154</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#a5952693003844d6947c9ea711550985" title="1/component delta">dIcdx</a>;
<a name="l00156"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#5db78dbd396f4f989c7b81c87710467c">00156</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#5db78dbd396f4f989c7b81c87710467c" title="1/component delta, last span">dIcdxLast</a>;
<a name="l00157"></a>00157     };
<a name="l00158"></a>00158 
<a name="l00160"></a>00160     <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> maxFloats&gt;
<a name="l00161"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html">00161</a>     <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html" title="Interpolator over a scanline.">InterpolateScanlinePersp</a> : <span class="keyword">public</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html" title="Interpolator over a scanline, common code.">InterpolateScanlinePerspCommon</a>
<a name="l00162"></a>00162     {
<a name="l00164"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01">00164</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html" title="Undivided buffer values.">ScanlineComp</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[maxFloats];
<a name="l00166"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a">00166</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html" title="Buffer values div Z.">ScanlineCompDivZ</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[maxFloats];
<a name="l00167"></a>00167   
<a name="l00169"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888">00169</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00171"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#5adcc55cea2dc1f6904dc96230142ebc">00171</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#5adcc55cea2dc1f6904dc96230142ebc" title="Interpolation shift.">InterpolShift</a>;
<a name="l00173"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d">00173</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a>;
<a name="l00175"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8">00175</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a>;
<a name="l00177"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#01f2746ba09bd68e7e0135490392667e">00177</a>       <span class="keywordtype">float</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#01f2746ba09bd68e7e0135490392667e" title="Inverse of last span size.">invLastSpan</a>;
<a name="l00178"></a>00178   
<a name="l00180"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#eb0bbf570b7bf0ae184f805e3e06fb08">00180</a>       <span class="keywordtype">void</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#eb0bbf570b7bf0ae184f805e3e06fb08" title="Setup interpolation over a scanline, given left and right edge.">Setup</a> (<span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html" title="Interpolator for a polygon edge.">InterpolateEdgePersp</a>&amp; L, <span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html" title="Interpolator for a polygon edge.">InterpolateEdgePersp</a>&amp; R,
<a name="l00181"></a>00181         <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> len, <span class="keywordtype">int</span> ipolStep, <span class="keywordtype">int</span> ipolShift)
<a name="l00182"></a>00182       {
<a name="l00183"></a>00183         <span class="comment">// @@@ If you notice something that can be sped up, don't hesitate!</span>
<a name="l00184"></a>00184         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a> = ipolStep;
<a name="l00185"></a>00185         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#5adcc55cea2dc1f6904dc96230142ebc" title="Interpolation shift.">InterpolShift</a> = ipolShift;
<a name="l00186"></a>00186         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a> = len / ipolStep;
<a name="l00187"></a>00187 
<a name="l00188"></a>00188         <span class="keyword">const</span> <span class="keywordtype">float</span> inv_l = 1.0f/len;
<a name="l00189"></a>00189         <span class="keyword">const</span> <span class="keywordtype">float</span> ipf = (float)<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00190"></a>00190         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00191"></a>00191         <span class="keyword">const</span> <span class="keywordtype">float</span> fact = inv_l * ipf;
<a name="l00192"></a>00192         <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> lastSpanSize = len % ipolStep;
<a name="l00193"></a>00193         <span class="keywordflow">if</span> (lastSpanSize == 0) lastSpanSize = ipolStep;
<a name="l00194"></a>00194         <span class="keyword">const</span> <span class="keywordtype">float</span> lastFact = float (lastSpanSize) / ipf;
<a name="l00195"></a>00195         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#01f2746ba09bd68e7e0135490392667e" title="Inverse of last span size.">invLastSpan</a> = 1.0f / float(lastSpanSize);
<a name="l00196"></a>00196         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0" title="1/z and per-pixel delta">Iz</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a> = L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a>;
<a name="l00197"></a>00197         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fdd54bc0db7b728c7bb559702f53b78b">dIzdx</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> = (R.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a> - L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a>) * inv_l;
<a name="l00198"></a>00198         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fa32c2ef7f7cccfc540f731d518d9863">dIzdx_fLast</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> * float (lastSpanSize);
<a name="l00199"></a>00199         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> *= ipf;
<a name="l00200"></a>00200         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a> += (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a> == 0) ? <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fa32c2ef7f7cccfc540f731d518d9863">dIzdx_fLast</a> : <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a>;   
<a name="l00201"></a>00201         <span class="keywordtype">float</span> z2 = 1.0f / <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a>;
<a name="l00202"></a>00202         <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> f = 0; f &lt; maxFloats; f++)
<a name="l00203"></a>00203         {
<a name="l00204"></a>00204           <span class="keyword">const</span> <span class="keywordtype">float</span> cL = L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#50b158edd860bd2b835fae69addbaea0" title="Un-divided buffer value.">c</a>;
<a name="l00205"></a>00205           <span class="keyword">const</span> <span class="keywordtype">float</span> IcL = L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a>;
<a name="l00206"></a>00206           <span class="keyword">const</span> <span class="keywordtype">float</span> IcR = R.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a>;
<a name="l00207"></a>00207           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1757576f4bfeb432fa93da8cd2b08c5b" title="&amp;quot;Direct&amp;quot; component">c</a> = cL;
<a name="l00208"></a>00208           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#a5952693003844d6947c9ea711550985" title="1/component delta">dIcdx</a> = (IcR - IcL) * fact;
<a name="l00209"></a>00209           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#5db78dbd396f4f989c7b81c87710467c" title="1/component delta, last span">dIcdxLast</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#a5952693003844d6947c9ea711550985" title="1/component delta">dIcdx</a> * lastFact;
<a name="l00210"></a>00210         }
<a name="l00211"></a>00211         <span class="keywordflow">if</span> (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a> == 0)
<a name="l00212"></a>00212         {
<a name="l00213"></a>00213           <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> f = 0; f &lt; maxFloats; f++)
<a name="l00214"></a>00214           {
<a name="l00215"></a>00215             <span class="keyword">const</span> <span class="keywordtype">float</span> cL = L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#50b158edd860bd2b835fae69addbaea0" title="Un-divided buffer value.">c</a>;
<a name="l00216"></a>00216             <span class="keyword">const</span> <span class="keywordtype">float</span> IcL = L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a>;
<a name="l00217"></a>00217             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a> = IcL + <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#5db78dbd396f4f989c7b81c87710467c" title="1/component delta, last span">dIcdxLast</a>;
<a name="l00218"></a>00218             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1ea1b6c7e30fb9a5dec58d6858295d1c" title="&amp;quot;Direct&amp;quot; component delta">dcdx</a> = (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a>*z2 - cL) * <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#01f2746ba09bd68e7e0135490392667e" title="Inverse of last span size.">invLastSpan</a>;
<a name="l00219"></a>00219           }
<a name="l00220"></a>00220         }
<a name="l00221"></a>00221         <span class="keywordflow">else</span>
<a name="l00222"></a>00222         {
<a name="l00223"></a>00223           <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> f = 0; f &lt; maxFloats; f++)
<a name="l00224"></a>00224           {
<a name="l00225"></a>00225             <span class="keyword">const</span> <span class="keywordtype">float</span> IcL = L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#9c97fbb4122446c6264237b350d0df20" title="A single interpolated buffer value.">Floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp_1_1PerFloat.html#15a564ca50a15c7948193f9486441e84" title="Buffer value div Z.">Ic</a>;
<a name="l00226"></a>00226             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a> = IcL + <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#a5952693003844d6947c9ea711550985" title="1/component delta">dIcdx</a>;
<a name="l00227"></a>00227             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1ea1b6c7e30fb9a5dec58d6858295d1c" title="&amp;quot;Direct&amp;quot; component delta">dcdx</a> = (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a>*z2 - <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1757576f4bfeb432fa93da8cd2b08c5b" title="&amp;quot;Direct&amp;quot; component">c</a>) &gt;&gt; <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#5adcc55cea2dc1f6904dc96230142ebc" title="Interpolation shift.">InterpolShift</a>;
<a name="l00228"></a>00228           }
<a name="l00229"></a>00229         }
<a name="l00230"></a>00230       }
<a name="l00232"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#75d3043b42a258540bcd722a60d0b985">00232</a>       <span class="keywordtype">void</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#75d3043b42a258540bcd722a60d0b985" title="Advance a pixel right.">Advance</a> ()
<a name="l00233"></a>00233       {
<a name="l00234"></a>00234         <span class="keywordflow">if</span> (--<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a> &gt; 0)
<a name="l00235"></a>00235         {
<a name="l00236"></a>00236           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0" title="1/z and per-pixel delta">Iz</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fdd54bc0db7b728c7bb559702f53b78b">dIzdx</a>;
<a name="l00237"></a>00237           <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> f = 0; f &lt; maxFloats; f++)
<a name="l00238"></a>00238           {
<a name="l00239"></a>00239             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1757576f4bfeb432fa93da8cd2b08c5b" title="&amp;quot;Direct&amp;quot; component">c</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1ea1b6c7e30fb9a5dec58d6858295d1c" title="&amp;quot;Direct&amp;quot; component delta">dcdx</a>;
<a name="l00240"></a>00240           }
<a name="l00241"></a>00241         }
<a name="l00242"></a>00242         <span class="keywordflow">else</span>
<a name="l00243"></a>00243         {
<a name="l00244"></a>00244           <span class="keywordflow">if</span> (--<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a> == 0)
<a name="l00245"></a>00245           {
<a name="l00246"></a>00246             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fa32c2ef7f7cccfc540f731d518d9863">dIzdx_fLast</a>;
<a name="l00247"></a>00247           }
<a name="l00248"></a>00248           <span class="comment">/* Note: Iz_f is "ahead" one interpolation span, ie when the</span>
<a name="l00249"></a>00249 <span class="comment">           * deltas are set up for the next, it has the value from the</span>
<a name="l00250"></a>00250 <span class="comment">           * beginning if that span. */</span>
<a name="l00251"></a>00251           <span class="keyword">const</span> <span class="keywordtype">float</span> z = 1.0f / <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a>;
<a name="l00252"></a>00252           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0" title="1/z and per-pixel delta">Iz</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a>;
<a name="l00253"></a>00253           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a>;
<a name="l00254"></a>00254           <span class="keyword">const</span> <span class="keywordtype">float</span> z2 = 1.0f / <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a>;
<a name="l00255"></a>00255           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00256"></a>00256           <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> f = 0; f &lt; maxFloats; f++)
<a name="l00257"></a>00257           {
<a name="l00258"></a>00258             <span class="keyword">const</span> <span class="keywordtype">float</span> c = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a> * z;
<a name="l00259"></a>00259             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1757576f4bfeb432fa93da8cd2b08c5b" title="&amp;quot;Direct&amp;quot; component">c</a> = c;
<a name="l00260"></a>00260             <span class="keywordflow">if</span> (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a> == 0)
<a name="l00261"></a>00261             {
<a name="l00262"></a>00262               <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#5db78dbd396f4f989c7b81c87710467c" title="1/component delta, last span">dIcdxLast</a>;
<a name="l00263"></a>00263               <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1ea1b6c7e30fb9a5dec58d6858295d1c" title="&amp;quot;Direct&amp;quot; component delta">dcdx</a> = (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a>*z2 - c) * <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#01f2746ba09bd68e7e0135490392667e" title="Inverse of last span size.">invLastSpan</a>;
<a name="l00264"></a>00264             }
<a name="l00265"></a>00265             <span class="keywordflow">else</span>
<a name="l00266"></a>00266             {
<a name="l00267"></a>00267               <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#a5952693003844d6947c9ea711550985" title="1/component delta">dIcdx</a>;
<a name="l00268"></a>00268               <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1ea1b6c7e30fb9a5dec58d6858295d1c" title="&amp;quot;Direct&amp;quot; component delta">dcdx</a> = (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#fc6e9bf57fd4c8630705a1cc25f1c74a" title="Buffer values div Z.">floats_f</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineCompDivZ.html#8708fffb374cc8c6b41a396fb5296ab6" title="1/component">Ic</a>*z2 - <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[f].<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html#1757576f4bfeb432fa93da8cd2b08c5b" title="&amp;quot;Direct&amp;quot; component">c</a>) &gt;&gt; <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#5adcc55cea2dc1f6904dc96230142ebc" title="Interpolation shift.">InterpolShift</a>;
<a name="l00269"></a>00269             }
<a name="l00270"></a>00270           }
<a name="l00271"></a>00271         }
<a name="l00272"></a>00272       }
<a name="l00273"></a>00273       
<a name="l00275"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#def4c59558ade40d7c308163b66fd148">00275</a>       <span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html" title="Undivided buffer values.">ScanlineComp</a>* <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#def4c59558ade40d7c308163b66fd148" title="Return an interpolated component.">GetFloat</a> (<span class="keywordtype">size_t</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> &amp;<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#92df22c3f5683d4131ad86a2468eae01" title="Buffer values.">floats</a>[i]; }
<a name="l00276"></a>00276     };
<a name="l00277"></a>00277 
<a name="l00278"></a>00278     <span class="keyword">template</span>&lt;&gt;
<a name="l00279"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html">00279</a>     <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html" title="Interpolator over a scanline.">InterpolateScanlinePersp</a>&lt;0&gt; : <span class="keyword">public</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html" title="Interpolator over a scanline, common code.">InterpolateScanlinePerspCommon</a>
<a name="l00280"></a>00280     {
<a name="l00282"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html#5599ca04e1cb2004b327341632f5330e">00282</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00284"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html#c4801ed908928ae0f0986cf9a0b6ce09">00284</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#5adcc55cea2dc1f6904dc96230142ebc" title="Interpolation shift.">InterpolShift</a>;
<a name="l00286"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html#ca4641af062c452d60ca6fc66f841b64">00286</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a>;
<a name="l00288"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html#561e3eac4974a1fbbfdbf0e4311a4225">00288</a>       <span class="keywordtype">int</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a>;
<a name="l00289"></a>00289   
<a name="l00291"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html#55973ce06f315a1d66cd9a7699be59ea">00291</a>       <span class="keywordtype">void</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#eb0bbf570b7bf0ae184f805e3e06fb08" title="Setup interpolation over a scanline, given left and right edge.">Setup</a> (<span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html" title="Interpolator for a polygon edge.">InterpolateEdgePersp</a>&amp; L, <span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html" title="Interpolator for a polygon edge.">InterpolateEdgePersp</a>&amp; R,
<a name="l00292"></a>00292         <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> len, <span class="keywordtype">int</span> ipolStep, <span class="keywordtype">int</span> ipolShift)
<a name="l00293"></a>00293       {
<a name="l00294"></a>00294         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a> = ipolStep;
<a name="l00295"></a>00295         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#5adcc55cea2dc1f6904dc96230142ebc" title="Interpolation shift.">InterpolShift</a> = ipolShift;
<a name="l00296"></a>00296         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a> = len / ipolStep;
<a name="l00297"></a>00297   
<a name="l00298"></a>00298         <span class="keyword">const</span> <span class="keywordtype">float</span> inv_l = 1.0f/len;
<a name="l00299"></a>00299         <span class="keyword">const</span> <span class="keywordtype">float</span> ipf = (float)<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00300"></a>00300         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00301"></a>00301         <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> lastSpanSize = len % ipolStep;
<a name="l00302"></a>00302         <span class="keywordflow">if</span> (lastSpanSize == 0) lastSpanSize = ipolStep;
<a name="l00303"></a>00303         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0" title="1/z and per-pixel delta">Iz</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a> = L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a>;
<a name="l00304"></a>00304         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fdd54bc0db7b728c7bb559702f53b78b">dIzdx</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> = (R.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a> - L.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateEdgePersp.html#7e18709523456ee4687a41f702925cb9" title="The inverse Z coordinate.">Iz</a>) * inv_l;
<a name="l00305"></a>00305         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fa32c2ef7f7cccfc540f731d518d9863">dIzdx_fLast</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> * float (lastSpanSize);
<a name="l00306"></a>00306         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> *= ipf;
<a name="l00307"></a>00307         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a>;
<a name="l00308"></a>00308       }
<a name="l00310"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html#14a3bdc8c8dcd752fa3b0934346b144d">00310</a>       <span class="keywordtype">void</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#75d3043b42a258540bcd722a60d0b985" title="Advance a pixel right.">Advance</a> ()
<a name="l00311"></a>00311       {
<a name="l00312"></a>00312         <span class="keywordflow">if</span> (--<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a> &gt; 0)
<a name="l00313"></a>00313         {
<a name="l00314"></a>00314           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0" title="1/z and per-pixel delta">Iz</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fdd54bc0db7b728c7bb559702f53b78b">dIzdx</a>;
<a name="l00315"></a>00315         }
<a name="l00316"></a>00316         <span class="keywordflow">else</span>
<a name="l00317"></a>00317         {
<a name="l00318"></a>00318           <span class="keywordflow">if</span> (--<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#4b7393603e03f93453689fbf283d2bc8" title="Remaining spans.">spans</a> == 0)
<a name="l00319"></a>00319           {
<a name="l00320"></a>00320             <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#fa32c2ef7f7cccfc540f731d518d9863">dIzdx_fLast</a>;
<a name="l00321"></a>00321           }
<a name="l00322"></a>00322           <span class="comment">/* Note: Iz_f is "ahead" one interpolation span, ie when the</span>
<a name="l00323"></a>00323 <span class="comment">           * deltas are set up for the next, it has the value from the</span>
<a name="l00324"></a>00324 <span class="comment">           * beginning if that span. */</span>
<a name="l00325"></a>00325           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#593711e616e5bfb05c8d833826957aa0" title="1/z and per-pixel delta">Iz</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a>;
<a name="l00326"></a>00326           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#c39e0667fc9718c64e55ff17b7142d2c" title="1/f - float for better accuracy, delta is for 1 interpolation span">Iz_f</a> += <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePerspCommon.html#91eecad692d82c2cedea66c1fe6f38c6">dIzdx_f</a>;
<a name="l00327"></a>00327           <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#cacc134a27af1f2d2bdacffe805f750d" title="Remaining pixels for this interpolation span.">ipx</a> = <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#ef36e9a2fafad9d1f3f48ee684471888" title="Interpolation step.">InterpolStep</a>;
<a name="l00328"></a>00328         }
<a name="l00329"></a>00329       }
<a name="l00330"></a>00330       
<a name="l00334"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp_3_010_01_4.html#4caaa351a92174d37943bb4d70422284">00334</a>       <span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1ScanlineComp.html" title="Undivided buffer values.">ScanlineComp</a>* <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1InterpolateScanlinePersp.html#def4c59558ade40d7c308163b66fd148" title="Return an interpolated component.">GetFloat</a> (<span class="keywordtype">size_t</span> <span class="comment">/*i*/</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
<a name="l00335"></a>00335     };
<a name="l00336"></a>00336     
<a name="l00337"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">00337</a>     <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a>
<a name="l00338"></a>00338     {
<a name="l00339"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html">00339</a>       <span class="keyword">struct </span><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html">tag_c</a>
<a name="l00340"></a>00340       {
<a name="l00341"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#3d4f6ef97bc34af49cc8a13d72075e79">00341</a>         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#3d4f6ef97bc34af49cc8a13d72075e79">r</a>;
<a name="l00342"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#fad8fad4d0875e3e680527952e1bfd21">00342</a>         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#fad8fad4d0875e3e680527952e1bfd21">g</a>;
<a name="l00343"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#5be2d400d2e9373469cc15357a1a102f">00343</a>         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#5be2d400d2e9373469cc15357a1a102f">b</a>;
<a name="l00344"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#f9b596c1839a7a6398aa4440251e7c66">00344</a>         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#f9b596c1839a7a6398aa4440251e7c66">a</a>;
<a name="l00345"></a>00345       };
<a name="l00346"></a>00346       <span class="keyword">union</span>
<a name="l00347"></a>00347       {
<a name="l00348"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">00348</a>         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html">tag_c</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>;
<a name="l00349"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">00349</a>         <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a>;
<a name="l00350"></a>00350       };
<a name="l00351"></a>00351       
<a name="l00352"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">00352</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">Pixel</a> () {}
<a name="l00353"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#d7440289791732c53eb0e825efe1e0cb">00353</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">Pixel</a> (<a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> r, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> g, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> b, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> a)
<a name="l00354"></a>00354       {
<a name="l00355"></a>00355         <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#3d4f6ef97bc34af49cc8a13d72075e79">r</a> = r; <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#fad8fad4d0875e3e680527952e1bfd21">g</a> = g; <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#5be2d400d2e9373469cc15357a1a102f">b</a> = b; <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#f9b596c1839a7a6398aa4440251e7c66">a</a> = a;
<a name="l00356"></a>00356       }
<a name="l00357"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#3b2dde384d170a617052524dab5dbeba">00357</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">Pixel</a> (<a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> ui) : <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a> (ui) { }
<a name="l00358"></a>00358       
<a name="l00359"></a>00359       CS_FORCEINLINE
<a name="l00360"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#20620288752e49b5125dc04b4d6ac761">00360</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#20620288752e49b5125dc04b4d6ac761">operator+ </a>(<span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> other)
<a name="l00361"></a>00361       {
<a name="l00362"></a>00362         <span class="comment">// Poor man's SIMD... add two components at once.</span>
<a name="l00363"></a>00363         <span class="keyword">const</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> rb1 = (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a> &amp; 0xff00ff00) &gt;&gt; 8;
<a name="l00364"></a>00364         <span class="keyword">const</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> ga1 = (<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a> &amp; 0x00ff00ff);
<a name="l00365"></a>00365         <span class="keyword">const</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> rb2 = (other.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a> &amp; 0xff00ff00) &gt;&gt; 8;
<a name="l00366"></a>00366         <span class="keyword">const</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> ga2 = (other.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a> &amp; 0x00ff00ff);
<a name="l00367"></a>00367         <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> rb = rb1 + rb2;
<a name="l00368"></a>00368         <span class="comment">// Clamp</span>
<a name="l00369"></a>00369         <span class="keywordflow">if</span> (rb &amp; 0xff000000) { rb &amp;= 0x0000ffff; rb |= 0x00ff0000; }
<a name="l00370"></a>00370         <span class="keywordflow">if</span> (rb &amp; 0x0000ff00) { rb &amp;= 0xffff0000; rb |= 0x000000ff; }
<a name="l00371"></a>00371         <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> ga = ga1 + ga2;
<a name="l00372"></a>00372         <span class="keywordflow">if</span> (ga &amp; 0xff000000) { ga &amp;= 0x0000ffff; ga |= 0x00ff0000; }
<a name="l00373"></a>00373         <span class="keywordflow">if</span> (ga &amp; 0x0000ff00) { ga &amp;= 0xffff0000; ga |= 0x000000ff; }
<a name="l00374"></a>00374         <span class="keywordflow">return</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">Pixel</a> ((rb &lt;&lt; 8) | ga);
<a name="l00375"></a>00375       }
<a name="l00376"></a>00376       CS_FORCEINLINE
<a name="l00377"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#f2564d23c9e87dd7849fcb6e29335879">00377</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a>&amp; <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#f2564d23c9e87dd7849fcb6e29335879">operator += </a>(<span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> other)
<a name="l00378"></a>00378       {
<a name="l00379"></a>00379         <span class="keywordflow">return</span> (*<span class="keyword">this</span> = *<span class="keyword">this</span> + other);
<a name="l00380"></a>00380       }
<a name="l00381"></a>00381       CS_FORCEINLINE
<a name="l00382"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#c79035989bf8ee3cc213d04d201cfaf1">00382</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#c79035989bf8ee3cc213d04d201cfaf1">operator~ </a>()<span class="keyword"> const</span>
<a name="l00383"></a>00383 <span class="keyword">      </span>{
<a name="l00384"></a>00384         <span class="keywordflow">return</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">Pixel</a> (~<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a>);
<a name="l00385"></a>00385       }
<a name="l00386"></a>00386       CS_FORCEINLINE
<a name="l00387"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#528a5997b99f065a999ab71fa695062b">00387</a>       <span class="keyword">friend</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#528a5997b99f065a999ab71fa695062b">operator* </a>(<span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> p1, <span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> p2)
<a name="l00388"></a>00388       {
<a name="l00389"></a>00389         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> nr = (p1.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#3d4f6ef97bc34af49cc8a13d72075e79">r</a>*(p2.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#3d4f6ef97bc34af49cc8a13d72075e79">r</a>+1)) &gt;&gt; 8;
<a name="l00390"></a>00390         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> ng = (p1.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#fad8fad4d0875e3e680527952e1bfd21">g</a>*(p2.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#fad8fad4d0875e3e680527952e1bfd21">g</a>+1)) &gt;&gt; 8;
<a name="l00391"></a>00391         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> nb = (p1.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#5be2d400d2e9373469cc15357a1a102f">b</a>*(p2.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#5be2d400d2e9373469cc15357a1a102f">b</a>+1)) &gt;&gt; 8;
<a name="l00392"></a>00392         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> na = (p1.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#f9b596c1839a7a6398aa4440251e7c66">a</a>*(p2.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#790371c9dbf28313fa1d3e1eab7f45e4">c</a>.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel_1_1tag__c.html#f9b596c1839a7a6398aa4440251e7c66">a</a>+1)) &gt;&gt; 8;
<a name="l00393"></a>00393         <span class="keywordflow">return</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">Pixel</a> (nr, ng, nb, na);
<a name="l00394"></a>00394       }
<a name="l00395"></a>00395       CS_FORCEINLINE
<a name="l00396"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#185e4bec29dc840821fba93657f0b7a9">00396</a>       <span class="keyword">friend</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#528a5997b99f065a999ab71fa695062b">operator* </a>(<span class="keyword">const</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a> p, <span class="keyword">const</span> <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> x)
<a name="l00397"></a>00397       {
<a name="l00398"></a>00398         <span class="comment">// Poor man's SIMD...</span>
<a name="l00399"></a>00399         <span class="keyword">const</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> v = x+1;
<a name="l00400"></a>00400         <span class="keyword">const</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> rb = (p.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a> &amp; 0xff00ff00) &gt;&gt; 8;
<a name="l00401"></a>00401         <span class="keyword">const</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> ga = (p.<a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#59da6efbfe2415c2ae1c32e54992a0f4">ui32</a> &amp; 0x00ff00ff);
<a name="l00402"></a>00402         <span class="keywordflow">return</span> <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#92f7e6f19830a1bee62b2e983cdec2f6">Pixel</a> (((rb*v) &amp; 0xff00ff00) | (((ga*v) &gt;&gt; 8) &amp; 0x00ff00ff));
<a name="l00403"></a>00403       }
<a name="l00404"></a>00404       CS_FORCEINLINE
<a name="l00405"></a><a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#5ab65470349e4b92565637eb9f303203">00405</a>       <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html">Pixel</a>&amp; <a class="code" href="structCS_1_1PluginCommon_1_1SoftShader_1_1Pixel.html#5ab65470349e4b92565637eb9f303203">operator *= </a>(<span class="keyword">const</span> <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> x)
<a name="l00406"></a>00406       {
<a name="l00407"></a>00407         <span class="keywordflow">return</span> (*<span class="keyword">this</span> = *<span class="keyword">this</span> * x);
<a name="l00408"></a>00408       }
<a name="l00409"></a>00409     };
<a name="l00410"></a>00410   } <span class="comment">// namespace SoftShader</span>
<a name="l00411"></a>00411 } <span class="comment">// namespace PluginCommon</span>
<a name="l00412"></a>00412 } <span class="comment">// namespace CS</span>
<a name="l00413"></a>00413 
<a name="l00418"></a><a class="code" href="group__plugincommon.html#gea881519dfb83d6df09f77d8d7cf8ed6">00418</a> <span class="preprocessor">#define CS_SOFT3D_VA_BUFINDEX(x)                                        \</span>
<a name="l00419"></a>00419 <span class="preprocessor">  (CS_VATTRIB_ ## x - (CS_VATTRIB_ ## x &gt;=  CS_VATTRIB_GENERIC_FIRST ?  \</span>
<a name="l00420"></a>00420 <span class="preprocessor">  CS_VATTRIB_GENERIC_FIRST : CS_VATTRIB_SPECIFIC_FIRST))</span>
<a name="l00421"></a>00421 <span class="preprocessor"></span>
<a name="l00425"></a><a class="code" href="group__plugincommon.html#ge1a5f36df6a6e5a678ff1f73c28891a3">00425</a> <span class="preprocessor">#define CS_SOFT3D_BUFFERFLAG(x)                 (1 &lt;&lt; CS_SOFT3D_VA_BUFINDEX(x))</span>
<a name="l00426"></a>00426 <span class="preprocessor"></span>
<a name="l00429"></a>00429 <span class="preprocessor">#endif // __CS_CSPLUGINCOMMON_SOFTSHADER_TYPES_H__</span>
</pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>