title: Image processing: Soft-Light algorithm like Photoshop
body: <p>I'm a developing soft-light algorithm from scratch for Android base on the docs from Adobe:
  <a href="http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_archives/blend_modes.pdf" rel="nofollow">http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_archives/blend_modes.pdf</a>
  http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLight.pbk</p>
  
  <p>Can anyone explain for me the algorithm or at least <code>dst, src, cb, cs</code>, <code>sampleNearest()</code> function and how to calculate them?
  Thanks you!</p>
  
  <pre><code>input image4 dst;
  input image4 src;
  output pixel4 result;
  
  void
  evaluatePixel()
  {
      pixel4 a = sampleNearest(dst,outCoord()); // cb
      pixel4 b = sampleNearest(src,outCoord()); // cs
      ....
  }
  </code></pre>