<!--
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="xgenVSPc" name="xgenVSPc" type="plumbing" class="ShadeFragment" version="1.0" feature_level="0" >
  <description>
    <![CDATA[
Make quads facing to camera for xgen splines.]]>
  </description>
  <properties>
    <float3  name="PmFinal" flags="varyingInputParam" />
    <float4x4  name="worldViewProjection" semantic="worldviewprojection" />
    <float  name="depthPriority" semantic="depthpriority" />
  </properties>
  <values>
  </values>
  <outputs>
    <float4  name="Pc" semantic="SV_Position" />
    <undefined name="positionShader" semantic="positionShader" />
  </outputs>
  <implementation>
    <implementation  render="OGSRenderer" language="Cg" lang_version="2.100000" >
      <function_name val="xgenVSPc" />
      <source>
        <![CDATA[
float4 xgenVSPc(float3 PmFinal, float4x4 worldViewProjection, float depthPriority)
{
    float4 pc = mul(worldViewProjection, float4(PmFinal, 1.0f));
    pc.z -= pc.w * 2.0f * depthPriority;
    return pc;
}
            ]]>
      </source>
    </implementation>
    <implementation  render="OGSRenderer" language="HLSL" lang_version="11.000000" >
      <function_name val="xgenVSPc" />
      <source>
        <![CDATA[
float4 xgenVSPc(float3 PmFinal, float4x4 worldViewProjection, float depthPriority)
{
    float4 pc = mul(float4(PmFinal, 1.0f), worldViewProjection);
    pc.z -= pc.w * depthPriority;
    return pc;
}
            ]]>
      </source>
    </implementation>
    <implementation  render="OGSRenderer" language="HLSL" lang_version="10.000000" >
      <function_name val="xgenVSPc" />
      <source>
        <![CDATA[
float4 xgenVSPc(float3 PmFinal, float4x4 worldViewProjection, float depthPriority)
{
    float4 pc = mul(float4(PmFinal, 1.0f), worldViewProjection);
    pc.z -= pc.w * depthPriority;
    return pc;
}
            ]]>
      </source>
    </implementation>
  </implementation>
</fragment>