<?xml version="1.0" encoding="iso-8859-1"?>
<xsi_file type="ShaderCompound" name="Alpha Replace" category="Color Channels" author="Joey Ponthieux" formatversion="1.1" compoundversion="1.7" color="10991252">
	<description><![CDATA[Name: Alpha Replace
Author: Joey Ponthieux
Date: 08-27-08
Version: 1.7
EMail joey.p@cox.net

GENERAL
This compound provides the ability to replace the alpha within an RGBA color
stream. It includes a default color input, and both color and scalar replacement 
source inputs, the ability to extract  the alpha from the color replacement input, 
and a channel pipeline which allows the user to combine the two replacement 
inputs via boolean operations. It also includes gain, fader, and inversion functions
for all input sources and output.    

Install by placing this compound in your local or workgroup RTCompounds 
Directory. Upon installation it will become available in the User partition of the 
Color Channels shaders.


DEFAULT INPUT
This is the default color stream. The alpha from this stream will either be 
used or replaced depending on how you configure this shader. 

Input: Takes an RGBA/RGB source as input. Whatever color(RGB) data which is
passed through this input will be output by default, and will not be modified in
any way.

Alpha Fader: Will alter the alpha of the default input similar to a gain method, 
except it will perform adjustment in the opposite direction of gain. DEFAULT=0  
A value of 0 represent 0% fade of the input source. 
A value of 1 represent 100% fade of the input source.
By default a value of 0 means that whatever is fed to Alpha Fader is output as is.
A value of 1 raises the source to white. 

Invert Alpha: Invert the default input alpha.


REPLACEMENT SOURCE 1

Color Input: Takes an RGBA/RGB source as input. This is useful if you wish to 
apply color data as input for alpha replacement. You can rely on the Compound's 
internal color to scalar functionality for processing. In general all alpha processing 
within the Compound is converted to and handled as scalar data.

Use Alpha Only: Extract and use the alpha from input color source 1. This will be
useful if you want to select the alpha from source 1 and move it to the Default
color stream. If this option is off, then source 1's alpha will be ignored and 
color(RGB) from source 1 will be used as the replacement alpha for the Default
color stream.

Fader: Will alter the value of the source 1 input similar to a gain method, 
except it will perform adjustment in the opposite direction of gain. DEFAULT=0  
A value of 0 represents 0% fade of the input source. 
A value of 1 represents 100% fade of the input source.
By default a value of 0 means that whatever is sent to Fader is output as is.
A value of 1 raises the source to white. 


Invert: Invert source 1. Invert source 1 alpha if "use alpha only" is selected.



REPLACEMENT SOURCE 2

Scalar Input: Takes a scalar source as input. This is useful if you wish to apply
a scalar as input for alpha replacement. 

Fader: Will alter the value of the source 2 input similar to a gain method, 
except it will perform adjustment in the opposite direction of gain. DEFAULT=0  
A value of 0 represents 0% fade of the input source. 
A value of 1 represents 100% fade of the input source.
By default a value of 0 means that whatever is sent to Fader is output as is.
A value of 1 raises the source to white. 


Invert: Invert source 2.



SOURCE SELECTORS
Use this to assign your sources to specific Channels and ultimately a proper 
Output Channel. This only selects the alpha sources within the compound, and 
not the color stream. By default there are three Channels internally within the 
Compound. Channels are alpha processing pipelines which enable efficient or 
unique processing such as Booleans. Channel A & Channel B are the Base 
Channels and the Boolean Methods Channel is an optional Output Channel. 
You are required to assign a Source to each of the Base Channels(A & B).  

How you assign sources will determine how the source is processed or how 
booleans are processed. For example, if you assign Default Input to Channel A, 
and set Channel A as output, this is basically the same as ignoring all 
replacement methods within the compound. In other words, the alpha from the 
Default Input will not be replaced, it is the same as alpha replacement being set 
to "off" or "inactive".   Setting Source 1 or Source 2 to Channel A forces that 
replacement source through to the Output Channel using the dominance that
each Channel provides.  Channel A is the dominant Channel.

Valid options for each channel are Default Input, Source 1, and Source 2. Both 
Channels can be set to the same source if desired, but since the Channels 
currently have no operators, this will not yield much of value when performing a 
boolean.  You can use these sources, along with the Output Channel switch, as 
switchable sources to make quick comparisons between multiple replacement
inputs. 

See Boolean Methods and Output Settings for more information.

Channel A Source: Select which source input will be piped through Channel A.

Channel B Source: Select which source input will be piped through Channel B.



BOOLEAN METHODS
Use this to select a boolean operation. A is the dominant channel. Care must 
be taken to assign the proper sources to the proper channels to get the correct 
results. For example, during a subtraction(difference) operation, B will always 
be subtracted from A. To reverse the effect, swap the sources in the Channel 
Selectors. Valid operations are A(plus)B, A(minus)B, and A(intersect)B. By 
default Booleans are ignored by the Compound unless Boolean Methods is 
selected as an Output Channel in Output Settings. In order to perform Booleans 
at least two distinct sources must be selected. If a source is not connected, a 
color field or scalar field will be used in place of a connected source to operate on. 

Operation: Choose which boolean operation to perform on the Channels. 



OUTPUT SETTINGS
These settings define the nature of the Compound's output. 

Output Channel: Use this to define the output Channel. Whatever is selected
here is what exits the compound. This is always operative, so care must be 
taken to select the correct channel depending on how you are using the 
compound. Valid options are Channel A, Channel B, and the Boolean Methods 
Channel. The default, or dominant channel, is Channel A.   

Master Gain: This will modify the Output Alpha Gain. 
A value of 1 represents 100% gain of the output source. 
A value of 0 represents 0% gain of the output source.
By default a value of 1 means that whatever is sent to Master Gain is output as is.
A value of 0 reduces the source to black. 

Invert Alpha: Invert the output alpha.

NOTE: Gain and Fader operations are here to allow the user the ability to alter
alpha levels using opposite polarities or "level" directions. They will play together
quite well in many cases, but expect that occassionally one may cancel the effects
of the other or create a situation where the other has nothing to work with.   

WARNING: Use at own risk! No guarantees and no warranties, explicit or 
otherwise, will be provided with the use of this shader.]]></description>
	<definition>
		<nodes>
			<node type="shader" progid="Softimage.sib_scalar_multi_switch.1" index="0">
				<param name="Name" type="31" ><![CDATA[Scalar_Multi_Switch]]></param>
				<param name="default" type="4" value="0.000000"></param>
				<param name="switch" type="3" value="1"></param>
				<param name="value0" type="3" value="0"></param>
				<param name="input0" type="4" value="0.000000"></param>
				<param name="value1" type="3" value="1"></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="value2" type="3" value="2"></param>
				<param name="input2" type="4" value="0.000000"></param>
				<param name="value3" type="3" value="3"></param>
				<param name="input3" type="4" value="0.000000"></param>
				<param name="value4" type="3" value="4"></param>
				<param name="input4" type="4" value="0.000000"></param>
				<param name="value5" type="3" value="5"></param>
				<param name="input5" type="4" value="0.000000"></param>
				<param name="value6" type="3" value="6"></param>
				<param name="input6" type="4" value="0.000000"></param>
				<param name="value7" type="3" value="7"></param>
				<param name="input7" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="portgroupconnectedonlystates">21,0;24,0;27,0;33,0;</prop>
					<prop name="posx">117</prop>
					<prop name="posy">261</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="0" offsety="103" sizex="124" sizey="19"><![CDATA[Pipeline for CHANNEL A]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_color_to_scalars.1" index="1">
				<param name="Name" type="31" ><![CDATA[Color_to_Scalars]]></param>
				<param name="input.red" type="4" value="0.000000"></param>
				<param name="input.green" type="4" value="0.000000"></param>
				<param name="input.blue" type="4" value="0.000000"></param>
				<param name="input.alpha" type="4" value="1.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">-1205</prop>
					<prop name="posy">169</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="-2" offsety="122" sizex="387" sizey="19"><![CDATA[Default Input. Color is preserved, alpha proceeds to the replacement pipeline.]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_color_combine.1" index="2">
				<param name="Name" type="31" ><![CDATA[RGBA_combine]]></param>
				<param name="red" type="4" value="1.000000"></param>
				<param name="green" type="4" value="1.000000"></param>
				<param name="blue" type="4" value="1.000000"></param>
				<param name="alpha" type="4" value="1.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">1358</prop>
					<prop name="posy">169</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="0" offsety="105" sizex="282" sizey="19"><![CDATA[Receive preserved color data, insert replacement alpha.]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_math_basic.1" index="3">
				<param name="Name" type="31" ><![CDATA[Multiply]]></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="input2" type="4" value="1.000000"></param>
				<param name="op" type="3" value="2"></param>
				<datablob category="ui_infos">
					<prop name="posx">1222</prop>
					<prop name="posy">234</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="shader" progid="Softimage.sib_color_to_scalar.1" index="4">
				<param name="Name" type="31" ><![CDATA[Color_to_Scalar1]]></param>
				<param name="input.red" type="4" value="1.000000"></param>
				<param name="input.green" type="4" value="1.000000"></param>
				<param name="input.blue" type="4" value="1.000000"></param>
				<param name="input.alpha" type="4" value="1.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">-1017</prop>
					<prop name="posy">408</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_math_basic.1" index="5">
				<param name="Name" type="31" ><![CDATA[Maximum]]></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="input2" type="4" value="0.000000"></param>
				<param name="op" type="3" value="5"></param>
				<datablob category="ui_infos">
					<prop name="posx">-91</prop>
					<prop name="posy">295</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_math_basic.1" index="6">
				<param name="Name" type="31" ><![CDATA[Maximum1]]></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="input2" type="4" value="0.000000"></param>
				<param name="op" type="3" value="5"></param>
				<datablob category="ui_infos">
					<prop name="posx">-92</prop>
					<prop name="posy">425</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_math_basic.1" index="7">
				<param name="Name" type="31" ><![CDATA[Maximum2]]></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="input2" type="4" value="0.000000"></param>
				<param name="op" type="3" value="5"></param>
				<datablob category="ui_infos">
					<prop name="posx">-89</prop>
					<prop name="posy">555</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_switch.1" index="8">
				<param name="Name" type="31" ><![CDATA[Scalar_Boolean_Switch1]]></param>
				<param name="input" type="11" value="false"></param>
				<param name="scalar1" type="4" value="1.000000"></param>
				<param name="scalar2" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">-786</prop>
					<prop name="posy">403</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="shader" progid="Softimage.sib_color_split.1" index="9">
				<param name="Name" type="31" ><![CDATA[RGBA_Split]]></param>
				<param name="input.red" type="4" value="1.000000"></param>
				<param name="input.green" type="4" value="1.000000"></param>
				<param name="input.blue" type="4" value="1.000000"></param>
				<param name="input.alpha" type="4" value="1.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">-1205</prop>
					<prop name="posy">405</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="3" offsety="105" sizex="818" sizey="19"><![CDATA[Begin Source 1 replacement pipeline: Color is converted to scalar and processed as a replacement alpha. The alpha from this color input is preserved as a "third" source.]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_multi_switch.1" index="10">
				<param name="Name" type="31" ><![CDATA[Scalar_Multi_Switch1]]></param>
				<param name="default" type="4" value="1.000000"></param>
				<param name="switch" type="3" value="2"></param>
				<param name="value0" type="3" value="0"></param>
				<param name="input0" type="4" value="0.000000"></param>
				<param name="value1" type="3" value="1"></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="value2" type="3" value="2"></param>
				<param name="input2" type="4" value="0.000000"></param>
				<param name="value3" type="3" value="3"></param>
				<param name="input3" type="4" value="0.000000"></param>
				<param name="value4" type="3" value="4"></param>
				<param name="input4" type="4" value="0.000000"></param>
				<param name="value5" type="3" value="5"></param>
				<param name="input5" type="4" value="0.000000"></param>
				<param name="value6" type="3" value="6"></param>
				<param name="input6" type="4" value="0.000000"></param>
				<param name="value7" type="3" value="7"></param>
				<param name="input7" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="portgroupconnectedonlystates">21,0;24,0;27,0;</prop>
					<prop name="posx">117</prop>
					<prop name="posy">488</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="1" offsety="104" sizex="123" sizey="19"><![CDATA[Pipeline for CHANNEL B]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_multi_switch.1" index="11">
				<param name="Name" type="31" ><![CDATA[Scalar_Multi_Switch2]]></param>
				<param name="default" type="4" value="0.000000"></param>
				<param name="switch" type="3" value="0"></param>
				<param name="value0" type="3" value="0"></param>
				<param name="input0" type="4" value="0.000000"></param>
				<param name="value1" type="3" value="1"></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="value2" type="3" value="2"></param>
				<param name="input2" type="4" value="0.000000"></param>
				<param name="value3" type="3" value="3"></param>
				<param name="input3" type="4" value="0.000000"></param>
				<param name="value4" type="3" value="4"></param>
				<param name="input4" type="4" value="0.000000"></param>
				<param name="value5" type="3" value="5"></param>
				<param name="input5" type="4" value="0.000000"></param>
				<param name="value6" type="3" value="6"></param>
				<param name="input6" type="4" value="0.000000"></param>
				<param name="value7" type="3" value="7"></param>
				<param name="input7" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">748</prop>
					<prop name="posy">288</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="1" offsety="156" sizex="160" sizey="19"><![CDATA[Begin Output Channel pipeline.]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_math_basic.1" index="12">
				<param name="Name" type="31" ><![CDATA[Scalar_Math_Basic]]></param>
				<param name="input1" type="4" value="0.000000"></param>
				<param name="input2" type="4" value="1.000000"></param>
				<param name="op" type="3" value="0"></param>
				<datablob category="ui_infos">
					<prop name="posx">465</prop>
					<prop name="posy">476</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="1" offsety="95" sizex="189" sizey="19"><![CDATA[This serves as the Boolean operator.]]></comment>
			</node>
			<node type="embedded_compound" progid="0" index="13">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert_2_5]]></param>
				<param name="switch" type="11" value="false"></param>
				<param name="input" type="4" value="1.000000"></param>
				<param name="out" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">-304</prop>
					<prop name="posy">555</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="-2" offsety="92" sizex="247" sizey="19"><![CDATA[Begin Source 2 replacement pipeline. Scalar only.]]></comment>
			</node>
			<node type="embedded_compound" progid="1" index="14">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert_2_6]]></param>
				<param name="switch" type="11" value="false"></param>
				<param name="input" type="4" value="0.000000"></param>
				<param name="out" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">-306</prop>
					<prop name="posy">425</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="embedded_compound" progid="2" index="15">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert_2_7]]></param>
				<param name="switch" type="11" value="false"></param>
				<param name="input" type="4" value="0.000000"></param>
				<param name="out" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">-306</prop>
					<prop name="posy">296</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="embedded_compound" progid="3" index="16">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert_2_8]]></param>
				<param name="switch" type="11" value="false"></param>
				<param name="input" type="4" value="0.000000"></param>
				<param name="out" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">1003</prop>
					<prop name="posy">239</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
		</nodes>
		<exposed_ports>
			<port index="1" portname="input" username="input" displayname="input"></port>
			<port index="5" portname="input2" username="input_alpha_fader" displayname="alpha fader"></port>
			<port index="15" portname="switch" username="input_invert_alpha" displayname="invert alpha"></port>
			<port index="9" portname="input" username="source1" displayname="color input"></port>
			<port index="8" portname="input" username="source1_alpha_override" displayname="use alpha only"></port>
			<port index="6" portname="input2" username="source1_fader" displayname="fader"></port>
			<port index="14" portname="switch" username="source1_invert" displayname="invert"></port>
			<port index="13" portname="input" username="source2" displayname="scalar input"></port>
			<port index="7" portname="input2" username="source2_fader" displayname="fader"></port>
			<port index="13" portname="switch" username="source2_invert" displayname="invert"></port>
			<port index="0" portname="switch" username="source_switch_A" displayname="channel A source"></port>
			<port index="10" portname="switch" username="source_switch_B" displayname="channel B source"></port>
			<port index="12" portname="op" username="bool_switch" displayname="operation"></port>
			<port index="11" portname="switch" username="output_switch" displayname="output channel"></port>
			<port index="3" portname="input2" username="master_gain" displayname="master gain"></port>
			<port index="16" portname="switch" username="output_invert_alpha" displayname="invert alpha"></port>
			<port index="2" portname="" username="out" displayname="out"></port>
		</exposed_ports>
		<connections>
			<cnx from_node="0" from_port="" to_node="11" to_port="input0"> </cnx>
			<cnx from_node="0" from_port="" to_node="12" to_port="input1"> </cnx>
			<cnx from_node="1" from_port="r" to_node="2" to_port="red"> </cnx>
			<cnx from_node="1" from_port="g" to_node="2" to_port="green"> </cnx>
			<cnx from_node="1" from_port="b" to_node="2" to_port="blue"> </cnx>
			<cnx from_node="1" from_port="a" to_node="15" to_port="input"> </cnx>
			<cnx from_node="3" from_port="" to_node="2" to_port="alpha"> </cnx>
			<cnx from_node="4" from_port="" to_node="8" to_port="scalar1"> </cnx>
			<cnx from_node="5" from_port="" to_node="0" to_port="input0"> </cnx>
			<cnx from_node="5" from_port="" to_node="10" to_port="input0"> </cnx>
			<cnx from_node="6" from_port="" to_node="0" to_port="input1"> </cnx>
			<cnx from_node="6" from_port="" to_node="10" to_port="input1"> </cnx>
			<cnx from_node="7" from_port="" to_node="0" to_port="input2"> </cnx>
			<cnx from_node="7" from_port="" to_node="10" to_port="input2"> </cnx>
			<cnx from_node="8" from_port="" to_node="14" to_port="input"> </cnx>
			<cnx from_node="9" from_port="alpha" to_node="8" to_port="scalar2"> </cnx>
			<cnx from_node="9" from_port="rgb" to_node="4" to_port="input"> </cnx>
			<cnx from_node="10" from_port="" to_node="11" to_port="input1"> </cnx>
			<cnx from_node="10" from_port="" to_node="12" to_port="input2"> </cnx>
			<cnx from_node="11" from_port="" to_node="16" to_port="input"> </cnx>
			<cnx from_node="12" from_port="" to_node="11" to_port="input2"> </cnx>
			<cnx from_node="13" from_port="out" to_node="7" to_port="input1"> </cnx>
			<cnx from_node="14" from_port="out" to_node="6" to_port="input1"> </cnx>
			<cnx from_node="15" from_port="out" to_node="5" to_port="input1"> </cnx>
			<cnx from_node="16" from_port="out" to_node="3" to_port="input1"> </cnx>
		</connections>
		<layout>
			<item type="input" name="input" ppgvis="1" ppggroup="Default Input" portvis="1" portgroup="Default Input"> </item>
			<item type="input" name="input_alpha_fader" min="0" max="1" ppgvis="1" ppggroup="Default Input" portvis="1" portgroup="Default Input"> </item>
			<item type="input" name="input_invert_alpha" min="0" max="-1" ppgvis="1" ppggroup="Default Input" portvis="1" portgroup="Default Input"> </item>
			<item type="input" name="source1" ppgvis="1" ppggroup="Replacement Source 1" portvis="1" portgroup="Source 1"> </item>
			<item type="input" name="source1_alpha_override" min="0" max="-1" ppgvis="1" ppggroup="Replacement Source 1" portvis="1" portgroup="Source 1"> </item>
			<item type="input" name="source1_fader" min="0" max="1" ppgvis="1" ppggroup="Replacement Source 1" portvis="1" portgroup="Source 1"> </item>
			<item type="input" name="source1_invert" min="0" max="-1" ppgvis="1" ppggroup="Replacement Source 1" portvis="1" portgroup="Source 1"> </item>
			<item type="input" name="source2" min="0" max="1" ppgvis="1" ppggroup="Replacement Source 2" portvis="1" portgroup="Source 2"> </item>
			<item type="input" name="source2_fader" min="0" max="1" ppgvis="1" ppggroup="Replacement Source 2" portvis="1" portgroup="Source 2"> </item>
			<item type="input" name="source2_invert" min="0" max="-1" ppgvis="1" ppggroup="Replacement Source 2" portvis="1" portgroup="Source 2"> </item>
			<item type="input" name="source_switch_A" min="0" max="2" ppgvis="1" ppggroup="Source Selectors" portvis="0">
				<enum string="Default Input" value="0"> </enum>
				<enum string="Source 1 " value="1"> </enum>
				<enum string="Source 2" value="2"> </enum>
			</item>
			<item type="input" name="source_switch_B" min="0" max="2" ppgvis="1" ppggroup="Source Selectors" portvis="0">
				<enum string="Default Input" value="0"> </enum>
				<enum string="Source 1" value="1"> </enum>
				<enum string="Source 2" value="2"> </enum>
			</item>
			<item type="input" name="bool_switch" min="0" max="2" ppgvis="1" ppggroup="Boolean Methods" portvis="0">
				<enum string="A plus B" value="0"> </enum>
				<enum string="A minus B" value="1"> </enum>
				<enum string="A intersect B" value="2"> </enum>
			</item>
			<item type="input" name="output_switch" min="0" max="2" ppgvis="1" ppggroup="Output Settings" portvis="1" portgroup="Output Settings">
				<enum string="Channel A" value="0"> </enum>
				<enum string="Channel B" value="1"> </enum>
				<enum string="Boolean Methods" value="2"> </enum>
			</item>
			<item type="input" name="master_gain" min="0" max="1" ppgvis="1" ppggroup="Output Settings" portvis="1" portgroup="Output Settings"> </item>
			<item type="input" name="output_invert_alpha" min="0" max="-1" ppgvis="1" ppggroup="Output Settings" portvis="1" portgroup="Output Settings"> </item>
			<item type="output" name="out" ppgvis="1" portvis="0"> </item>
		</layout>
		<ppglogic lang=""><![CDATA[]]></ppglogic>
	</definition>
	<embedded_compound0 name="Scalar Invert 2.0" category="Image Processing" author="Joey Ponthieux" formatversion="1.1" compoundversion="2.0" color="10991252">
	<description><![CDATA[Name: Scalar Invert 2.0
Author: Joey Ponthieux
Date: 08-26-08
Version: 2.0

This compound provides the core Scalar Invert with switchable functionality. 
You can use this compound any time you wish to use Scalar Invert but need
it to turn on/off at different times.  

Install by placing this compound in your local RTCompounds Directory.
Upon installation it will become available in the User partition of the 
Image Processing shaders.

NOTE: Adding this to your local RTCompounds Directory will not affect the 
standard Scalar Invert that comes with the default XSI Installation.]]></description>
		<nodes>
			<node type="shader" progid="Softimage.sib_scalar_switch.1" index="0">
				<param name="Name" type="31" ><![CDATA[Scalar_Boolean_Switch]]></param>
				<param name="input" type="11" value="false"></param>
				<param name="scalar1" type="4" value="1.000000"></param>
				<param name="scalar2" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">1010</prop>
					<prop name="posy">339</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="37" offsety="134" sizex="57" sizey="19"><![CDATA[This is the new shader]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_invert.1" index="1">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert]]></param>
				<param name="input" type="4" value="1.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">830</prop>
					<prop name="posy">410</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
		</nodes>
		<exposed_ports>
			<port index="0" portname="input" username="switch" displayname="switch"></port>
			<port index="1" portname="input" username="input" displayname="input">
				<secondaryport index="0" portname="scalar1"></secondaryport>
			</port>
			<port index="0" portname="" username="out" displayname="out"></port>
		</exposed_ports>
		<connections>
			<cnx from_node="1" from_port="" to_node="0" to_port="scalar2"> </cnx>
		</connections>
		<layout>
			<item type="input" name="switch" min="0" max="-1" ppgvis="1" portvis="1"> </item>
			<item type="input" name="input" min="0" max="1" ppgvis="1" portvis="1"> </item>
			<item type="output" name="out" min="0" max="0" ppgvis="1" portvis="0"> </item>
		</layout>
		<ppglogic lang=""><![CDATA[]]></ppglogic>
	</embedded_compound0>
	<embedded_compound1 name="Scalar Invert 2.0" category="Image Processing" author="Joey Ponthieux" formatversion="1.1" compoundversion="2.0" color="10991252">
	<description><![CDATA[Name: Scalar Invert 2.0
Author: Joey Ponthieux
Date: 08-26-08
Version: 2.0

This compound provides the core Scalar Invert with switchable functionality. 
You can use this compound any time you wish to use Scalar Invert but need
it to turn on/off at different times.  

Install by placing this compound in your local RTCompounds Directory.
Upon installation it will become available in the User partition of the 
Image Processing shaders.

NOTE: Adding this to your local RTCompounds Directory will not affect the 
standard Scalar Invert that comes with the default XSI Installation.]]></description>
		<nodes>
			<node type="shader" progid="Softimage.sib_scalar_switch.1" index="0">
				<param name="Name" type="31" ><![CDATA[Scalar_Boolean_Switch]]></param>
				<param name="input" type="11" value="false"></param>
				<param name="scalar1" type="4" value="0.000000"></param>
				<param name="scalar2" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">1010</prop>
					<prop name="posy">339</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="37" offsety="134" sizex="57" sizey="19"><![CDATA[This is the new shader]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_invert.1" index="1">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert]]></param>
				<param name="input" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">830</prop>
					<prop name="posy">410</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
		</nodes>
		<exposed_ports>
			<port index="0" portname="input" username="switch" displayname="switch"></port>
			<port index="1" portname="input" username="input" displayname="input">
				<secondaryport index="0" portname="scalar1"></secondaryport>
			</port>
			<port index="0" portname="" username="out" displayname="out"></port>
		</exposed_ports>
		<connections>
			<cnx from_node="1" from_port="" to_node="0" to_port="scalar2"> </cnx>
		</connections>
		<layout>
			<item type="input" name="switch" min="0" max="-1" ppgvis="1" portvis="1"> </item>
			<item type="input" name="input" min="0" max="1" ppgvis="1" portvis="1"> </item>
			<item type="output" name="out" min="0" max="0" ppgvis="1" portvis="0"> </item>
		</layout>
		<ppglogic lang=""><![CDATA[]]></ppglogic>
	</embedded_compound1>
	<embedded_compound2 name="Scalar Invert 2.0" category="Image Processing" author="Joey Ponthieux" formatversion="1.1" compoundversion="2.0" color="10991252">
	<description><![CDATA[Name: Scalar Invert 2.0
Author: Joey Ponthieux
Date: 08-26-08
Version: 2.0

This compound provides the core Scalar Invert with switchable functionality. 
You can use this compound any time you wish to use Scalar Invert but need
it to turn on/off at different times.  

Install by placing this compound in your local RTCompounds Directory.
Upon installation it will become available in the User partition of the 
Image Processing shaders.

NOTE: Adding this to your local RTCompounds Directory will not affect the 
standard Scalar Invert that comes with the default XSI Installation.]]></description>
		<nodes>
			<node type="shader" progid="Softimage.sib_scalar_switch.1" index="0">
				<param name="Name" type="31" ><![CDATA[Scalar_Boolean_Switch]]></param>
				<param name="input" type="11" value="false"></param>
				<param name="scalar1" type="4" value="0.000000"></param>
				<param name="scalar2" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">1010</prop>
					<prop name="posy">339</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="37" offsety="134" sizex="57" sizey="19"><![CDATA[This is the new shader]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_invert.1" index="1">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert]]></param>
				<param name="input" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">830</prop>
					<prop name="posy">410</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
		</nodes>
		<exposed_ports>
			<port index="0" portname="input" username="switch" displayname="switch"></port>
			<port index="1" portname="input" username="input" displayname="input">
				<secondaryport index="0" portname="scalar1"></secondaryport>
			</port>
			<port index="0" portname="" username="out" displayname="out"></port>
		</exposed_ports>
		<connections>
			<cnx from_node="1" from_port="" to_node="0" to_port="scalar2"> </cnx>
		</connections>
		<layout>
			<item type="input" name="switch" min="0" max="-1" ppgvis="1" portvis="1"> </item>
			<item type="input" name="input" min="0" max="1" ppgvis="1" portvis="1"> </item>
			<item type="output" name="out" min="0" max="0" ppgvis="1" portvis="0"> </item>
		</layout>
		<ppglogic lang=""><![CDATA[]]></ppglogic>
	</embedded_compound2>
	<embedded_compound3 name="Scalar Invert 2.0" category="Image Processing" author="Joey Ponthieux" formatversion="1.1" compoundversion="2.0" color="10991252">
	<description><![CDATA[Name: Scalar Invert 2.0
Author: Joey Ponthieux
Date: 08-26-08
Version: 2.0

This compound provides the core Scalar Invert with switchable functionality. 
You can use this compound any time you wish to use Scalar Invert but need
it to turn on/off at different times.  

Install by placing this compound in your local RTCompounds Directory.
Upon installation it will become available in the User partition of the 
Image Processing shaders.

NOTE: Adding this to your local RTCompounds Directory will not affect the 
standard Scalar Invert that comes with the default XSI Installation.]]></description>
		<nodes>
			<node type="shader" progid="Softimage.sib_scalar_switch.1" index="0">
				<param name="Name" type="31" ><![CDATA[Scalar_Boolean_Switch]]></param>
				<param name="input" type="11" value="false"></param>
				<param name="scalar1" type="4" value="0.000000"></param>
				<param name="scalar2" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">1010</prop>
					<prop name="posy">339</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="37" offsety="134" sizex="57" sizey="19"><![CDATA[This is the new shader]]></comment>
			</node>
			<node type="shader" progid="Softimage.sib_scalar_invert.1" index="1">
				<param name="Name" type="31" ><![CDATA[Scalar_Invert]]></param>
				<param name="input" type="4" value="0.000000"></param>
				<datablob category="ui_infos">
					<prop name="posx">830</prop>
					<prop name="posy">410</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
		</nodes>
		<exposed_ports>
			<port index="0" portname="input" username="switch" displayname="switch"></port>
			<port index="1" portname="input" username="input" displayname="input">
				<secondaryport index="0" portname="scalar1"></secondaryport>
			</port>
			<port index="0" portname="" username="out" displayname="out"></port>
		</exposed_ports>
		<connections>
			<cnx from_node="1" from_port="" to_node="0" to_port="scalar2"> </cnx>
		</connections>
		<layout>
			<item type="input" name="switch" min="0" max="-1" ppgvis="1" portvis="1"> </item>
			<item type="input" name="input" min="0" max="1" ppgvis="1" portvis="1"> </item>
			<item type="output" name="out" min="0" max="0" ppgvis="1" portvis="0"> </item>
		</layout>
		<ppglogic lang=""><![CDATA[]]></ppglogic>
	</embedded_compound3>
</xsi_file>
