<?xml version="1.0" encoding="iso-8859-1"?>
<xsi_file type="ShaderCompound" name="Simple Gain" category="Image Processing" author="Joey Ponthieux" formatversion="1.1" compoundversion="1.0" color="10991252">
	<description><![CDATA[Simple Gain Shader Compound v1.0

Author: Joey Ponthieux
Version: 1.0
Creation Date: 8-18-08

WARNING: Use at your own risk. No guarantees and no warranties, explicit or 
otherwise, will be provided with the use of this shader.


The purpose of this compound is to provide a basic Level/Gain control shader 
for any Color (RGBA) parameter. 


BASIC CONTROLS
Input will take any RGB/RGBA color or texture parameter.

Color_Gain is a multiplication factor which affects the INPUT RGB value.

Alpha_Gain is a multiplication factor which affects the INPUT Alpha value.

Output wil pass a combined RGBA Color/Texture value which will be "modified" 
by the Color/Alpha Gain factors.




CONTROL SPECIFICS

GENERAL
All Gain values are on a scale of 0-1. Ex. 0 = 0% Gain, 1 = 100% Gain.

Color(RGB) is unified and driven as a single Color Gain level. 

Alpha is driven as a single Gain level.

Color and Alpha Gain factors can be driven by separate input. 

Color and Alpha output is combined for typical input to any RGBA Parameter.

Normalized values for Color and Alpha are 1,1.


COLOR
100% Color Gain sets the INPUT to the equivalant to 100% Color. 

0% Color Gain reduces the INPUT Gain to a 0 value, or Black.


ALPHA
Alpha Gain is designed to work in the standard Softimage shading  model for 
Alpha dominance, 100% Alpha is positive, 0% Alpha is negative. If you are 
familiar with the Alpha to Tranparency behavior within XSI, this will adhere
to all of the standard rules you are familiar with. 

If Alpha Gain is set to 1, it will basically act as a pass through. Whatever Alpha 
is fed to the Gain Control will remain as is. 

If the Alpha input to Gain Control is 0, modifying the Alpha Gain will have no affect. 

If the Alpha input is 1, then Apha Gain of 0 will cause the Alpha to be opaque, and
Alpha Gain of 1 will cause the Alpha to be transparent when affecting 
Transparency.

If the Alpha input is less than 1 or greater than 0, the effect of Alpha Gain will be 
to change the value from whatever the standing input value is, to 1. That is, if the 
input Alpha is 0.5, then Alpha Gain of 0 to 1 will change the Alpha from 1 to 0.5 
respectively, or:
	Alpha Gain	Alpha Value
	0	=	1
	1	=	0.5


 
NOTES
This shader appears to handle RGBA->RGB just as any other shader does, There
appears to be no adverse affects of providing an RGBA channel to an RGB
channel which possesses no Alpha.]]></description>
	<definition>
		<nodes>
			<node type="shader" progid="Softimage.sib_color_combine.1" index="0">
				<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="portgroupnormalstates">4,0;</prop>
					<prop name="posx">715</prop>
					<prop name="posy">-475</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="shader" progid="Softimage.sib_color_math_basic.1" index="1">
				<param name="Name" type="31" ><![CDATA[Color_Math_Basic]]></param>
				<param name="input1.red" type="4" value="1.000000"></param>
				<param name="input1.green" type="4" value="1.000000"></param>
				<param name="input1.blue" type="4" value="1.000000"></param>
				<param name="input1.alpha" type="4" value="1.000000"></param>
				<param name="input2.red" type="4" value="1.000000"></param>
				<param name="input2.green" type="4" value="1.000000"></param>
				<param name="input2.blue" type="4" value="1.000000"></param>
				<param name="input2.alpha" type="4" value="0.000000"></param>
				<param name="op" type="3" value="2"></param>
				<param name="alpha" type="11" value="true"></param>
				<datablob category="ui_infos">
					<prop name="posx">922</prop>
					<prop name="posy">-528</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
		</nodes>
		<exposed_ports>
			<port index="1" portname="input1" username="Input" displayname=""></port>
			<port index="0" portname="red" username="Color_Gain" displayname="">
				<secondaryport index="0" portname="green"></secondaryport>
				<secondaryport index="0" portname="blue"></secondaryport>
			</port>
			<port index="0" portname="alpha" username="Alpha_Gain" displayname=""></port>
			<port index="1" portname="" username="Output" displayname=""></port>
		</exposed_ports>
		<connections>
			<cnx from_node="0" from_port="" to_node="1" to_port="input2"> </cnx>
		</connections>
		<layout>
			<item type="input" name="Input" ppgvis="1" portvis="1"> </item>
			<item type="input" name="Color_Gain" min="0" max="1" ppgvis="1" portvis="1"> </item>
			<item type="input" name="Alpha_Gain" min="0" max="1" ppgvis="1" portvis="1"> </item>
			<item type="output" name="Output" ppgvis="1" portvis="0"> </item>
		</layout>
		<ppglogic lang=""><![CDATA[]]></ppglogic>
	</definition>
</xsi_file>
