<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pixel Bender Blog</title>
	<atom:link href="http://blogs.adobe.com/pixel-bender/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.adobe.com/pixel-bender</link>
	<description>Adobe Pixel Bender technology delivers a common image and video processing infrastructure which provides automatic runtime optimization on heterogeneous hardware. You can use the Pixel Bender language to implement image processing algorithms (filters or effects) in a hardware-independent manner, operating on either 2D or 3D objects.</description>
	<lastBuildDate>Thu, 22 Sep 2011 23:38:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Preview 3 and the future of PB3D</title>
		<link>http://blogs.adobe.com/pixel-bender/2011/09/22/preview-3-and-the-future-of-pb3d/</link>
		<comments>http://blogs.adobe.com/pixel-bender/2011/09/22/preview-3-and-the-future-of-pb3d/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 23:38:45 +0000</pubDate>
		<dc:creator>pixel-bender</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AIF]]></category>
		<category><![CDATA[PixelBender3D]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pixel-bender/?p=26</guid>
		<description><![CDATA[We have just released preview 3 of Pixel Bender 3D (PB3D) http://labs.adobe.com/technologies/pixelbender3d. This is the best preview to date in terms of reliability and stability. Please look at the release notes (http://labs.adobe.com/technologies/pixelbender3d/releasenotes.html) for the details. PB3D remains an experiment, where &#8230; <a href="http://blogs.adobe.com/pixel-bender/2011/09/22/preview-3-and-the-future-of-pb3d/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We have just released preview 3 of Pixel Bender 3D (PB3D) <a href="http://labs.adobe.com/technologies/pixelbender3d" title="http://labs.adobe.com/technologies/pixelbender3d">http://labs.adobe.com/technologies/pixelbender3d</a>. This is the best preview to date in terms of reliability and stability. Please look at the release notes (<a href="http://labs.adobe.com/technologies/pixelbender3d/releasenotes.html" title="http://labs.adobe.com/technologies/pixelbender3d/releasenotes.html">http://labs.adobe.com/technologies/pixelbender3d/releasenotes.html</a>) for the details.</p>
<p>PB3D remains an experiment, where we are exploring the utility of the language for high-level authoring of Stage 3D shaders. Workflows remain command-line based, and it is still easy to write programs that exceed the limitations of Stage 3D. To spend the resources to address the workflow issue would require a significant investment from Adobe, and to justify that we would need extraordinary uptake from the developer community. Please regard the current state of the system as an opportunity to evaluate whether the language is a useful design for your needs, and let us know if you would adopt it for main-line use given a more convenient workflow or language changes, or if it is useful in its current form. Unless PB3D gains significant momentum in the next few months, this is likely to be the last release.</p>
<p>Please note that this announcement only concerns Pixel Bender 3D. Pixel Bender 2D and Flash Player Stage 3D remain unchanged.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pixel-bender/2011/09/22/preview-3-and-the-future-of-pb3d/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Prerelease 2 is now out</title>
		<link>http://blogs.adobe.com/pixel-bender/2011/04/27/prerelease-2-is-now-out/</link>
		<comments>http://blogs.adobe.com/pixel-bender/2011/04/27/prerelease-2-is-now-out/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 16:56:56 +0000</pubDate>
		<dc:creator>pixel-bender</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AIF]]></category>
		<category><![CDATA[PixelBender3D]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pixel-bender/?p=20</guid>
		<description><![CDATA[Prerelease 2 of the PixelBender3D API is now available on the Adobe labs site here: http://labs.adobe.com/technologies/pixelbender3d/ There are a bunch of bug fixes, and some improvements to the public API to make it easier to set up input values. Check &#8230; <a href="http://blogs.adobe.com/pixel-bender/2011/04/27/prerelease-2-is-now-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Prerelease 2 of the PixelBender3D API is now available on the Adobe labs site here:</p>
<p><a href="http://labs.adobe.com/technologies/pixelbender3d/">http://labs.adobe.com/technologies/pixelbender3d/</a></p>
<p>There are a bunch of bug fixes, and some improvements to the public API to make it easier to set up input values. Check out the full release notes included with the prerelease.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pixel-bender/2011/04/27/prerelease-2-is-now-out/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Displaying numbers in a kernel</title>
		<link>http://blogs.adobe.com/pixel-bender/2011/04/16/displaying-numbers-in-a-kernel/</link>
		<comments>http://blogs.adobe.com/pixel-bender/2011/04/16/displaying-numbers-in-a-kernel/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 01:26:11 +0000</pubDate>
		<dc:creator>pixel-bender</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AIF]]></category>
		<category><![CDATA[PixelBender]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pixel-bender/?p=16</guid>
		<description><![CDATA[One of the problems with Pixel Bender is that it&#8217;s always been difficult to debug. This kernel helps out a little &#8211; it provides a way to display integers and floats on screen. The value you&#8217;re trying to display must &#8230; <a href="http://blogs.adobe.com/pixel-bender/2011/04/16/displaying-numbers-in-a-kernel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>
One of the problems with Pixel Bender is that it&#8217;s always been difficult to debug. This kernel helps out a little &#8211; it provides a way to display integers and floats on screen.
</p>
<p>
The value you&#8217;re trying to display must be the same for each invocation of the kernel &#8211; that means that it can&#8217;t depend on outCoord in any way. If you&#8217;re trying to debug something that only happens at a particular position you&#8217;ll need to hard code that position in for testing.
</p>
<p>
There are two functions &#8211; one for displaying integers and one for displaying floats:
</p>
<p><code>
<pre>
bool
displayInt( int n, int2 topLeft, int scale, int width, bool displayleadingZeros );

bool
displayFloat( float f, int2 topLeft, int scale, int width, int precision, bool displayleadingZeros );
</pre>
<p></code></p>
<p>
Each of them returns a bool &#8211; if the return value is true the pixel is part of the number to be displayed and should be highlighted in some manner.
</p>
<p>
The kernel here exposes most of the options as parameters just to make it easy to play around with them &#8211; in practice just set them to reasonable constant values.
</p>
<p><code>
<pre>
&lt;languageVersion : 1.0;&gt;
kernel NumberDisplay
&lt;   
    namespace : "AIF Test";
    vendor : "Adobe";
    version : 1;
    description : "Display numbers";
&gt;
{
    input image4 src;
    output pixel4 dst;

    parameter int intValue
    &lt;
        minValue : -150;
        maxValue : 50;
        defaultValue: 10;
    &gt;;

    parameter float floatValue
    &lt;
        minValue : -15.0;
        maxValue : 15.0;
        defaultValue: 0.0;
    &gt;;

    parameter bool displayleadingZerosParam
    &lt;
        defaultValue: false;
    &gt;;
        
    parameter int intScale
    &lt;
        minValue : 3;
        maxValue : 10;
        defaultValue: 5;
    &gt;;
    
    parameter int nDigitsParam
    &lt;
        minValue : 5;
        maxValue : 10;
        defaultValue: 5;
    &gt;;
    
    parameter int floatWidth
    &lt;
        minValue : 10;
        maxValue : 20;
        defaultValue: 10;
    &gt;;
    
    parameter int floatPrecision
    &lt;
        minValue : 2;
        maxValue : 7;
        defaultValue: 2;
    &gt;;
    
    parameter int floatScale
    &lt;
        minValue : 3;
        maxValue : 10;
        defaultValue: 5;
    &gt;;
    
    
    const int digitXSpacing = 4;

    bool
    hitPosition( float4x4 m, int2 p )
    {
        return m[ p[ 1 ] ][ p[ 0 ] ] &gt; 0.5;
    }

    bool displayNegativeSign( int digit, int2 gridPosition )
    {
        bool result = false;

        if( gridPosition.x &gt;= 0 &#038;&#038; gridPosition.x &lt; 3 &#038;&#038; gridPosition.y &gt;= 0 &#038;&#038; gridPosition.y &lt; 5 )
        {
                int offset1D = gridPosition.y * 3 + gridPosition.x;
                
                int2 matrixPosition = int2( int( mod( float( offset1D ), 4.0 ) ), offset1D / 4 );

                result = hitPosition( float4x4( 0, 0, 0,  0, 0, 0,  1, 1, 1,  0, 0, 0,  0, 0, 0,  0 ), matrixPosition );
        }

        return result;
    }
    
    bool displayDecimalPoint( int2 gridPosition )
    {
        bool result = false;

        if( gridPosition.x &gt;= 0 &#038;&#038; gridPosition.x &lt; 3 &#038;&#038; gridPosition.y &gt;= 0 &#038;&#038; gridPosition.y &lt; 5 )
        {
                int offset1D = gridPosition.y * 3 + gridPosition.x;
                
                int2 matrixPosition = int2( int( mod( float( offset1D ), 4.0 ) ), offset1D / 4 );

                result = hitPosition( float4x4( 0, 0, 0,  0, 0, 0,  0, 0, 0,  0, 0, 0,  0, 1, 0,  0 ), matrixPosition );
        }

        return result;
    }
    
    bool displayInt( int n, int digit, int2 gridPosition, int width, bool displayleadingZeros )
    {
        bool result = false;

        for( int i = 0; i &lt; width - ( digit + 1 ); ++i )
        {
            n /= 10;
        }

        if( n != 0 || digit == width - 1 || displayleadingZeros )
        {
            n = int( mod( float( n ), 10.0 ) );

            int offset1D = gridPosition.y * 3 + gridPosition.x;
            
            int2 matrixPosition = int2( int( mod( float( offset1D ), 4.0 ) ), offset1D / 4 );

            if( n == 0 ) result = hitPosition( float4x4( 1, 1, 1,  1, 0, 1,  1, 0, 1,  1, 0, 1,  1, 1, 1, 0 ), matrixPosition );
            if( n == 1 ) result = hitPosition( float4x4( 0, 0, 1,  0, 0, 1,  0, 0, 1,  0, 0, 1,  0, 0, 1, 0 ), matrixPosition );
            if( n == 2 ) result = hitPosition( float4x4( 1, 1, 1,  0, 0, 1,  1, 1, 1,  1, 0, 0,  1, 1, 1, 0 ), matrixPosition );
            if( n == 3 ) result = hitPosition( float4x4( 1, 1, 1,  0, 0, 1,  1, 1, 1,  0, 0, 1,  1, 1, 1, 0 ), matrixPosition );
            if( n == 4 ) result = hitPosition( float4x4( 1, 0, 1,  1, 0, 1,  1, 1, 1,  0, 0, 1,  0, 0, 1, 0 ), matrixPosition );
            if( n == 5 ) result = hitPosition( float4x4( 1, 1, 1,  1, 0, 0,  1, 1, 1,  0, 0, 1,  1, 1, 1, 0 ), matrixPosition );
            if( n == 6 ) result = hitPosition( float4x4( 1, 1, 1,  1, 0, 0,  1, 1, 1,  1, 0, 1,  1, 1, 1, 0 ), matrixPosition );
            if( n == 7 ) result = hitPosition( float4x4( 1, 1, 1,  0, 0, 1,  0, 0, 1,  0, 0, 1,  0, 0, 1, 0 ), matrixPosition );
            if( n == 8 ) result = hitPosition( float4x4( 1, 1, 1,  1, 0, 1,  1, 1, 1,  1, 0, 1,  1, 1, 1, 0 ), matrixPosition );
            if( n == 9 ) result = hitPosition( float4x4( 1, 1, 1,  1, 0, 1,  1, 1, 1,  0, 0, 1,  1, 1, 1, 0 ), matrixPosition );
        }            

        return result;
    }

    int getNDigits( int n )
    {
        return int( ceil( log2( float( n + 1 ) ) / log2( 10.0 ) ) );
    }

    void
    getGridInformation( int2 topLeft, int scale, out int digit, out int2 gridPosition )
    {
            float2 offsetFromTopLeftFloat = floor( outCoord() - float2( topLeft ) );
            int2 offsetFromTopLeftInt = int2( offsetFromTopLeftFloat );
            int2 gridOffsetFromTopLeftInt = int2( floor( float2( offsetFromTopLeftInt ) / float2( scale ) ) );

            digit = gridOffsetFromTopLeftInt.x / digitXSpacing;
            gridPosition = int2( gridOffsetFromTopLeftInt.x - digit * digitXSpacing, gridOffsetFromTopLeftInt.y );
    }

    // Returns true iff this is a position that might lead to a number being displayed
    bool 
    positionNeedsChecking( int digit, int2 gridPosition, int width )
    {
        return 
            gridPosition.x &gt;= 0 &#038;&#038; 
            gridPosition.x &lt; 3 &#038;&#038; 
            gridPosition.y &gt;= 0 &#038;&#038; gridPosition.y &lt; 5 
            &#038;&#038; digit &gt;= 0 &#038;&#038; digit &lt; width;
    }

    bool
    displayInt( int n, int digit, int2 gridPosition, int scale, int width, bool displayleadingZeros )
    {
        bool result = false;
        
        bool negative = n &lt; 0;
        n = n &lt; 0 ? -n : n;

        int negativeDigitPosition = displayleadingZeros ? 0 : width - getNDigits( n ) - 1;

        if( negative &#038;&#038; digit == negativeDigitPosition )
        {
            result = displayNegativeSign( digit, gridPosition );
        }
        else
        {
            result = displayInt( n, digit, gridPosition, width, displayleadingZeros );
        }

        return result;
    }
    
    bool
    displayInt( int n, int2 topLeft, int scale, int width, bool displayleadingZeros )
    {
        bool result = false;

        int digit;
        int2 gridPosition;

        getGridInformation( topLeft, scale, digit, gridPosition );

        if( positionNeedsChecking( digit, gridPosition, width ) )
        {
            result = displayInt( n, digit, gridPosition, scale, width, displayleadingZeros );
        }

        return result;
    }

    bool
    displayFloat( float f, int2 topLeft, int scale, int width, int precision, bool displayleadingZeros )
    {
        bool result = false;

        int i = int( f &gt; 0.0 ? floor( f ) : ceil( f ) );
        float fra = f &gt; 0.0 ? ( f - float( i ) ) : ( -f + float( i ) );

        int digit;
        int2 gridPosition;

        getGridInformation( topLeft, scale, digit, gridPosition );

        if( positionNeedsChecking( digit, gridPosition, width ) )
        {
            int intWidth = width - precision - 1;

            // Display the integer value
            if( positionNeedsChecking( digit, gridPosition, intWidth ) )
                result = displayInt( i, digit, gridPosition, scale, intWidth, displayleadingZeros );

            // Display the fractional value
            if( positionNeedsChecking( digit - intWidth - 1, gridPosition, precision ) )
                result = result || 
                   displayInt( int( fra * pow( 10.0, float( precision ) ) ) , digit - intWidth - 1, gridPosition, scale, precision, true );

            // Display the decinal point
            if( digit == intWidth )
            {
                result = result || displayDecimalPoint( gridPosition );
            }
        }
        
        return result;
    }

    void
    evaluatePixel()
    {
        dst = sampleNearest( src, outCoord() );

        if( displayInt( intValue, int2( 10, 10 ), intScale, 12, displayleadingZerosParam ) )
        {
            dst = float4( 1.0, 0.0, 0.0, 1.0 );
        }

        if( displayFloat( floatValue, int2( 10, 50 ), floatScale, floatWidth, floatPrecision, displayleadingZerosParam ) )
        {
            dst = float4( 0.0, 0.0, 1.0, 1.0 );
        }
    }
}
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pixel-bender/2011/04/16/displaying-numbers-in-a-kernel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The AIF team is looking for a new engineering manager</title>
		<link>http://blogs.adobe.com/pixel-bender/2011/03/23/the-aif-team-is-looking-for-a-new-engineering-manager/</link>
		<comments>http://blogs.adobe.com/pixel-bender/2011/03/23/the-aif-team-is-looking-for-a-new-engineering-manager/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 23:31:11 +0000</pubDate>
		<dc:creator>pixel-bender</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AIF]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[PixelBender]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pixel-bender/?p=12</guid>
		<description><![CDATA[The job posting for our new engineering manager is up on the Adobe job site. The AIF team develops the Pixel Bender language and all of the behind the scenes magic that makes it run so fast. Check it out &#8230; <a href="http://blogs.adobe.com/pixel-bender/2011/03/23/the-aif-team-is-looking-for-a-new-engineering-manager/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The job posting for our new engineering manager is up on the Adobe job site. The AIF team develops the Pixel Bender language and all of the behind the scenes magic that makes it run so fast. Check it out here:</p>
<p><a href="https://adobe.taleo.net/careersection/2/jobdetail.ftl?lang=en&amp;job=08505">https://adobe.taleo.net/careersection/2/jobdetail.ftl?lang=en&amp;job=08505</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pixel-bender/2011/03/23/the-aif-team-is-looking-for-a-new-engineering-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pixel bender 3D public beta now available</title>
		<link>http://blogs.adobe.com/pixel-bender/2011/03/03/pixel-bender-3d-public-beta-now-available/</link>
		<comments>http://blogs.adobe.com/pixel-bender/2011/03/03/pixel-bender-3d-public-beta-now-available/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 06:01:11 +0000</pubDate>
		<dc:creator>pixel-bender</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PixelBender]]></category>
		<category><![CDATA[PixelBender3D]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pixel-bender/?p=8</guid>
		<description><![CDATA[We&#8217;re delighted to announce we&#8217;ve just released the first public beta for Pixel Bender 3D. The Pixel Bender 3D technology works in conjunction with the new Molehill Flash API to make it easy to write shaders for your 3D models. &#8230; <a href="http://blogs.adobe.com/pixel-bender/2011/03/03/pixel-bender-3d-public-beta-now-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We&#8217;re delighted to announce we&#8217;ve just released the first public beta for Pixel Bender 3D. The Pixel Bender 3D technology works in conjunction with the new Molehill Flash API to make it easy to write shaders for your 3D models. To find out more about PB3D and download the initial release go to <a href="http://www.adobe.com/go/pixelbender3d">http://www.adobe.com/go/pixelbender3d</a>. To find out more about Molehill go to <a href="http://www.adobe.com/go/molehill">www.adobe.com/go/molehill</a>.</p>
<p>Please bear in mind that this is a beta release &#8211; as you&#8217;ll see from the release notes there are plenty of bugs and missing features that we know about, and I am sure there are plenty that we don&#8217;t know about. We&#8217;ve set up a forum <a href="http://forums.adobe.com/community/pixelbender/pb3d">here </a>that we&#8217;ll be monitoring &#8211; let us know what problems you find and what cool things you&#8217;re doing with PB3D.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pixel-bender/2011/03/03/pixel-bender-3d-public-beta-now-available/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Welcome!</title>
		<link>http://blogs.adobe.com/pixel-bender/2011/02/22/hello-world/</link>
		<comments>http://blogs.adobe.com/pixel-bender/2011/02/22/hello-world/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 16:00:56 +0000</pubDate>
		<dc:creator>pixel-bender</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PixelBender]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/pixel-bender/?p=1</guid>
		<description><![CDATA[Welcome to the new Pixel Bender blog. Over the past few years, Kevin Goldsmith has hosted Pixel Bender content on his Adobe blog, but finally Pixel Bender has a blog of its own. Remember that there’s still lots of great Pixel &#8230; <a href="http://blogs.adobe.com/pixel-bender/2011/02/22/hello-world/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Welcome to the new Pixel Bender blog. Over the past few years, Kevin Goldsmith has hosted Pixel Bender content on his Adobe blog, but finally Pixel Bender has a blog of its own.</p>
<p>Remember that there’s still lots of great Pixel Bender content on <a href="http://blogs.adobe.com/kevin-goldsmith/tag/pixel-bender-2">Kevin’s blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/pixel-bender/2011/02/22/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
