<!--
Copyright 2016 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="maya_MotionVectorPassV1" name="maya_MotionVectorPassV1" type="sceneEffect" class="ScriptFragment" version="1.0" feature_level="30" >
    <description>
<![CDATA[
SS 2D motion in .xy, depth in .z, hasMotion in .w]]>
</description>
    <properties>
        <countedObject  name="postEffectList" />
        <camera  name="camera" />
        <target  name="finalDesc" />
        <float4  name="viewport" />
        <string  name="drawAgents" />
        <float  name="shutterOpenFraction" />
    </properties>
    <values>
<float4 name="viewport" value="0.000000,0.000000,1.000000,1.000000"  />
<string name="drawAgents" value="RealizeBoxAgent,SwapAgent,TextureAgent,OGSMayaNodeInstanceAgent,AttributeFilterAgent,MayaLODAgent,DrawAgent"  />
<float name="shutterOpenFraction" value="0.200000"  />
    </values>
    <outputs>
        <target  name="output" />
    </outputs>
    <parametershare>
    </parametershare>
    <implementation render="OGS" language="ScriptInterpreter" version="0.1" >
        <scriptCommands>
            <Call name="SetPassSemantic" arg0="motionVectorPass" arg1="TRUE" />
            <AcquireTarget name="localBuffer" format="EFORMAT_R32G32B32A32_FLOAT" size="@finalDesc.size" relSize="1.0,1.0" msaa="0" />
            <AcquireTarget name="localDepth" format="EFORMAT_D24S8" size="@finalDesc.size" relSize="1.0,1.0" msaa="0" />
            <SetCamera value="@camera" />
            <SetFragmentEffect name="MotionVector" path="mayaMotionSurface" />
            <SetEffectParameter effect="MotionVector" name="shutterOpenFraction" value="@shutterOpenFraction" />
            <Declare name="localState" type="stateSetter" />
            <SetStateCommand commandName="SetStateParameter" name="localState" parameter="SetBlendEnable" value="false" index="0" />
            <SetStateCommand commandName="CommitNewState" name="localState" />
            <SetTarget index="0" value="localBuffer" />
            <SetDepthStencil value="localDepth" />
            <SetViewport value="@viewport" />
            <Clear color="0.0,0.0,0.0,0.0" depth="1.0" stencil="0" />
            <Render name="@postEffectList" />
            <SetParameter name="@output" value="localBuffer" />
            <SetStateCommand commandName="RestorePreviousState" name="localState" />
            <RestoreOverrideEffect />
            <Call name="SetPassSemantic" arg0="motionVectorPass" arg1="FALSE" />
        </scriptCommands>
    </implementation>
</fragment>

