<!--
===========================================================================
Copyright 2015 Autodesk, Inc. All rights reserved.

Use of this software is subject to the terms of the Autodesk license
agreement provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
===========================================================================
-->

<fragment uiName="colorConditionBase" name="colorConditionBase" type="plumbing" class="ShadeFragment" version="1.0">
	<description><![CDATA[Color condition shade fragment]]></description>
	<properties>
		<float3 name="colorA" />
		<float3 name="colorB" />
		<bool name="condition" />
	</properties>
	<values>
		<float3 name="colorA" value="1.0,0.0,0.0" />
		<float3 name="colorB" value="0.0,0.0,1.0" />
		<bool name="condition" value="true" />
	</values>
	<outputs>
		<float3  name="outColor" />
	</outputs>
	<implementation>
	<implementation render="OGSRenderer" language="Cg" lang_version="2.1">
		<function_name val="colorConditionBase" />
		<source>
		<![CDATA[
float3 colorConditionBase(float3 colorA, float3 colorB, bool condition)
{
	float3 retColor;
	retColor = condition ? colorA : colorB;

	return retColor;
}
		]]>
		</source>
	</implementation>
	<implementation render="OGSRenderer" language="HLSL" lang_version="11.0">
		<function_name val="colorConditionBase" />
		<source>
		<![CDATA[
float3 colorConditionBase(float3 colorA, float3 colorB, bool condition)
{
	float3 retColor;
	retColor = condition ? colorA : colorB;

	return retColor;
}
		]]>
		</source>
	</implementation>
	<implementation render="OGSRenderer" language="GLSL" lang_version="3.0">
		<function_name val="colorConditionBase" />
		<source>
		<![CDATA[
vec3 colorConditionBase(vec3 colorA, vec3 colorB, bool condition)
{
	vec3 retColor;
	retColor = condition ? colorA : colorB;

	return retColor;
}
		]]>
		</source>
	</implementation>
	</implementation>
</fragment>
