<?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>Studio Barliesque &#187; 3D</title>
	<atom:link href="http://studio.barliesque.com/blog/tag/3d/feed/" rel="self" type="application/rss+xml" />
	<link>http://studio.barliesque.com/blog</link>
	<description>David Barlia - Flash Developer / Designer / Animator</description>
	<lastBuildDate>Sat, 04 Feb 2012 21:31:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>EasyAGAL &#8211; Macros and Aliases</title>
		<link>http://studio.barliesque.com/blog/2011/09/easyagal-macros-and-aliases/</link>
		<comments>http://studio.barliesque.com/blog/2011/09/easyagal-macros-and-aliases/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 01:49:29 +0000</pubDate>
		<dc:creator>barliesque</dc:creator>
				<category><![CDATA[AGAL]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Molehill]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Alias]]></category>
		<category><![CDATA[EasyAGAL]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Macro]]></category>
		<category><![CDATA[Register]]></category>
		<category><![CDATA[Shaders]]></category>
		<category><![CDATA[Stage3D]]></category>

		<guid isPermaLink="false">http://studio.barliesque.com/blog/?p=171</guid>
		<description><![CDATA[In this article I'll show you how you can create and use a library of macro functions written with EasyAGAL. The more macros we have to work with, the more AGAL can begin to feel like a higher level language...]]></description>
			<content:encoded><![CDATA[<p>In this article I&#8217;ll show you how you can create and use a library of macro functions written with EasyAGAL. The more macros we have to work with, the more AGAL can begin to feel like a higher level language.</p>
<p>In case the term is unfamiliar to you, a macro is similar to a function in that it&#8217;s a bit of code that gets used and re-used repeatedly. The difference is that, where a function exists in one place in memory and is called by multiple points in an application, a macro is literally duplicated wherever it&#8217;s needed at compile-time. Presently, there is no way for AGAL to redirect program execution to call a function, or branch or loop &#8212; AGAL programs are executed in a straight shot, from top to bottom. So, in place of functions we must use macros.</p>
<p>Wherever you use a function from the Easy/EasierAGAL library, instructions are appended to whatever code is being assembled at the time. So you can write a set of handy static functions in their own class, to be called as needed. You can pass EasyAGAL registers as parameters, or any other data that may be useful to customize the macro. And you can organize your macros along with the rest of your ActionScript classes into logical packages so they&#8217;re nice and easy to find when you need them.</p>
<p><br/></p>
<h3>Interface types</h3>
<p>There is one important rule in writing macros with EasyAGAL: you may not use any register that is not passed to your macro as a parameter. This is a good rule to abide by because it means that the user of the macro retains control over how registers are used; it helps to keep your macros as reusable as possible. When you define function parameters, or alias variables, you have four data type options:</p>
<ul>
<li>
<p><code><strong>IRegister</strong></code><br />
Just as it sounds, this type specifies an AGAL register. The whole register, that is, so <code>CONST[0]</code> is an <code>IRegister</code>, but <code>CONST[0].xyz</code> is not. If the user of your macro tries to pass <code>VARYING[1].x</code> where an <code>IRegister</code> was specified, they&#8217;ll get a compile error.</p>
</li>
<li>
<p><code><strong>IComponent</strong></code><br />
Strictly a single component of a register. <code>CONST[0].x</code> is an <code>IComponent</code>, but <code>CONST[0].xyz</code> and <code>CONST[0]</code> are not.</p>
</li>
<li>
<p><code><strong>IField</strong></code><br />
This type specifies any AGAL register (except for texture samplers) &#8212; either the whole register, or a selection of components.</p>
</li>
<li>
<p><code><strong>ISampler</strong></code><br />
 This type specifies a texture <code>SAMPLER</code> register. Trying to pass <code>ATTRIBUTE[3]</code> to an <code>ISampler</code> parameter again results in a compile-time error. No component selections of sampler registers are supported by AGAL.</li>
</ul>
<p>So, for example, we can use ActionScript variables as aliases to AGAL registers, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">position</span><span style="color: #000066; font-weight: bold;">:</span>IRegister = ATTRIBUTE<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> projection<span style="color: #000066; font-weight: bold;">:</span>IRegister = CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
multiply4x4<span style="color: #000000;">&#40;</span>OUTPUT<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">position</span><span style="color: #000066; font-weight: bold;">,</span> projection<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><br/></p>
<h3>A Simple Macro</h3>
<p>Here&#8217;s a really simple macro to set a register or component to zero:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">static <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> setZero<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #009900; font-style: italic;">// Subtract anything from itself and the result is always zero.</span>
	<span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> dest<span style="color: #000066; font-weight: bold;">,</span> dest<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>I used <code>IField</code> for the parameter type because this allows the macro to be applied either to whole registers or individual components. Nothing is returned from the function, since its purpose is to append to the current shader code by calling the EasierAGAL command set. You might wonder, &#8220;Why bother to write a macro when there&#8217;s only one operation inside?&#8221; Simply because it&#8217;s clearer what the purpose of <code>setZero()</code> is compared to the subtraction statement.</p>
<p>Here&#8217;s another macro function to clamp a value to a range:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">static <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">clamp</span><span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> minValue<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> maxValue<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">min</span><span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">,</span> maxValue<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">max</span><span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> dest<span style="color: #000066; font-weight: bold;">,</span> minValue<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>I&#8217;ve placed these two functions in a class called <code>Utils</code>, so I can now use them in any Easy/EasierAGAL shader code, like so&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">Utils<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clamp</span><span style="color: #000000;">&#40;</span>TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
Utils<span style="color: #000066; font-weight: bold;">.</span>zero<span style="color: #000000;">&#40;</span>TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>w<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>As if you didn&#8217;t already know how to call a static function! Anyway, you&#8217;ll find these and more in the package: <code>com.barliesque.shaders.macro</code></p>
<p><br/></p>
<h3>Other Parameter Types</h3>
<p>Obviously, when writing macros you can specify whatever parameter types you want, not just AGAL registers. Have a look at the parameter list of the following function, specifically the comparison parameter.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">static <span style="color: #0033ff; font-weight: bold;">public</span> const EQUAL<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;equal&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
static <span style="color: #0033ff; font-weight: bold;">public</span> const NOT_EQUAL<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;notEqual&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
static <span style="color: #0033ff; font-weight: bold;">public</span> const LESS_THAN<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;less&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
static <span style="color: #0033ff; font-weight: bold;">public</span> const GREATER_THAN<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;greater&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
static <span style="color: #0033ff; font-weight: bold;">public</span> const LESS_OR_EQUAL<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;lessOrEqual&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
static <span style="color: #0033ff; font-weight: bold;">public</span> const GREATER_OR_EQUAL<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;greaterOrEqual&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #3f5fbf;">/**
 * Return one of two results, based on a comparison of two values, componentwise
 * dest = (operandA compared with operandB) ? trueResult : falseResult
 * Contains 5 to 8 instructions.
 * @param       comparison      The type of comparison, e.g. Utils.NOT_EQUAL
 * @param       temp            A temporary register that will be utilized for this operation
 */</span>
static <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> setByComparison<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> comparison<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> 
                                        trueResult<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> falseResult<span style="color: #000066; font-weight: bold;">:</span>IField<span style="color: #000066; font-weight: bold;">,</span> temp<span style="color: #000066; font-weight: bold;">:</span>IRegister<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
        <span style="color: #009900; font-style: italic;">// First make the requested comparison</span>
        <span style="color: #009900; font-style: italic;">// and set the temporary to the inverse</span>
        <span style="color: #0033ff; font-weight: bold;">switch</span> <span style="color: #000000;">&#40;</span>comparison<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
                <span style="color: #0033ff; font-weight: bold;">case</span> LESS_OR_EQUAL<span style="color: #000066; font-weight: bold;">:</span>
                        setIf_GreaterEqual<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        setIf_LessThan<span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
                <span style="color: #0033ff; font-weight: bold;">case</span> GREATER_OR_EQUAL<span style="color: #000066; font-weight: bold;">:</span>
                        setIf_GreaterEqual<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        setIf_LessThan<span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
                <span style="color: #0033ff; font-weight: bold;">case</span> EQUAL<span style="color: #000066; font-weight: bold;">:</span>
                        setIf_Equal<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000066; font-weight: bold;">,</span> temp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #009900; font-style: italic;">//  temp = 1 - dest</span>
                        setIf_GreaterEqual<span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> temp<span style="color: #000066; font-weight: bold;">,</span> dest<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
                <span style="color: #0033ff; font-weight: bold;">case</span> NOT_EQUAL<span style="color: #000066; font-weight: bold;">:</span>
                        setIf_NotEqual<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000066; font-weight: bold;">,</span> temp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #009900; font-style: italic;">//  temp = 1 - dest</span>
                        setIf_GreaterEqual<span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> temp<span style="color: #000066; font-weight: bold;">,</span> dest<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
                <span style="color: #0033ff; font-weight: bold;">case</span> LESS_THAN<span style="color: #000066; font-weight: bold;">:</span>
                        setIf_LessThan<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        setIf_GreaterEqual<span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
                <span style="color: #0033ff; font-weight: bold;">case</span> GREATER_THAN<span style="color: #000066; font-weight: bold;">:</span>
                        setIf_LessThan<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        setIf_GreaterEqual<span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> operandB<span style="color: #000066; font-weight: bold;">,</span> operandA<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                        <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
                <span style="color: #0033ff; font-weight: bold;">default</span><span style="color: #000066; font-weight: bold;">:</span>
                        <span style="color: #0033ff; font-weight: bold;">throw</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Error</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Unrecognized comparison type: &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> comparison<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #009900; font-style: italic;">// Now apply result values to each...</span>
        multiply<span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> dest<span style="color: #000066; font-weight: bold;">,</span> trueResult<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        multiply<span style="color: #000000;">&#40;</span>temp<span style="color: #000066; font-weight: bold;">,</span> temp<span style="color: #000066; font-weight: bold;">,</span> falseResult<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #009900; font-style: italic;">// ...and combine results</span>
        <span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>dest<span style="color: #000066; font-weight: bold;">,</span> dest<span style="color: #000066; font-weight: bold;">,</span> temp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>So, now I can perform a comparison and get a result value in a single line&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #009900; font-style: italic;">//</span>
<span style="color: #009900; font-style: italic;">// OUTPUT = (TEMP[1] &lt;= CONST[0]) ? CONST[2] : CONST[3]</span>
<span style="color: #009900; font-style: italic;">//</span>
Utils<span style="color: #000066; font-weight: bold;">.</span>setByComparison<span style="color: #000000;">&#40;</span>OUTPUT<span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> Utils<span style="color: #000066; font-weight: bold;">.</span>LESS_OR_EQUAL<span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><br/></p>
<h3>Watch Your Operation Count</h3>
<p>Do be careful how you use macros, however. It&#8217;s easy to forget that a single macro might produce dozens of operations.  Remember: There is a limit of 256 operations per shader program! That&#8217;s a pretty tight space to work in, but with multiple shader programs chained together, we can do just about anything. You can keep a tab on your operations count by looking at the following properties in the EasyAGAL base class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Operations in the vertex program: &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> vertexInstructions<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Operations in the shader program: &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> fragmentInstructions<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>By the way, you can also access the generated opcode, with optional line numbering:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;VERTEX SHADER:&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>getVertexOpcode<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;------------------&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;FRAGMENT SHADER&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>getFragmentOpcode<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><b><a href="https://github.com/Barliesque/EasyAGAL" title="Download EasyAGAL from GitHub" target="_blank">Download EasyAGAL from GitHub.</a></b></p>
]]></content:encoded>
			<wfw:commentRss>http://studio.barliesque.com/blog/2011/09/easyagal-macros-and-aliases/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Introducing EasyAGAL</title>
		<link>http://studio.barliesque.com/blog/2011/08/introducing-easyagal/</link>
		<comments>http://studio.barliesque.com/blog/2011/08/introducing-easyagal/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 19:56:28 +0000</pubDate>
		<dc:creator>barliesque</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Molehill]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[AGAL]]></category>
		<category><![CDATA[EasyAGAL]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Shaders]]></category>
		<category><![CDATA[Stage3D]]></category>

		<guid isPermaLink="false">http://studio.barliesque.com/blog/?p=162</guid>
		<description><![CDATA[I decided to write a small library that would assist in writing AGAL shaders, just as easily as writing ActionScript.  So, now I get:  Code completion and hinting, far more readable code, as well as some dynamic coding advantages...  <i>Download <b>EasyAGAL</b> from GitHub.</i>]]></description>
			<content:encoded><![CDATA[<p>Like most Flash developers out there, I&#8217;ve been getting excited about all the new possibilities Molehill is going to open up.  So I&#8217;ve begun refreshing my somewhat shaky knowledge of matrix mathematics, and learning the new AGAL language.  I could never understand why assembly code is always written in what looks more like shorthand than a fully expressed language, considering whatever the name of an operation is, it&#8217;ll be compiled down to a handful of bits understandable only to the CPU.  Mario Scabia is absolutely spot on likening it to the ancient hieroglyphics, in his <a href="http://iflash3d.com/shaders/my-name-is-agal-i-come-from-adobe-1/">introduction to AGAL</a>.</p>
<p>Learning how to work with matrices to achieve rendering effects is challenging enough without having to take on a new and strange programming language.  Given that there is no IDE especially for AGAL (at least for the time being!) I decided to write a small library that would assist me in writing AGAL programs, just as easily as writing ActionScript.  So, what does that mean?</p>
<ul>
<li>Code completion and hinting</li>
<li>Far more easily readable code</li>
<li>Dynamic coding advantages</li>
</ul>
<h3>Two Flavors:  Easy &#038; Easier</h3>
<p>Two base classes are provided for you to choose from:  <b>EasyAGAL.as</b> which uses the original AGAL opcodes for function names, and <b>EasierAGAL.as</b> which uses fully expressed function names.</p>
<p>Compare these corresponding samples:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">	<span style="color: #990000;">&quot;m44 vt1, va2, vc8 <span style="">\n</span>&quot;</span> <span style="color: #000066; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;nrm vt1.xyz, vt1.xyz <span style="">\n</span>&quot;</span> <span style="color: #000066; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;sub vt2, vc12, vt0 <span style="">\n</span>&quot;</span> <span style="color: #000066; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;nrm vt2.xyz, vt2.xyz <span style="">\n</span>&quot;</span> <span style="color: #000066; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;dp3 vt3, vt1, vt2 <span style="">\n</span>&quot;</span> <span style="color: #000066; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;mov v2, vt3&quot;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">	<span style="color: #009900; font-style: italic;">// With EasyAGAL...</span>
&nbsp;
	m44<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> ATTRIBUTE<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">8</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	nrm<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz<span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	sub<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">12</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	nrm<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz<span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	dp3<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	mov<span style="color: #000000;">&#40;</span> VARYING<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">	<span style="color: #009900; font-style: italic;">// or with EasierAGAL...</span>
&nbsp;
	multiply4x4<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> ATTRIBUTE<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">8</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz<span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">12</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz<span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>xyz <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	dotProduct3<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	move<span style="color: #000000;">&#40;</span> VARYING<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>You&#8217;ll notice that the EasyAGAL code simplifies the use of registers a bit &#8212;  depending on whether you&#8217;re writing a vertex or a fragment shader, the appropriate register will automatically be used.  So, for example, you don&#8217;t need to worry about <em>vt1</em> versus <em>ft1</em>, only <em>TEMP[1]</em> which will be translated appropriately.  We can make the EasyAGAL code more readable still, by assigning registers to variables with descriptive names:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">	<span style="color: #6699cc; font-weight: bold;">var</span> normal<span style="color: #000066; font-weight: bold;">:</span>IRegister = ATTRIBUTE<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> normalMatrix<span style="color: #000066; font-weight: bold;">:</span>IRegister = CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">8</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> xformedNorm<span style="color: #000066; font-weight: bold;">:</span>IRegister = TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> intensity<span style="color: #000066; font-weight: bold;">:</span>IRegister = TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	multiply4x4<span style="color: #000000;">&#40;</span> xformedNorm<span style="color: #000066; font-weight: bold;">,</span> normal<span style="color: #000066; font-weight: bold;">,</span> normalMatrix <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> xformedNorm<span style="color: #000066; font-weight: bold;">.</span>xyz<span style="color: #000066; font-weight: bold;">,</span> xformedNorm<span style="color: #000066; font-weight: bold;">.</span>xyz <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> intensity<span style="color: #000066; font-weight: bold;">,</span> CONST<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">12</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> intensity<span style="color: #000066; font-weight: bold;">.</span>xyz<span style="color: #000066; font-weight: bold;">,</span> intensity<span style="color: #000066; font-weight: bold;">.</span>xyz <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	dotProduct3<span style="color: #000000;">&#40;</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> intensity <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	move<span style="color: #000000;">&#40;</span> VARYING<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> TEMP<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<h3>Skeptical?</h3>
<p>Some may say &#8220;PixelBender3D does the same thing&#8230;&#8221; &#8230;which is actually quite inaccurate.  PixelBender3D is a high level language that is pre-compiled down to AGAL byte-code.  When writing AGAL from ActionScript (with or without the aid of this library) we have the oportunity to dynamically make some decisions about how the shader is written, e.g. whether to include vertex fogging, etc.  We can instantly rewrite the shader to include or exclude any number of options.  True, PixelBender3D was created as a friendlier alternative to AGAL, but at some cost to efficiency and outright hands-on control.</p>
<p>Others will say, &#8220;If you take the time to learn AGAL properly, you&#8217;ll be able to read it more easily and you won&#8217;t need any of this.&#8221;  I expect that for many the hurdle of making sense out of the hieroglyphics of AGAL when first meeting the language will prove too much of an obstacle to progress beyond basic tutorials.  This library provides training wheels to learning AGAL.  I have not reinvented the language, but merely made it much easier to read and write, leveraging the features of our IDE&#8217;s.  All methods of <em>EasyAGAL</em> and <em>EasierAGAL</em> maintain the same parameters, in the same order, as AGAL opcodes;  They are all documented with ASDoc tags providing help for every instruction and every register as you type.  The code-hints from EasierAGAL also include the original AGAL opcodes to help you learn them.</p>
<p><img src="http://studio.barliesque.com/images/easy-agal-code-hinting2.png" /></p>
<h3>Happy Trails</h3>
<p>AGAL is not easy, but hopefully this library will make it easier, and assist your learning experience.  Here are some excellent links to tutorials and introductions to AGAL and the Molehill API:</p>
<p><a href="http://iflash3d.com/shaders/my-name-is-agal-i-come-from-adobe-1/">My Name is AGAL, and I Come from Adobe</a> by Marco Scabia<br />
<a href="http://labs.jam3.ca/2011/03/molehill-getting-started/">Molehill &#8211; Getting Started</a> by Mikko Haapoja<br />
<a href="http://pgstudios.org/tutorials.php">Tutorials</a> by Pixelante</p>
<p>Once you&#8217;ve explored some of these tutorials and are ready to try your hand at coding some AGAL, please visit the repository for my new open source project <a href="https://github.com/Barliesque/EasyAGAL" title="Download EasyAGAL from GitHub" target="_blank">EasyAGAL now on GitHub.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://studio.barliesque.com/blog/2011/08/introducing-easyagal/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Textured Vectors</title>
		<link>http://studio.barliesque.com/blog/2009/01/textured-vectors/</link>
		<comments>http://studio.barliesque.com/blog/2009/01/textured-vectors/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 01:47:31 +0000</pubDate>
		<dc:creator>barliesque</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Effect]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Lighting]]></category>
		<category><![CDATA[Texture]]></category>
		<category><![CDATA[Vectors]]></category>

		<guid isPermaLink="false">http://studio.barliesque.com/blog/?p=139</guid>
		<description><![CDATA[Just a little experiment for an upcoming animation project.  The usual flat cartoony vectors just wouldn't be right, so I was playing with layering textures with gradients designed to simulate 3D.  I'm pretty excited about the results...]]></description>
			<content:encoded><![CDATA[<p>Just a little experiment for an upcoming animation project.  The usual flat cartoony vectors just wouldn&#8217;t be right, so I was playing with layering bitmap fills with gradients designed to simulate 3D.  I&#8217;m pretty excited about the results&#8230;</p>
<p><script type="text/javascript" src="http://studio.barliesque.com/blog/wp-content/plugins/pb-embedflash/js/swfobject.js"></script><span class="embedflash" id="swfidd761842ff2b28e83ae8733a46fa1cb1d"><small>(Please open the article to see the flash file or player.)</small></span><script type="text/javascript">
				var flashvars = {}; var params = {}; var attributes = {};params.allowfullscreen = "true"; params.allowscriptaccess = "always";
				swfobject.embedSWF("http://studio.barliesque.com/blog/media/materials.swf","swfidd761842ff2b28e83ae8733a46fa1cb1d","500","400","9.0.0","http://studio.barliesque.com/blog/wp-content/plugins/pb-embedflash/swf/expressInstall.swf",flashvars,params,attributes);
		</script></p>
<p>This was also a chance to get to grips with the new Motion Editor in Flash CS4.  I&#8217;ve made that and a CS3 version available for download if you&#8217;d like to have a look.</p>
<p><a href="http://studio.barliesque.com/blog/download/textured_vectors_cs4.zip"><strong>Download the .fla (CS4)</strong></a><strong><br />
 </strong> <a href="http://studio.barliesque.com/blog/download/textured_vectors_cs3.zip"><strong>Download the .fla (CS3)</strong></a></p>
<p>Have a look at <a title="www.imageafter.com" href="http://www.imageafter.com" target="_blank">www.imageafter.com</a> if you&#8217;re looking for more texture images.</p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://studio.barliesque.com/blog/2009/01/textured-vectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

