<!--
Copyright 2013 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="xgenVSOffset" name="xgenVSOffset" type="plumbing" class="ShadeFragment" version="1.0" feature_level="0" >
  <description>
    <![CDATA[
Make quads facing to camera for xgen splines.]]>
  </description>
  <properties>
    <float3  name="Pm" semantic="Pm" flags="varyingInputParam" />
    <float   name="offsetFlag" semantic="TEXCOORD2" flags="varyingInputParam" />
    <float3  name="widthVecFinal" flags="varyingInputParam" />
  </properties>
  <values>
  </values>
  <outputs>
    <float3  name="PmFinal" />
  </outputs>
  <implementation>
    <implementation  render="OGSRenderer" language="Cg" lang_version="2.100000" >
      <function_name val="xgenVSOffset" />
      <source>
        <![CDATA[
float3 xgenVSOffset(float3 Pm, float offsetFlag, float3 widthVecFinal)
{
    return Pm + offsetFlag * widthVecFinal;
}
            ]]>
      </source>
    </implementation>
    <implementation  render="OGSRenderer" language="HLSL" lang_version="11.000000" >
      <function_name val="xgenVSOffset" />
      <source>
        <![CDATA[
float3 xgenVSOffset(float3 Pm, float offsetFlag, float3 widthVecFinal)
{
    return Pm + offsetFlag * widthVecFinal;
}
            ]]>
      </source>
    </implementation>
    <implementation  render="OGSRenderer" language="HLSL" lang_version="10.000000" >
      <function_name val="xgenVSOffset" />
      <source>
        <![CDATA[
float3 xgenVSOffset(float3 Pm, float offsetFlag, float3 widthVecFinal)
{
    return Pm + offsetFlag * widthVecFinal;
}
            ]]>
      </source>
    </implementation>
  </implementation>
</fragment>