<!--
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_MotionBlurPass" name="maya_MotionBlurPass" type="sceneEffect" class="ScriptFragment" version="1.0" feature_level="30" >
    <description>
<![CDATA[
High Quality MotionBlur Blending pass]]>
</description>
    <properties>
        <target  name="final" />
        <target  name="finalDesc" />
        <target  name="input" />
        <target  name="currentVelocity" />
        <target  name="sourceVelocity" />
        <bool  name="useQuadraticMotionBlur" />
        <float  name="shutterOpenFraction" />
        <float  name="zThreshold" />
        <int  name="blurStepCount" />
        <float  name="motionFadeAmt" />
        <float  name="motionFadeEmphasis" />
        <float4  name="motionFadeTint" />
        <bool  name="motionBlurDebugOn" />
    </properties>
    <values>
<bool name="useQuadraticMotionBlur" value="false"  />
<float name="shutterOpenFraction" value="1.000000"  />
<float name="zThreshold" value="0.080000"  />
<int name="blurStepCount" value="15"  />
<float name="motionFadeAmt" value="0.000000"  />
<float name="motionFadeEmphasis" value="0.000000"  />
<float4 name="motionFadeTint" value="1.000000,1.000000,1.000000,1.000000"  />
<bool name="motionBlurDebugOn" value="false"  />
    </values>
    <outputs>
        <target  name="output" />
    </outputs>
    <parametershare>
    </parametershare>
    <implementation render="OGS" language="ScriptInterpreter" version="0.1" >
        <scriptCommands>
            <AssignTarget destName="motionBlurOut" srcName="@final" format="@finalDesc" />
            <AcquireTarget name="::g_currentScene" format="@finalDesc.format" size="@finalDesc.size" relSize="1.0, 1.0" msaa="0" />
            <SetViewport value="0.0, 0.0, 1.0, 1.0" />
            <SetTarget index="0" value="motionBlurOut" />
            <SetFragmentEffect name="MotionBlurEffect" path="mayaLinearMotionBlur" />
            <SetTexture effect="MotionBlurEffect" name="currentScene" value="" texture="@input" />
            <SetEffectParameter effect="MotionBlurEffect" name="currentSceneSampler" value="LinearClamp" />
            <SetTexture effect="MotionBlurEffect" name="currentVelocity" value="" texture="@currentVelocity" />
            <SetEffectParameter effect="MotionBlurEffect" name="currentVelocitySampler" value="LinearClamp" />
            <SetTexture effect="MotionBlurEffect" name="sourceVelocity" value="" texture="@sourceVelocity" />
            <SetEffectParameter effect="MotionBlurEffect" name="sourceVelocitySampler" value="LinearClamp" />
            <SetEffectParameter effect="MotionBlurEffect" name="shutterOpenFraction" value="@shutterOpenFraction" />
            <SetEffectParameter effect="MotionBlurEffect" name="zThreshold" value="@zThreshold" />
            <SetEffectParameter effect="MotionBlurEffect" name="blurStepCount" value="@blurStepCount" />
            <Render name="Quad" />
            <SetTexture effect="MotionBlurEffect" name="currentScene" value="" texture="" />
            <SetTexture effect="MotionBlurEffect" name="currentVelocity" value="" texture="" />
            <SetTexture effect="MotionBlurEffect" name="sourceVelocity" value="" texture="" />
            <SetParameter name="@output" value="motionBlurOut" />
            <RestoreOverrideEffect />
        </scriptCommands>
    </implementation>
</fragment>

