ÿþ<?xml version="1.0" encoding="UTF-16" standalone="no"?> <fxstudio_project fileversion="3" buildversion="1.7.202.1100" originalpath="F:\devrel\SDK\MEDIA\projects\blendLayers.fxproj"><system_settings><searchpaths><texture><path name="F:\devrel\SDK\MEDIA\projects\"/><path name="E:\sw\devrel\SDK\MEDIA\projects\"/><path name="C:\sw\devrel\SDK\MEDIA\fxcomposer\"/><path name="C:\sw\devrel\SDK\MEDIA\models\"/></texture><shader><path name="F:\devrel\SDK\MEDIA\projects\"/><path name="E:\sw\devrel\SDK\MEDIA\projects\"/><path name="C:\sw\devrel\SDK\MEDIA\fxcomposer\"/><path name="C:\sw\devrel\SDK\MEDIA\models\"/></shader><model><path name="F:\devrel\SDK\MEDIA\projects\"/><path name="E:\sw\devrel\SDK\MEDIA\projects\"/><path name="C:\sw\devrel\SDK\MEDIA\fxcomposer\"/><path name="C:\sw\devrel\SDK\MEDIA\models\"/></model></searchpaths></system_settings><scene objectid="1" sceneticks="100"><parameterlist objectid="2"><connectionparameter objectid="3" name="World" semantic="WORLD" type="5" rows="4" columns="4" handle="65077624" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="4.944442e-039,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="View" semantic="VIEW" type="5" rows="4" columns="4" handle="3513848" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="4.948075e-039,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="8.085965e-001,3.165986e-001,4.959203e-001,0.000000e+000,2.831221e-007,8.428805e-001,-5.381007e-001,0.000000e+000,-5.883635e-001,4.351065e-001,6.815502e-001,0.000000e+000,5.719543e-003,1.351550e-001,2.581589e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Projection" semantic="PROJECTION" type="5" rows="4" columns="4" handle="3531648" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="4.947402e-039,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.275299e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.191754e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.003922e+000,1.000000e+000,0.000000e+000,0.000000e+000,-1.852351e-002,0.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Scene Center" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="65055136" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="-8.289104e-001, 5.729007e-001, -8.760278e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Scene Extents" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="65065088" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="2.522599e+000, 1.442223e+000, 1.876028e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Screen Size" semantic="UNKNOWN" type="2" rows="0" columns="0" handle="65053056" animated="0" numkeys="1" defaulttype="float2" defaultvalue="2.560000e+002, 2.560000e+002"><keys><key num="0" value="4.850000e+002, 5.190000e+002"/></keys></connectionparameter><connectionparameter objectid="3" name="Show Lights" semantic="UNKNOWN" type="4" rows="0" columns="0" handle="65074976" animated="0" numkeys="1" defaulttype="bool" defaultvalue="1"><keys><key num="0" value="1"/></keys></connectionparameter><connectionparameter objectid="3" name="Show Cameras" semantic="UNKNOWN" type="4" rows="0" columns="0" handle="65053392" animated="0" numkeys="1" defaulttype="bool" defaultvalue="1"><keys><key num="0" value="1"/></keys></connectionparameter><connectionparameter objectid="3" name="Show Text" semantic="UNKNOWN" type="4" rows="0" columns="0" handle="65055416" animated="0" numkeys="1" defaulttype="bool" defaultvalue="1"><keys><key num="0" value="1"/></keys></connectionparameter></parameterlist><material objectid="4" name="post_bloom" handle="213" effect="F:\devrel\SDK\MEDIA\HLSL\post_bloom.fx"><parameterlist objectid="2"><connectionparameter objectid="3" name="ClearColor" semantic="DIFFUSE" type="0" rows="0" columns="0" handle="102475592" animated="1" numkeys="1" defaulttype="float4" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="ClearDepth" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99251760" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Script" semantic="STANDARDSGLOBAL" type="3" rows="0" columns="0" handle="99600392" animated="1" numkeys="1" defaulttype="float" defaultvalue="8.000000e-001"><keys><key num="0" value="8.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="SCRIPT" value="Technique=Bloom;"/><annotation nametype="9" valuetype="9" name="SCRIPTCLASS" value="SCENE"/><annotation nametype="9" valuetype="9" name="SCRIPTORDER" value="POSTPROCESS"/><annotation nametype="9" valuetype="9" name="SCRIPTOUTPUT" value="COLOR"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="SceneIntensity" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99250680" animated="1" numkeys="1" defaulttype="float" defaultvalue="5.000000e-001"><keys><key num="0" value="5.000000e-001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="2.000000e+000"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Scene intensity"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-001"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="GlowIntensity" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="87441952" animated="1" numkeys="1" defaulttype="float" defaultvalue="5.000000e-001"><keys><key num="0" value="5.000000e-001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="2.000000e+000"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Glow intensity"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-001"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="HighlightThreshold" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99360224" animated="1" numkeys="1" defaulttype="float" defaultvalue="9.000000e-001"><keys><key num="0" value="9.000000e-001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.000000e+000"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Highlight threshold"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-001"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="HighlightIntensity" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="87387120" animated="1" numkeys="1" defaulttype="float" defaultvalue="5.000000e-001"><keys><key num="0" value="5.000000e-001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.000000e+001"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Highlight intensity"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-001"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="WindowSize" semantic="VIEWPORTPIXELSIZE" type="2" rows="0" columns="0" handle="99260432" animated="1" numkeys="1" defaulttype="float2" defaultvalue="0.000000e+000, 0.000000e+000"><keys><key num="0" value="6.400000e+001, 6.400000e+001"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="downsampleScale" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99344128" animated="1" numkeys="1" defaulttype="float" defaultvalue="2.500000e-001"><keys><key num="0" value="2.500000e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="BlurWidth" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99599776" animated="1" numkeys="1" defaulttype="float" defaultvalue="2.000000e+000"><keys><key num="0" value="2.000000e+000"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.000000e+001"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Blur width"/><annotation nametype="9" valuetype="3" name="UISTEP" value="5.000000e-001"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="SceneMap" semantic="RENDERCOLORTARGET" type="6" rows="0" columns="0" handle="99354936" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value=""/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="X8R8G8B8"/><annotation nametype="9" valuetype="8" name="MIPLEVELS" value="1"/><annotation nametype="9" valuetype="2" name="VIEWPORTRATIO" value="1.000000e+000, 1.000000e+000"/></connectionparameter><connectionparameter objectid="3" name="DepthMap" semantic="RENDERDEPTHSTENCILTARGET" type="6" rows="0" columns="0" handle="99341232" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value=""/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="D24S8"/><annotation nametype="9" valuetype="2" name="VIEWPORTRATIO" value="1.000000e+000, 1.000000e+000"/></connectionparameter><connectionparameter objectid="3" name="SceneSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="87418240" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="DownsampleMap" semantic="RENDERCOLORTARGET" type="6" rows="0" columns="0" handle="99613000" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value=""/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="A8R8G8B8"/><annotation nametype="9" valuetype="8" name="MIPLEVELS" value="1"/><annotation nametype="9" valuetype="2" name="VIEWPORTRATIO" value="2.500000e-001, 2.500000e-001"/></connectionparameter><connectionparameter objectid="3" name="DownsampleSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="99311664" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="HBlurMap" semantic="RENDERCOLORTARGET" type="6" rows="0" columns="0" handle="99339592" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value=""/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="A8R8G8B8"/><annotation nametype="9" valuetype="8" name="MIPLEVELS" value="1"/><annotation nametype="9" valuetype="2" name="VIEWPORTRATIO" value="2.500000e-001, 2.500000e-001"/></connectionparameter><connectionparameter objectid="3" name="HBlurSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="87341128" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="FinalBlurMap" semantic="RENDERCOLORTARGET" type="6" rows="0" columns="0" handle="87433576" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value=""/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="A8R8G8B8"/><annotation nametype="9" valuetype="8" name="MIPLEVELS" value="1"/><annotation nametype="9" valuetype="2" name="VIEWPORTRATIO" value="2.500000e-001, 2.500000e-001"/></connectionparameter><connectionparameter objectid="3" name="FinalBlurSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="87283768" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="weights7" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="87328584" animated="1" numkeys="1" defaulttype="float" defaultvalue="5.000000e-002"><keys><key num="0" value="5.000000e-002"/></keys></connectionparameter><connectionparameter objectid="3" name="weights7_Central" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99460424" animated="1" numkeys="1" defaulttype="float" defaultvalue="0.000000e+000"><keys><key num="0" value="0.000000e+000"/></keys></connectionparameter></parameterlist><ScriptParams num="0" value="0.000000e+000"><parameterlist objectid="2"/></ScriptParams></material><material objectid="4" name="post_blendOverlay" handle="220" effect="F:\devrel\SDK\MEDIA\HLSL\post_blendOverlay.fx"><parameterlist objectid="2"><connectionparameter objectid="3" name="QuadTexOffset" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="101148992" animated="1" numkeys="1" defaulttype="float" defaultvalue="5.000000e-001"><keys><key num="0" value="5.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="QuadScreenSize" semantic="VIEWPORTPIXELSIZE" type="2" rows="0" columns="0" handle="87087744" animated="1" numkeys="1" defaulttype="float2" defaultvalue="0.000000e+000, 0.000000e+000"><keys><key num="0" value="6.400000e+001, 6.400000e+001"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="Script" semantic="STANDARDSGLOBAL" type="3" rows="0" columns="0" handle="100159384" animated="1" numkeys="1" defaulttype="float" defaultvalue="8.000000e-001"><keys><key num="0" value="8.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="SCRIPT" value="Technique=Technique?over:base:blend:average:darken:lighten:multiply:add:subtract:difference:inverseDifference:exclusion:screen:colorBurn:colorDodge:overlay:softLight:hardLight"/><annotation nametype="9" valuetype="9" name="SCRIPTCLASS" value="SCENE"/><annotation nametype="9" valuetype="9" name="SCRIPTORDER" value="POSTPROCESS"/><annotation nametype="9" valuetype="9" name="SCRIPTOUTPUT" value="COLOR"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="ClearColor" semantic="DIFFUSE" type="0" rows="0" columns="0" handle="99667472" animated="1" numkeys="1" defaulttype="float4" defaultvalue="3.000000e-001, 3.000000e-001, 3.000000e-001, 1.000000e+000"><keys><key num="0" value="3.000000e-001, 3.000000e-001, 3.000000e-001, 1.000000e+000"/></keys><annotation nametype="9" valuetype="9" name="UINAME" value="Background"/></connectionparameter><connectionparameter objectid="3" name="ClearDepth" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="87379064" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="1.000000e+000"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="SceneTexture" semantic="RENDERCOLORTARGET" type="6" rows="0" columns="0" handle="87076672" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value=""/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="A8R8G8B8"/><annotation nametype="9" valuetype="8" name="MIPLEVELS" value="1"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/><annotation nametype="9" valuetype="2" name="VIEWPORTRATIO" value="1.000000e+000, 1.000000e+000"/></connectionparameter><connectionparameter objectid="3" name="SceneSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="87478104" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="DepthBuffer" semantic="RENDERDEPTHSTENCILTARGET" type="6" rows="0" columns="0" handle="99255512" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value=""/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="D24S8"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/><annotation nametype="9" valuetype="2" name="VIEWPORTRATIO" value="1.000000e+000, 1.000000e+000"/></connectionparameter><connectionparameter objectid="3" name="BlendImg" semantic="UNKNOWN" type="6" rows="0" columns="0" handle="87381712" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value="C:\Program Files\NVIDIA Corporation\NVIDIA FX Composer\MEDIA\textures\2D\Blended.dds"/></keys><annotation nametype="9" valuetype="9" name="RESOURCENAME" value="Blended.dds"/><annotation nametype="9" valuetype="9" name="RESOURCETYPE" value="2D"/></connectionparameter><connectionparameter objectid="3" name="BlendImgSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="87224488" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="Opacity" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99434656" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="1.000000e+000"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.000000e+000"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Blend Opacity"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-002"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter></parameterlist><ScriptParams nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"><parameterlist objectid="2"><connectionparameter objectid="3" name="Technique" semantic="UNKNOWN" type="22" rows="0" columns="0" handle="87289344" animated="0" numkeys="0"><enum objectid="5" selection="0"><string objectid="6" text="over"/><string objectid="6" text="base"/><string objectid="6" text="blend"/><string objectid="6" text="average"/><string objectid="6" text="darken"/><string objectid="6" text="lighten"/><string objectid="6" text="multiply"/><string objectid="6" text="add"/><string objectid="6" text="subtract"/><string objectid="6" text="difference"/><string objectid="6" text="inverseDifference"/><string objectid="6" text="exclusion"/><string objectid="6" text="screen"/><string objectid="6" text="colorBurn"/><string objectid="6" text="colorDodge"/><string objectid="6" text="overlay"/><string objectid="6" text="softLight"/><string objectid="6" text="hardLight"/></enum></connectionparameter></parameterlist></ScriptParams></material><material objectid="4" name="pre_texture_3_2" handle="225" effect="F:\devrel\SDK\MEDIA\HLSL\pre_texture.fx"><parameterlist objectid="2"><connectionparameter objectid="3" name="QuadTexOffset" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="100264160" animated="1" numkeys="1" defaulttype="float" defaultvalue="5.000000e-001"><keys><key num="0" value="5.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="QuadScreenSize" semantic="VIEWPORTPIXELSIZE" type="2" rows="0" columns="0" handle="99213672" animated="1" numkeys="1" defaulttype="float2" defaultvalue="0.000000e+000, 0.000000e+000"><keys><key num="0" value="6.400000e+001, 6.400000e+001"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="Script" semantic="STANDARDSGLOBAL" type="3" rows="0" columns="0" handle="99787688" animated="1" numkeys="1" defaulttype="float" defaultvalue="8.000000e-001"><keys><key num="0" value="8.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="SCRIPT" value="Technique=TexBg;"/><annotation nametype="9" valuetype="9" name="SCRIPTCLASS" value="SCENE"/><annotation nametype="9" valuetype="9" name="SCRIPTORDER" value="PREPROCESS"/><annotation nametype="9" valuetype="9" name="SCRIPTOUTPUT" value="COLOR"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="ClearDepth" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99787040" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="1.000000e+000"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="BgTexture" semantic="UNKNOWN" type="6" rows="0" columns="0" handle="99376360" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value="C:\Program Files\NVIDIA Corporation\NVIDIA FX Composer\MEDIA\textures\2D\Veggie.dds"/></keys><annotation nametype="9" valuetype="9" name="RESOURCENAME" value="Veggie.dds"/><annotation nametype="9" valuetype="9" name="RESOURCETYPE" value="2D"/><annotation nametype="9" valuetype="9" name="UINAME" value="Background Texture"/></connectionparameter><connectionparameter objectid="3" name="BgSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="102474936" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter></parameterlist><ScriptParams num="0" value="UNKNOWN"><parameterlist objectid="2"/></ScriptParams></material><material objectid="4" name="plasticQ" handle="228" effect="F:\devrel\SDK\MEDIA\HLSL\plasticQ.fx"><parameterlist objectid="2"><connectionparameter objectid="3" name="Script" semantic="STANDARDSGLOBAL" type="3" rows="0" columns="0" handle="99657064" animated="1" numkeys="1" defaulttype="float" defaultvalue="8.000000e-001"><keys><key num="0" value="8.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="SCRIPT" value="Technique=ps11;"/><annotation nametype="9" valuetype="9" name="SCRIPTCLASS" value="OBJECT"/><annotation nametype="9" valuetype="9" name="SCRIPTORDER" value="STANDARD"/><annotation nametype="9" valuetype="9" name="SCRIPTOUTPUT" value="COLOR"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="WorldIT" semantic="WORLDINVERSETRANSPOSE" type="5" rows="4" columns="4" handle="99656608" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="WorldViewProj" semantic="WORLDVIEWPROJECTION" type="5" rows="4" columns="4" handle="99656296" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,"><keys><key num="0" value="1.732051e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.732051e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.012658e+000,1.000000e+000,0.000000e+000,0.000000e+000,2.481013e+000,2.500000e+000,"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="World" semantic="WORLD" type="5" rows="4" columns="4" handle="99236200" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="ViewI" semantic="VIEWINVERSE" type="5" rows="4" columns="4" handle="99235640" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,-2.500000e+000,1.000000e+000,"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="LightPos" semantic="POSITION" type="1" rows="0" columns="0" handle="99235160" animated="1" numkeys="1" defaulttype="float3" defaultvalue="-1.000000e+001, 1.000000e+001, -1.000000e+001"><keys><key num="0" value="-1.000000e+001, 1.000000e+001, -1.000000e+001"/></keys><annotation nametype="9" valuetype="9" name="OBJECT" value="POINTLIGHT"/><annotation nametype="9" valuetype="9" name="SPACE" value="WORLD"/><calculator objectid="7" name="Point Light : POSITION"><nvcalculator_load objectid="8" scenehandle="67" paramname="Object Position" regdest="1" constantvalue="UNKNOWN" constanttype="2147483647" constantrows="0" constantcolumns="0"/><nvcalculator_load objectid="8" scenehandle="70" paramname="Current Transform" regdest="2" constantvalue="UNKNOWN" constanttype="2147483647" constantrows="0" constantcolumns="0"/><nvcalculator_mul objectid="9" regdest="3" reg1="1" reg2="2" op="0"/><nvcalculator_mov objectid="10" type="1" rows="0" columns="0" regdest="0" regsource="3"/></calculator></connectionparameter><connectionparameter objectid="3" name="LightColor" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99333688" animated="1" numkeys="1" defaulttype="float3" defaultvalue="1.000000e+000, 1.000000e+000, 1.000000e+000"><keys><key num="0" value="1.000000e+000, 1.000000e+000, 1.000000e+000"/></keys><annotation nametype="9" valuetype="9" name="UINAME" value="Light Color"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="COLOR"/></connectionparameter><connectionparameter objectid="3" name="LightIntensity" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99743080" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="3.320000e+001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.000000e+003"/><annotation nametype="9" valuetype="3" name="UIMIN" value="1.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Intensity"/><annotation nametype="9" valuetype="3" name="UISTEP" value="2.000000e-001"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="AmbiColor" semantic="AMBIENT" type="1" rows="0" columns="0" handle="87373584" animated="1" numkeys="1" defaulttype="float3" defaultvalue="2.000000e-001, 2.000000e-001, 2.000000e-001"><keys><key num="0" value="2.000000e-001, 2.000000e-001, 2.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="UINAME" value="Ambient Light Color"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="COLOR"/></connectionparameter><connectionparameter objectid="3" name="SurfColor" semantic="DIFFUSE" type="1" rows="0" columns="0" handle="99332792" animated="1" numkeys="1" defaulttype="float3" defaultvalue="9.000000e-001, 5.000000e-001, 9.000000e-001"><keys><key num="0" value="9.000000e-001, 5.000000e-001, 9.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="UINAME" value="Surface Color"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="COLOR"/></connectionparameter><connectionparameter objectid="3" name="SpecExpon" semantic="SPECULARPOWER" type="3" rows="0" columns="0" handle="99155048" animated="1" numkeys="1" defaulttype="float" defaultvalue="2.200000e+001"><keys><key num="0" value="2.200000e+001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.280000e+002"/><annotation nametype="9" valuetype="3" name="UIMIN" value="1.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="specular power"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e+000"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter></parameterlist><ScriptParams nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"><parameterlist objectid="2"/></ScriptParams></material><node objectid="11" name="Teapot" materialoverride="228" handle="65" worldskin="0"><teapot objectid="12" name=""><parameterlist objectid="2"/></teapot><texgen objectid="13" name=""><parameterlist objectid="2"><connectionparameter objectid="3" name="Coord Set" semantic="UNKNOWN" type="7" rows="0" columns="0" handle="100221984" animated="0" numkeys="1" defaulttype="dword" defaultvalue="0"><keys><key num="0" value="0"/></keys></connectionparameter></parameterlist></texgen><meshmender objectid="14" name=""><parameterlist objectid="2"/></meshmender></node><node objectid="15" name="Default Scene Camera" handle="66" target="4294967295" defaultcamera="1" activecamera="1"><parameterlist objectid="2"><connectionparameter objectid="3" name="Focal Length" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99758704" animated="0" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="2.673329e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Field of View" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="99757696" animated="0" numkeys="1" defaulttype="float" defaultvalue="8.000000e+001"><keys><key num="0" value="8.000000e+001"/></keys></connectionparameter><connectionparameter objectid="3" name="Depth Range" semantic="UNKNOWN" type="2" rows="0" columns="0" handle="99154264" animated="0" numkeys="1" defaulttype="float2" defaultvalue="0.000000e+000, 1.000000e+000"><keys><key num="0" value="1.845288e-002, 4.723937e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Look Direction" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99332376" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="4.959204e-001, -5.381007e-001, 6.815503e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Up Direction" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99646024" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 1.000000e+000, 0.000000e+000"><keys><key num="0" value="3.165986e-001, 8.428806e-001, 4.351065e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Lookat Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99227160" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="8.085965e-001,3.165986e-001,4.959203e-001,0.000000e+000,2.831221e-007,8.428805e-001,-5.381007e-001,0.000000e+000,-5.883635e-001,4.351065e-001,6.815502e-001,0.000000e+000,5.719543e-003,1.351550e-001,2.581589e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Camera Position" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99495872" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, -1.000000e+000"><keys><key num="0" value="-1.327677e+000, 1.275235e+000, -1.814924e+000"/></keys></connectionparameter></parameterlist></node><node objectid="16" name="Point Light" handle="67" type="1"><parameterlist objectid="2"><connectionparameter objectid="3" name="Diffuse" semantic="DIFFUSE" type="0" rows="0" columns="0" handle="100193592" animated="1" numkeys="1" defaulttype="float4" defaultvalue="1.000000e+000, 1.000000e+000, 1.000000e+000, 1.000000e+000"><keys><key num="0" value="1.000000e+000, 1.000000e+000, 1.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Specular" semantic="SPECULAR" type="0" rows="0" columns="0" handle="100193216" animated="1" numkeys="1" defaulttype="float4" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="2.000000e-001, 2.000000e-001, 2.000000e-001, 2.000000e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Ambient" semantic="AMBIENT" type="0" rows="0" columns="0" handle="100192872" animated="1" numkeys="1" defaulttype="float4" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="1.500000e-001, 1.500000e-001, 1.500000e-001, 1.500000e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Exponent" semantic="SPECULARPOWER" type="3" rows="0" columns="0" handle="100194288" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="3.000000e+001"/></keys></connectionparameter><connectionparameter objectid="3" name="Object Position" semantic="POSITION" type="1" rows="0" columns="0" handle="100192672" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, 0.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Range" semantic="LIGHTRANGE" type="3" rows="0" columns="0" handle="100205496" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="0.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Attenuation" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="100194456" animated="1" numkeys="1" defaulttype="float3" defaultvalue="1.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="1.000000e+000, 0.000000e+000, 0.000000e+000"/></keys></connectionparameter></parameterlist></node><nvtransformlink objectid="17" parent="0" handle="64" name="Root Transform" animated="1" separable="0"><nodes/><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="87364248" animated="1" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Reference Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99355616" animated="1" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Rotation" semantic="UNKNOWN" type="25" rows="0" columns="0" handle="100981336" animated="1" numkeys="1" defaulttype="quat" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Translation" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99999712" animated="1" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, 0.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Scale" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="87084280" animated="1" numkeys="1" defaulttype="float3" defaultvalue="1.000000e+000, 1.000000e+000, 1.000000e+000"><keys><key num="0" value="1.000000e+000, 1.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Current Transform" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="87116360" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter></parameterlist><nvtransformlink objectid="17" parent="64" handle="68" name="Object Transform" animated="1" separable="1"><nodes><node handle="65"/></nodes><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99784496" animated="1" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Reference Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99785096" animated="1" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Rotation" semantic="UNKNOWN" type="25" rows="0" columns="0" handle="99745240" animated="1" numkeys="1" defaulttype="quat" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Translation" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99745952" animated="1" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, 0.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Scale" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99746528" animated="1" numkeys="1" defaulttype="float3" defaultvalue="1.000000e+000, 1.000000e+000, 1.000000e+000"><keys><key num="0" value="1.000000e+000, 1.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Current Transform" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99744640" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter></parameterlist></nvtransformlink><nvtransformlink objectid="17" parent="64" handle="69" name="Default Camera Transform" animated="0" separable="1"><nodes><node handle="66"/></nodes><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99280944" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Reference Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99280344" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Rotation" semantic="UNKNOWN" type="25" rows="0" columns="0" handle="99279032" animated="0" numkeys="1" defaulttype="quat" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="2.665360e-001, 2.969570e-001, -8.670802e-002, 9.128290e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Translation" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99747832" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="-1.327677e+000, 1.275235e+000, -1.814924e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Scale" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99602176" animated="0" numkeys="1" defaulttype="float3" defaultvalue="1.000000e+000, 1.000000e+000, 1.000000e+000"><keys><key num="0" value="1.000000e+000, 1.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Current Transform" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="99279632" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="8.085965e-001,2.682209e-007,-5.883635e-001,0.000000e+000,3.165986e-001,8.428806e-001,4.351065e-001,0.000000e+000,4.959203e-001,-5.381007e-001,6.815502e-001,0.000000e+000,-1.327677e+000,1.275235e+000,-1.814924e+000,1.000000e+000,"/></keys></connectionparameter></parameterlist></nvtransformlink><nvtransformlink objectid="17" parent="64" handle="70" name="light transform" animated="1" separable="1"><nodes><node handle="67"/></nodes><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="101649456" animated="1" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Reference Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="101648856" animated="1" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Rotation" semantic="UNKNOWN" type="25" rows="0" columns="0" handle="101647544" animated="1" numkeys="1" defaulttype="quat" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="-1.076863e-001, 6.009879e-001, 0.000000e+000, 7.919705e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Translation" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="101646880" animated="1" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="-3.252424e+000, 1.493148e+000, -2.232643e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Scale" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="99281936" animated="1" numkeys="1" defaulttype="float3" defaultvalue="1.000000e+000, 1.000000e+000, 1.000000e+000"><keys><key num="0" value="1.000000e+000, 1.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Current Transform" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="101648144" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,1.000000e+000,"><keys><key num="0" value="2.776271e-001,-1.294363e-001,-9.519294e-001,0.000000e+000,-1.294363e-001,9.768073e-001,-1.705687e-001,0.000000e+000,9.519294e-001,1.705687e-001,2.544343e-001,0.000000e+000,-3.252424e+000,1.493148e+000,-2.232643e+000,1.000000e+000,"/></keys></connectionparameter></parameterlist></nvtransformlink></nvtransformlink><scenematerials scenematerial="220"/><scenematerials scenematerial="213"/><scenematerials scenematerial="225"/></scene><objects><object objectid="5" objectguid="106012044_21786_18731_137_118_191_235_4_148_207_152" objectname="NVEnum Object" progid="nvsys.NVEnum.1"/><object objectid="7" objectguid="687344697_14784_17624_175_112_25_78_110_206_178_195" objectname="NVCalculator Object" progid="nvsys.NVCalculator.1"/><object objectid="6" objectguid="993927070_6119_19036_183_189_36_70_90_161_39_240" objectname="NVString Object" progid="nvsys.NVString.1"/><object objectid="3" objectguid="1178903711_54835_17816_162_225_77_133_92_204_97_107" objectname="NVConnectionParameter Object" progid="nvsys.NVConnectionParameter.1"/><object objectid="11" objectguid="1335965045_63750_16786_166_174_116_14_177_170_26_82" objectname="NVGeoPipe Object" progid="nvsys.NVGeoPipe.1"/><object objectid="1" objectguid="1394174672_42515_16399_189_63_62_31_182_9_209_60" objectname="NVScene Object" progid="nvsys.NVScene.1"/><object objectid="4" objectguid="1401340335_59252_17807_172_96_248_52_119_74_181_173" objectname="NVMaterial Object" progid="nvsys.NVMaterial.1"/><object objectid="15" objectguid="1675712286_15683_20022_149_108_42_250_122_123_231_64" objectname="NVCamera Object" progid="nvsys.NVCamera.1"/><object objectid="12" objectguid="1678389611_25173_17222_180_188_41_169_29_0_144_170" objectname="NVGeoPipeObject_Teapot Object" progid="nvrenderdevice9.Teapot.1"/><object objectid="10" objectguid="1755565597_56309_18722_149_152_96_3_18_125_126_123" objectname="NVCalculator_Assign Object" progid="nvsys.NVCalculator_Assign.1"/><object objectid="17" objectguid="2342579002_10168_19906_178_150_26_144_17_106_220_182" objectname="NVTransformLink Object" progid="nvsys.NVTransformLink.1"/><object objectid="14" objectguid="2516468428_38854_16959_155_101_192_176_42_10_71_202" objectname="NVGeoPipeObject_MeshMender Object" progid="nvsys.NVGeoPipeObject_MeshMender.1"/><object objectid="8" objectguid="3098681227_22869_16810_191_237_249_13_61_143_28_123" objectname="NVCalculator_Load Object" progid="nvsys.NVCalculator_Load.1"/><object objectid="16" objectguid="3220590291_58699_18805_154_8_29_13_205_177_47_217" objectname="NVLight_Point Object" progid="nvsys.NVLight_Point.1"/><object objectid="2" objectguid="3275223899_28196_19999_162_153_111_232_35_119_165_23" objectname="NVParameterList Object" progid="nvsys.NVParameterList.1"/><object objectid="13" objectguid="4057994036_6371_17546_152_57_13_140_51_98_219_190" objectname="NVGeoPipeObject_TexGen Object" progid="nvsys.NVGeoPipeObject_TexGen.1"/><object objectid="9" objectguid="4162726501_8958_17137_170_77_131_38_3_90_246_20" objectname="NVCalculator_Mul Object" progid="nvsys.NVCalculator_Mul.1"/></objects><media_objects><effect path="F:\devrel\SDK\MEDIA\HLSL\post_bloom.fx"><![CDATA[/*********************************************************************NVMH3**** File: $Id: Scene_bloom.fx Copyright NVIDIA Corporation 2004 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Comments: Glow/bloom post processing effect Down-samples scene first for performance (reduces size by 4) Thresholds luminance for extra highlights Separable filter, filters in X, then in Y Takes advantage of bilinear filtering for blur ******************************************************************************/ float4 ClearColor : DIFFUSE = { 0.0f, 0.0f, 0.0f, 1.0f}; float ClearDepth = 1.0f; float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "scene"; string ScriptOrder = "postprocess"; string ScriptOutput = "color"; // We just call a script in the main technique. string Script = "Technique=Bloom;"; > = 0.8; /////////////////////////////////////////////////////////// /////////////////////////////////////// Tweakables //////// /////////////////////////////////////////////////////////// float SceneIntensity < string UIName = "Scene intensity"; string UIWidget = "slider"; float UIMin = 0.0f; float UIMax = 2.0f; float UIStep = 0.1f; > = 0.5f; float GlowIntensity < string UIName = "Glow intensity"; string UIWidget = "slider"; float UIMin = 0.0f; float UIMax = 2.0f; float UIStep = 0.1f; > = 0.5f; float HighlightThreshold < string UIName = "Highlight threshold"; string UIWidget = "slider"; float UIMin = 0.0f; float UIMax = 1.0f; float UIStep = 0.1f; > = 0.9f; float HighlightIntensity < string UIName = "Highlight intensity"; string UIWidget = "slider"; float UIMin = 0.0f; float UIMax = 10.0f; float UIStep = 0.1f; > = 0.5f; /////////////////////////////////////////////////////////// ///////////////////////////// Render-to-Texture Data ////// /////////////////////////////////////////////////////////// float2 WindowSize : VIEWPORTPIXELSIZE < string UIWidget = "none"; >; float downsampleScale = 0.25; float BlurWidth < string UIName = "Blur width"; string UIWidget = "slider"; float UIMin = 0.0f; float UIMax = 10.0f; float UIStep = 0.5f; > = 2.0f; texture SceneMap : RENDERCOLORTARGET < float2 ViewportRatio = { 1.0, 1.0 }; int MIPLEVELS = 1; string format = "X8R8G8B8"; >; texture DepthMap : RENDERDEPTHSTENCILTARGET < float2 ViewportRatio = { 1.0, 1.0 }; string format = "D24S8"; >; sampler SceneSampler = sampler_state { texture = <SceneMap>; AddressU = CLAMP; AddressV = CLAMP; AddressW = CLAMP; MIPFILTER = NONE; MINFILTER = LINEAR; MAGFILTER = LINEAR; }; texture DownsampleMap : RENDERCOLORTARGET < float2 ViewportRatio = { 0.25, 0.25 }; int MIPLEVELS = 1; string format = "A8R8G8B8"; >; sampler DownsampleSampler = sampler_state { texture = <DownsampleMap>; AddressU = CLAMP; AddressV = CLAMP; AddressW = CLAMP; MIPFILTER = NONE; MINFILTER = LINEAR; MAGFILTER = LINEAR; }; texture HBlurMap : RENDERCOLORTARGET < float2 ViewportRatio = { 0.25, 0.25 }; int MIPLEVELS = 1; string format = "A8R8G8B8"; >; sampler HBlurSampler = sampler_state { texture = <HBlurMap>; AddressU = CLAMP; AddressV = CLAMP; AddressW = CLAMP; MIPFILTER = NONE; MINFILTER = LINEAR; MAGFILTER = LINEAR; }; texture FinalBlurMap : RENDERCOLORTARGET < float2 ViewportRatio = { 0.25, 0.25 }; int MIPLEVELS = 1; string format = "A8R8G8B8"; >; sampler FinalBlurSampler = sampler_state { texture = <FinalBlurMap>; AddressU = CLAMP; AddressV = CLAMP; AddressW = CLAMP; MIPFILTER = NONE; MINFILTER = LINEAR; MAGFILTER = LINEAR; }; /////////////////////////////////////////////////////////// /////////////////////////////////// data structures /////// /////////////////////////////////////////////////////////// struct VS_OUTPUT_BLUR { float4 Position : POSITION; float2 TexCoord[8]: TEXCOORD0; }; struct VS_OUTPUT { float4 Position : POSITION; float2 TexCoord0 : TEXCOORD0; float2 TexCoord1 : TEXCOORD1; }; struct VS_OUTPUT_DOWNSAMPLE { float4 Position : POSITION; float2 TexCoord[4]: TEXCOORD0; }; //////////////////////////////////////////////////////////// ////////////////////////////////// vertex shaders ////////// //////////////////////////////////////////////////////////// // generate texture coordinates to sample 4 neighbours VS_OUTPUT_DOWNSAMPLE VS_Downsample(float4 Position : POSITION, float2 TexCoord : TEXCOORD0) { VS_OUTPUT_DOWNSAMPLE OUT; float2 texelSize = downsampleScale / WindowSize; float2 s = TexCoord; OUT.Position = Position; OUT.TexCoord[0] = s; OUT.TexCoord[1] = s + float2(2, 0)*texelSize; OUT.TexCoord[2] = s + float2(2, 2)*texelSize; OUT.TexCoord[3] = s + float2(0, 2)*texelSize; return OUT; } // generate texcoords for blur VS_OUTPUT_BLUR VS_Blur(float4 Position : POSITION, float2 TexCoord : TEXCOORD0, uniform int nsamples, uniform float2 direction ) { VS_OUTPUT_BLUR OUT = (VS_OUTPUT_BLUR)0; OUT.Position = Position; float2 texelSize = BlurWidth / WindowSize; float2 s = TexCoord - texelSize*(nsamples-1)*0.5*direction; for(int i=0; i<nsamples; i++) { OUT.TexCoord[i] = s + texelSize*i*direction; } return OUT; } VS_OUTPUT VS_Quad(float4 Position : POSITION, float2 TexCoord : TEXCOORD0) { VS_OUTPUT OUT; float2 texelSize = 1.0 / WindowSize; OUT.Position = Position; // don't want bilinear filtering on original scene: OUT.TexCoord0 = TexCoord + texelSize*0.5; OUT.TexCoord1 = TexCoord + texelSize*0.5/downsampleScale; return OUT; } ////////////////////////////////////////////////////// ////////////////////////////////// pixel shaders ///// ////////////////////////////////////////////////////// half luminance(half3 c) { return dot( c, float3(0.3, 0.59, 0.11) ); } // this function should be baked into a texture lookup for performance half highlights(half3 c) { return smoothstep(HighlightThreshold, 1.0, luminance(c.rgb)); } half4 PS_Downsample(VS_OUTPUT_DOWNSAMPLE IN, uniform sampler2D tex) : COLOR { half4 c; #if 0 // sub sampling c = tex2D(tex, IN.TexCoord[0]); #else // box filter c = tex2D(tex, IN.TexCoord[0]) * 0.25; c += tex2D(tex, IN.TexCoord[1]) * 0.25; c += tex2D(tex, IN.TexCoord[2]) * 0.25; c += tex2D(tex, IN.TexCoord[3]) * 0.25; #endif // store hilights in alpha c.a = highlights(c.rgb); return c; } // blur filter weights const half weights7[7] = { 0.05, 0.1, 0.2, 0.3, 0.2, 0.1, 0.05, }; const half weights7_Central[7] = { 0.0, 0.0, 0.2, 0.6, 0.2, 0.0, 0.0, }; // fx doesn't support variable length arrays // otherwise we could generalize this half4 PS_Blur7(VS_OUTPUT_BLUR IN, uniform sampler2D tex, uniform half weight[7] ) : COLOR { half4 c = 0; // this loop will be unrolled by compiler for(int i=0; i<7; i++) { c += tex2D(tex, IN.TexCoord[i]) * weight[i]; } return c; } half4 PS_Display(VS_OUTPUT IN, uniform sampler2D tex) : COLOR { return tex2D(tex, IN.TexCoord1); } half4 PS_Comp(VS_OUTPUT IN, uniform sampler2D sceneSampler, uniform sampler2D blurredSceneSampler) : COLOR { half4 orig = tex2D(sceneSampler, IN.TexCoord0); half4 blur = tex2D(blurredSceneSampler, IN.TexCoord1); return SceneIntensity*orig + GlowIntensity*blur + HighlightIntensity*blur.a; } //////////////////////////////////////////////////////////// /////////////////////////////////////// techniques ///////// //////////////////////////////////////////////////////////// technique Bloom < string Script = "ClearSetDepth=ClearDepth;" "RenderColorTarget=SceneMap;" "RenderDepthStencilTarget=DepthMap;" "ClearSetColor=ClearColor;" "ClearSetDepth=ClearDepth;" "Clear=Color;" "Clear=Depth;" "ScriptSignature=color;" "ScriptExternal=;" "Pass=DownSample;" "Pass=GlowH;" "Pass=GlowV;" "Pass=FinalComp;"; > { pass DownSample < string Script = "RenderColorTarget0=DownsampleMap;" "ClearSetColor=ClearColor;" "Clear=Color;" "Draw=Buffer;"; > { cullmode = none; ZEnable = false; ZWriteEnable = false; VertexShader = compile vs_2_0 VS_Downsample(); PixelShader = compile ps_2_0 PS_Downsample(SceneSampler); } pass GlowH < string Script = "RenderColorTarget0=HBlurMap;" "ClearSetColor=ClearColor;" "Clear=Color;" "Draw=Buffer;"; > { cullmode = none; ZEnable = false; ZWriteEnable = false; VertexShader = compile vs_2_0 VS_Blur(7, float2(1, 0)); // PixelShader = compile ps_2_0 PS_Blur7(SceneSampler, weights7); PixelShader = compile ps_2_0 PS_Blur7(DownsampleSampler, weights7); } pass GlowV < string Script = "RenderColorTarget0=FinalBlurMap;" "ClearSetColor=ClearColor;" "Clear=color;" "Draw=Buffer;"; > { cullmode = none; ZEnable = false; ZWriteEnable = false; VertexShader = compile vs_2_0 VS_Blur(7, float2(0, 1)); PixelShader = compile ps_2_0 PS_Blur7(HBlurSampler, weights7); } pass GlowH_Central < string Script = "RenderColorTarget0=HBlurMap;" "ClearSetColor=ClearColor;" "Clear=Color;" "Draw=Buffer;"; > { cullmode = none; ZEnable = false; ZWriteEnable = false; VertexShader = compile vs_2_0 VS_Blur(7, float2(1, 0)); PixelShader = compile ps_2_0 PS_Blur7(DownsampleSampler, weights7_Central); } pass GlowV_Central < string Script = "RenderColorTarget0=FinalBlurMap;" "ClearSetColor=ClearColor;" "Clear=Color;" "Draw=Buffer;"; > { cullmode = none; ZEnable = false; ZWriteEnable = false; VertexShader = compile vs_2_0 VS_Blur(7, float2(0, 1)); PixelShader = compile ps_2_0 PS_Blur7(HBlurSampler, weights7_Central); } pass FinalComp < string Script = "RenderColorTarget=;" "RenderDepthStencilTarget=;" "Draw=Buffer;"; > { cullmode = none; ZEnable = false; ZWriteEnable = false; VertexShader = compile vs_2_0 VS_Quad(); PixelShader = compile ps_2_0 PS_Comp(SceneSampler, FinalBlurSampler); } } ]]></effect><texture path="C:\Program Files\NVIDIA Corporation\NVIDIA FX Composer\MEDIA\textures\2D\Blended.dds"/><effect path="F:\devrel\SDK\MEDIA\HLSL\post_blendOverlay.fx"><![CDATA[/*********************************************************************NVMH3**** File: $Id: //sw/devrel/SDK/MEDIA/HLSL/post_blendOverlay.fx#6 $ Copyright NVIDIA Corporation 2004 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Comments: Typical set of blend modes -- overlay a file texture. By setting the appropriate #define values and recompiling, these shaders also support "Advanced" blend modes like those found in the layers of Adobe Photoshop (TM). Advanced "blend" ranges are based on VM-generated textures. For best results,use a card capable of FP-pixel texture support. See "scene_blendModes" for a similar example. ******************************************************************************/ #include <include\\Quad.fxh> // Turn this on to get the "dissolve" technique -- a bit slow just now // #define DISSOLVE float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "scene"; string ScriptOrder = "postprocess"; string ScriptOutput = "color"; string Script = "Technique=Technique?over:base:blend" #ifdef DISSOLVE ":dissolve" #endif /* DISSOLVE */ // NO TECHNIQUES FOUND ":average:darken:lighten:multiply:add:subtract:difference:inverseDifference" ":exclusion:screen:colorBurn:colorDodge:overlay:softLight:hardLight"; > = 0.8; float4 ClearColor : DIFFUSE < string UIName = "Background"; > = {0.3,0.3,0.3,1.0}; float ClearDepth < string UIWidget = "none"; > = 1.0; // Top-Level Compilation Switches ///////////////////////////////////// // Turn this on to provide "advanced" PS-style blend ranges // #define BLEND_RANGE // Turn this on to use grayscale values for the above. Ignored if (!BLEND_RANGE) // #define BLEND_GRAY // If (!BLEND_GRAY) use this channel for BLEND_RANGE calculations // #define BLEND_CHANNEL r // Define this if you want to build static lookup textures for the blend-range functions // #define BLEND_TEX /////////////////////////////////////////////////////////// ///////////////////////////// Render-to-Texture Data ////// /////////////////////////////////////////////////////////// DECLARE_QUAD_TEX(SceneTexture,SceneSampler,"A8R8G8B8") DECLARE_QUAD_DEPTH_BUFFER(DepthBuffer, "D24S8") ///////////////////////////////////////////////////// //// Textures for Input Images ////////////////////// ///////////////////////////////////////////////////// FILE_TEXTURE_2D(BlendImg,BlendImgSampler,"Blended.dds") ///////////////////////////////////////////////////// //// Tweakables ///////////////////////////////////// ///////////////////////////////////////////////////// float Opacity < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 1.0; // Blend Ranges for "Advanced Blend" // (these could be float4's but are individual sliders for FX Composer) #ifdef BLEND_RANGE #define LNORM(minv,maxv,p) ((p)-(minv))/((maxv)-(minv)) // #define CLAMP(p) min(1.0,(max(0.0,(p)))) #define CLAMP(p) (((p)<=0.0)?0:(((p)>=1)?1:(p))) // #define CLAMPRANGE(minv,maxv,p) min(1.0,(max(0.0,LNORM(minv,maxv,p)))) #define CLAMPRANGE(minv,maxv,p) CLAMP((LNORM((minv),(maxv),(p)))) #ifdef BLEND_TEX /////////////////////////////////////////////////////////// ////// procedural textures used for blending ////////////// /////////////////////////////////////////////////////////// #define BASE_LO_MIN 0.0 #define BASE_LO_MAX 0.7 #define BASE_HI_MIN 0.9 #define BASE_HI_MAX 1.0 #define BLEND_LO_MIN 0.0 #define BLEND_LO_MAX 0.3 #define BLEND_HI_MIN 0.8 #define BLEND_HI_MAX 1.0 #define BLEND_TEX_SIZE 256 // texture functions used to fill the volume noise texture float4 blend_1D(float2 Pos : POSITION) : COLOR { float lo, hi; if (BLEND_LO_MIN == BLEND_LO_MAX) { lo = (Pos.x >= BLEND_LO_MIN) ? 1 : 0; } else { lo = CLAMPRANGE(BLEND_LO_MIN,BLEND_LO_MAX,Pos.x); } if (BLEND_HI_MIN == BLEND_HI_MAX) { hi = (Pos.x <= BLEND_HI_MIN) ? 1 : 0; } else { hi = 1 - CLAMPRANGE(BLEND_HI_MIN,BLEND_HI_MAX,Pos.x); } float4 blends = 0; blends.x = lo * hi; if (BASE_LO_MIN == BASE_LO_MAX) { lo = (Pos.y >= BASE_LO_MIN) ? 1 : 0; } else { lo = CLAMPRANGE(BASE_LO_MIN,BASE_LO_MAX,Pos.y); } if (BASE_HI_MIN == BASE_HI_MAX) { hi = (Pos.y <= BASE_HI_MIN) ? 1 : 0; } else { hi = 1 - CLAMPRANGE(BLEND_HI_MIN,BLEND_HI_MAX,Pos.y); } blends.y = lo * hi; return blends; } texture BlendTex < string ResourceType = "2D"; string function = "blend_1D"; string UIWidget = "None"; string Format = "A16B16G16R16F"; float2 Dimensions = { BLEND_TEX_SIZE, BLEND_TEX_SIZE }; >; sampler BlendSampler = sampler_state { texture = <BlendTex>; AddressU = CLAMP; AddressV = CLAMP; MIPFILTER = LINEAR; MINFILTER = LINEAR; MAGFILTER = LINEAR; }; #else /* ! BLEND_TEX */ float baseLoMin < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 0.0; float baseLoMax < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 0.1; float baseHiMin < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 0.9; float baseHiMax < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 1.0; float blendLoMin < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 0.0; float blendLoMax < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 0.1; float blendHiMin < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 0.9; float blendHiMax < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "Blend Opacity"; > = 1.0; #endif /* ! BLEND_TEX */ #endif /* BLEND_RANGE */ // Dissolve-Related tweakable and functions ////// #ifdef DISSOLVE float Dissolver < string UIWidget = "slider"; float uimin = 0.0; float uimax = 1.0; float uistep = 0.01; string UIName = "For Dissolve"; > = 0.5; ////// procedural texture used for dissolve #define NOISE_SIZE 256 #define NOISE_SCALE 110 // function used to fill the volume noise texture float4 noise_2d(float2 Pos : POSITION) : COLOR { float4 Noise = (float4)0; for (int i = 1; i < 256; i += i) { Noise.r += abs(noise(Pos * NOISE_SCALE * i)) / i; //Noise.g += abs(noise((Pos + 1.2)* NOISE_SCALE * i)) / i; //Noise.b += abs(noise((Pos + 2.3) * NOISE_SCALE * i)) / i; //Noise.a += abs(noise((Pos + 3.1) * NOISE_SCALE * i)) / i; } return Noise.rrrr; } texture NoiseTex < string ResourceType = "2D"; string function = "noise_2d"; string UIWidget = "None"; float2 Dimensions = { NOISE_SIZE, NOISE_SIZE }; >; sampler NoiseSampler = sampler_state { texture = <NoiseTex>; AddressU = WRAP; AddressV = WRAP; MIPFILTER = LINEAR; MINFILTER = LINEAR; MAGFILTER = LINEAR; }; #endif /* DISSOLVE */ /**************************************************************/ /********* utility pixel-shader functions and macros **********/ /**************************************************************/ #define GET_PIX float4 base = tex2D(SceneSampler, IN.UV); \ float4 blend = tex2D(BlendImgSampler, IN.UV) #ifdef BLEND_GRAY float grayValue(float3 Color) { return dot(Color,float3(0.25,0.65,0.1)); // just made this chroma target up - KB } #endif /* BLEND_GRAY */ // assume NON-pre-multiplied RGB... float4 final_mix(float4 NewColor,float4 Base,float4 Blend) { float A2 = Opacity * Blend.a; #ifdef BLEND_RANGE #ifdef BLEND_GRAY float blendV = grayValue(Blend.rgb); float baseV = grayValue(Base.rgb); #else /* ! BLEND_GRAY */ float blendV = Blend.BLEND_CHANNEL; float baseV = Base.BLEND_CHANNEL; #endif /* !BLEND_GRAY */ #ifdef BLEND_TEX float2 bv = tex2D(BlendSampler,float2(blendV,baseV)).xy; // baseV = tex2D(BlendSampler,float2(baseV,0)).y; A2 *= (bv.x * bv.y); #else /* !BLEND_TEX */ blendV = CLAMPRANGE(blendLoMin,blendLoMax,blendV)* (1-CLAMPRANGE(blendHiMin,blendHiMax,blendV)); baseV = CLAMPRANGE(baseLoMin,baseLoMax,baseV)* (1-CLAMPRANGE(baseHiMin,baseHiMax,baseV)); A2 *= (blendV * baseV); #endif /* !BLEND_TEX */ #endif /*BLEND_RANGE */ float3 mixRGB = A2 * NewColor.rgb; mixRGB += ((1.0-A2) * Base.rgb); // float mixA = max(Base.a, A2); // float mixA = 1 - (1-Base.w)*(1-A2); return float4(mixRGB,Blend.a); // wrong grrrrr } /**************************************/ /********* blend pixel shaders ********/ /**************************************/ float4 overPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(blend,base,blend); } float4 basePS(QuadVertexOutput IN) : COLOR { GET_PIX; return base; } float4 blendPS(QuadVertexOutput IN) : COLOR { GET_PIX; return blend; } #ifdef DISSOLVE float4 dissolvePS(QuadVertexOutput IN) : COLOR { GET_PIX; float diss = tex2D(NoiseSampler, IN.UV1).x; float4 newC; if (diss < Dissolver) { newC = blend; } else { newC = base; } return final_mix(newC,base,blend); } #endif /* DISSOLVE */ float4 averagePS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix((blend+base)/2,base,blend); } float4 darkenPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(min(base,blend),base,blend); } float4 lightenPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(max(base,blend),base,blend); } float4 multiplyPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix((base*blend),base,blend); } float4 addPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix((base+blend),base,blend); } float4 subtractPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix((base*blend),base,blend); } float4 differencePS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(abs(base*blend),base,blend); } float4 inverseDifferencePS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(1-abs(1-base-blend),base,blend); } float4 exclusionPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(base + blend - (2*base*blend),base,blend); } float4 screenPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(1 - (1 - base) * (1 - blend),base,blend); } float4 colorBurnPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(1-(1-base)/blend,base,blend); } float4 colorDodgePS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix( base / (1-blend), base,blend); } float4 overlayPS(QuadVertexOutput IN) : COLOR { GET_PIX; float4 lumCoeff = float4(0.25,0.65,0.1,0); float L = min(1,max(0,10*(dot(lumCoeff,base)- 0.45))); float4 result1 = 2 * base * blend; float4 result2 = 1 - 2*(1-blend)*(1-base); return final_mix(lerp(result1,result2,L),base,blend); } float4 softLightPS(QuadVertexOutput IN) : COLOR { GET_PIX; return final_mix(2*base*blend + base*base - 2*base*base*blend,base,blend); } float4 hardLightPS(QuadVertexOutput IN) : COLOR { GET_PIX; float4 lumCoeff = float4(0.25,0.65,0.1,0); float L = min(1,max(0,10*(dot(lumCoeff,blend)- 0.45))); float4 result1 = 2 * base * blend; float4 result2 = 1 - 2*(1-blend)*(1-base); return final_mix(lerp(result1,result2,L),base,blend); } /*******************************************************************/ /************* TECHNIQUES ******************************************/ /*******************************************************************/ #define DEFSCRIPT "RenderColorTarget0=SceneTexture;RenderDepthStencilTarget=DepthBuffer;ClearSetColor=ClearColor;ClearSetDepth=ClearDepth;Clear=Color;Clear=Depth;ScriptExternal=color;Pass=p0;" // simplest techniques work in ps_1_1 #define TECH(name,psName) technique name < string Script = (DEFSCRIPT); > {\ pass p0 <string Script="RenderColorTarget0=;RenderDepthStencilTarget=;Draw=Buffer;";> { \ VertexShader = compile vs_1_1 ScreenQuadVS(); \ ZEnable = false; ZWriteEnable = false; CullMode = None; \ PixelShader = compile ps_1_1 psName (); } } // most techniques require ps_2 for blending #define TECH2(name,psName) technique name < string Script = (DEFSCRIPT); > { \ pass p0 <string Script="RenderColorTarget0=;RenderDepthStencilTarget=;Draw=Buffer;";> { \ VertexShader = compile vs_2_0 ScreenQuadVS(); \ ZEnable = false; ZWriteEnable = false; CullMode = None; \ PixelShader = compile ps_2_0 psName (); } } TECH2(over,overPS) TECH(base,basePS) TECH(blend,blendPS) #ifdef DISSOLVE TECH2(dissolve,dissolvePS) #endif /* DISSOLVE */ TECH2(average,averagePS) TECH2(darken,darkenPS) TECH2(lighten,lightenPS) TECH2(multiply,multiplyPS) TECH2(add,addPS) TECH2(subtract,subtractPS) TECH2(difference,differencePS) TECH2(inverseDifference,inverseDifferencePS) TECH2(exclusion,exclusionPS) TECH2(screen,screenPS) TECH2(colorBurn,colorBurnPS) TECH2(colorDodge,colorDodgePS) TECH2(overlay,overlayPS) TECH2(softLight,softLightPS) TECH2(hardLight,hardLightPS) /***************************** eof ***/ ]]></effect><effect path="f:\devrel\sdk\media\hlsl\include\\quad.fxh"><![CDATA[/*********************************************************************NVMH3**** File: $Id: //sw/devrel/SDK/MEDIA/HLSL/include/Quad.fxh#1 $ Copyright NVIDIA Corporation 2004 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Comments: Header file with lots of useful macros, types, and functions for use with textures and render-to-texture-buffer effects in DirectX. Example Macro Usages: Texture-declaration Macros: FILE_TEXTURE_2D(SurfTexture,SurfSampler,"myfile.dds") // simple 2D wrap texture FILE_TEXTURE_2D_MODAL(SpotTexture,SpotSampler,"myfile.dds",CLAMP) // user-defined addr mode RenderTarget Texture-declaration Macros: DECLARE_QUAD_TEX(ObjTexture,ObjSampler,"A8R8G8B8") DECLARE_QUAD_DEPTH_BUFFER(DepthTexture,"D24S8") DECLARE_SIZED_QUAD_TEX(GlowTexture,GlowSampler,"A8R8G8B8",0.5) // scaled versions of above DECLARE_SIZED_QUAD_DEPTH_BUFFER(DepthTexture,"D24S8",0.5) DECLARE_SIZED_TEX(BlahMap,BlahSampler,"R32F",128,1) // address mode is "clamp" DECLARE_SQUARE_QUAD_TEX(ShadTexture,ShadObjSampler,"A16R16G16B16F",512) // for shadows etc DECLARE_SQUARE_QUAD_DEPTH_BUFFER(ShadDepth,"D24S8",512) Data types used in shaders: QUAD_REAL & QUAD_REAL# -- defaults to HALF but you can define QUAD_REAL float before #including "Quad.fxh" either by explicitly declaring all the QUAD_REAL types yourself, or #define-ing the symbol QUAD_FLOAT Flags (define before #including "Quad.fxh"): TWEAKABLE_TEXEL_OFFSET // shows in paramter panel NO_TEXEL_OFFSET // disables Structure: QuadVertexOutput -- used by shaders, defines simple connection for "Draw=buffer" VS and PS Shader Functions for "Draw=buffer" passes: QuadVertexOutput ScreenQuadVS(): standard vertex shader for screen-aligned quads QUAD_REAL4 TexQuadPS(QuadVertexOutput IN,uniform sampler2D InputSampler) pass this pixel shader a sampler -- will draw it to the screen QUAD_REAL4 TexQuadBiasPS(QuadVertexOutput IN,uniform sampler2D InputSampler,QUAD_REAL TBias) Same as above, but uses tex2Dbias() Utility Functions for Texture-Based Lookup Tables: QUAD_REAL scale_lookup(QUAD_REAL Value,const QUAD_REAL TableSize) QUAD_REAL2 scale_lookup(QUAD_REAL2 Value,const QUAD_REAL TableSize) QUAD_REAL3 scale_lookup(QUAD_REAL3 Value,const QUAD_REAL TableSize) Other Utility Functions: QUAD_REAL4 premultiply(QUAD_REAL4 C) QUAD_REAL4 unpremultiply(QUAD_REAL4 C) // uses macro value NV_ALPHA_EPSILON Global Variables: QUAD_REAL QuadTexOffset // reconciles difference between pixel and texel centers QUAD_REAL2 QuadScreenSize // VIEWPORTPIXELSIZE, contains dimensions of render window ******************************************************************************/ #ifndef _QUAD_FXH #define _QUAD_FXH // Numeric types we are likely to encounter.... // Redefine these before including "Quad.fxh" if you want // to use a type other than "half" for these data or just // define the symbol QUAD_FLOAT to use "floats" #ifndef QUAD_REAL #ifdef QUAD_FLOAT #define QUAD_REAL float #define QUAD_REAL2 float2 #define QUAD_REAL3 float3 #define QUAD_REAL4 float4 #define QUAD_REAL3x3 float3x3 #define QUAD_REAL4x3 float4x3 #define QUAD_REAL3x4 float3x4 #define QUAD_REAL4x4 float4x4 #else /* ! QUAD_FLOAT */ #define QUAD_REAL half #define QUAD_REAL2 half2 #define QUAD_REAL3 half3 #define QUAD_REAL4 half4 #define QUAD_REAL3x3 half3x3 #define QUAD_REAL4x3 half4x3 #define QUAD_REAL3x4 half3x4 #define QUAD_REAL4x4 half4x4 #endif /* ! QUAD_FLOAT */ #endif /* ! QUAD_REAL */ /////////////////////////////////////////////////////////////////////// /// Texture-Declaration Macros //////////////////////////////////////// /////////////////////////////////////////////////////////////////////// // // Modal 2D File Textures // // example usage: FILE_TEXTURE_2D_MODAL(GlowMap,GlowSampler,"myfile.dds",CLAMP) // #define FILE_TEXTURE_2D_MODAL(TexName,SampName,Filename,AddrMode) texture TexName < \ string ResourceName = (Filename); \ string ResourceType = "2D"; \ >; \ sampler SampName = sampler_state { \ texture = <TexName>; \ AddressU = AddrMode; \ AddressV = AddrMode; \ MipFilter = LINEAR; \ MinFilter = LINEAR; \ MagFilter = LINEAR; \ }; // // Simple 2D File Textures // // example usage: FILE_TEXTURE_2D(GlowMap,GlowSampler,"myfile.dds") // #define FILE_TEXTURE_2D(TextureName,SamplerName,Diskfile) FILE_TEXTURE_2D_MODAL(TextureName,SamplerName,(Diskfile),WRAP) // // Use this variation of DECLARE_QUAD_TEX() if you want a *scaled* render target // // example usage: DECLARE_SIZED_QUAD_TEX(GlowMap,GlowSampler,"A8R8G8B8",1.0) #define DECLARE_SIZED_QUAD_TEX(TexName,SampName,PixFmt,Multiple) texture TexName : RENDERCOLORTARGET < \ float2 ViewPortRatio = {Multiple,Multiple}; \ int MipLevels = 1; \ string Format = PixFmt ; \ string UIWidget = "None"; \ >; \ sampler SampName = sampler_state { \ texture = <TexName>; \ AddressU = CLAMP; \ AddressV = CLAMP; \ MipFilter = POINT; \ MinFilter = LINEAR; \ MagFilter = LINEAR; \ }; // // Use this macro to easily declare typical color render targets // // example usage: DECLARE_QUAD_TEX(ObjMap,ObjSampler,"A8R8G8B8") #define DECLARE_QUAD_TEX(TextureName,SamplerName,PixelFormat) DECLARE_SIZED_QUAD_TEX(TextureName,SamplerName,(PixelFormat),1.0) // // Use this macro to easily declare variable-sized depth render targets // // example usage: DECLARE_SIZED_QUAD_DEPTH_BUFFER(DepthMap,"D24S8",0.5) #define DECLARE_SIZED_QUAD_DEPTH_BUFFER(TextureName,PixelFormat,Multiple) texture TextureName : RENDERDEPTHSTENCILTARGET < \ float2 ViewPortRatio = {Multiple,Multiple}; \ string Format = (PixelFormat); \ string UIWidget = "None"; \ >; // // Use this macro to easily declare typical depth render targets // // example usage: DECLARE_QUAD_DEPTH_BUFFER(DepthMap,"D24S8") #define DECLARE_QUAD_DEPTH_BUFFER(TexName,PixFmt) DECLARE_SIZED_QUAD_DEPTH_BUFFER(TexName,PixFmt,1.0) // // declare exact-sized arbitrary texture // // example usage: DECLARE_SIZED_TEX(BlahMap,BlahSampler,"R32F",128,1) #define DECLARE_SIZED_TEX(Tex,Samp,Fmt,Wd,Ht) texture Tex : RENDERCOLORTARGET < \ float2 Dimensions = { Wd, Ht }; \ string Format = Fmt ; \ string UIWidget = "None"; \ int miplevels=1;\ >; \ sampler Samp = sampler_state { \ texture = <Tex>; \ AddressU = CLAMP; \ AddressV = CLAMP; \ MipFilter = NONE; \ MinFilter = LINEAR; \ MagFilter = LINEAR; \ }; // // declare exact-sized square texture, as for shadow maps // // example usage: DECLARE_SQUARE_QUAD_TEX(ShadMap,ShadObjSampler,"A16R16G16B16F",512) #define DECLARE_SQUARE_QUAD_TEX(TexName,SampName,PixFmt,Size) DECLARE_SIZED_TEX(TexName,SampName,(PixFmt),Size,Size) // // likewise for shadow depth targets // // example usage: DECLARE_SQUARE_QUAD_DEPTH_BUFFER(ShadDepth,"D24S8",512) #define DECLARE_SQUARE_QUAD_DEPTH_BUFFER(TextureName,PixelFormat,Size) texture TextureName : RENDERDEPTHSTENCILTARGET < \ float2 Dimensions = { Size, Size }; \ string Format = (PixelFormat) ; \ string UIWidget = "None"; \ >; //////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////// Utility Functions //////// //////////////////////////////////////////////////////////////////////////// // // Scale inputs for use with texture-based lookup tables. A value ranging from zero to one needs // a slight scaling and offset to be sure to point at the centers of the first and last pixels // of that lookup texture. Pass the integer size of the table in TableSize // For now we'll assume that all tables are 1D, square, or cube-shaped -- all axes of equal size // // Cost of this operation for pixel shaders: two const-register // entries and a MAD (one cycle) QUAD_REAL scale_lookup(QUAD_REAL Value,const QUAD_REAL TableSize) { QUAD_REAL scale = ((TableSize - 1.0)/TableSize); QUAD_REAL shift = (0.5 / TableSize); return (scale*Value + shift); } QUAD_REAL2 scale_lookup(QUAD_REAL2 Value,const QUAD_REAL TableSize) { QUAD_REAL scale = ((TableSize - 1.0)/TableSize); QUAD_REAL shift = (0.5 / TableSize); return (scale.xx*Value + shift.xx); } QUAD_REAL3 scale_lookup(QUAD_REAL3 Value,const QUAD_REAL TableSize) { QUAD_REAL scale = ((TableSize - 1.0)/TableSize); QUAD_REAL shift = (0.5 / TableSize); return (scale.xxx*Value + shift.xxx); } // pre-multiply and un-pre-mutliply functions. The precision // of thse operatoions is often limited to 8-bit so don't // always count on them! // The macro value of NV_ALPHA_EPSILON, if defined, is used to // avoid IEEE "NaN" values that may occur when erroneously // dividing by a zero alpha (thanks to Pete Warden @ Apple // Computer for the suggestion in GPU GEMS II) // multiply color by alpha to turn an un-premultipied // pixel value into a premultiplied one QUAD_REAL4 premultiply(QUAD_REAL4 C) { return QUAD_REAL4((C.w*C.xyz),C.w); } #define NV_ALPHA_EPSILON 0.0001 // given a premultiplied pixel color, try to undo the premultiplication. // beware of precision errors QUAD_REAL4 unpremultiply(QUAD_REAL4 C) { #ifdef NV_ALPHA_EPSILON QUAD_REAL a = C.w + NV_ALPHA_EPSILON; return QUAD_REAL4((C.xyz / a),C.w); #else /* ! NV_ALPHA_EPSILON */ return QUAD_REAL4((C.xyz / C.w),C.w); #endif /* ! NV_ALPHA_EPSILON */ } ///////////////////////////////////////////////////////////////////////////////////// // Structure Declaration //////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// struct QuadVertexOutput { QUAD_REAL4 Position : POSITION; QUAD_REAL2 UV : TEXCOORD0; }; ///////////////////////////////////////////////////////////////////////////////////// // Hidden tweakables declared by this .fxh file ///////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// #ifndef NO_TEXEL_OFFSET #ifdef TWEAKABLE_TEXEL_OFFSET QUAD_REAL QuadTexOffset = 0.5; #else /* !TWEAKABLE_TEXEL_OFFSET */ QUAD_REAL QuadTexOffset < string UIWidget="None"; > = 0.5; #endif /* !TWEAKABLE_TEXEL_OFFSET */ QUAD_REAL2 QuadScreenSize : VIEWPORTPIXELSIZE < string UIWidget="None"; >; #endif /* NO_TEXEL_OFFSET */ //////////////////////////////////////////////////////////// ////////////////////////////////// vertex shaders ////////// //////////////////////////////////////////////////////////// QuadVertexOutput ScreenQuadVS( QUAD_REAL3 Position : POSITION, QUAD_REAL3 TexCoord : TEXCOORD0 ) { QuadVertexOutput OUT; OUT.Position = QUAD_REAL4(Position, 1); #ifdef NO_TEXEL_OFFSET OUT.UV = TexCoord.xy; #else /* NO_TEXEL_OFFSET */ QUAD_REAL2 off = QUAD_REAL2(QuadTexOffset/(QuadScreenSize.x),QuadTexOffset/(QuadScreenSize.y)); OUT.UV = QUAD_REAL2(TexCoord.xy+off); #endif /* NO_TEXEL_OFFSET */ return OUT; } ////////////////////////////////////////////////////// ////////////////////////////////// pixel shaders ///// ////////////////////////////////////////////////////// // add glow on top of model QUAD_REAL4 TexQuadPS(QuadVertexOutput IN,uniform sampler2D InputSampler) : COLOR { QUAD_REAL4 texCol = tex2D(InputSampler, IN.UV); return texCol; } QUAD_REAL4 TexQuadBiasPS(QuadVertexOutput IN,uniform sampler2D InputSampler,QUAD_REAL TBias) : COLOR { QUAD_REAL4 texCol = tex2Dbias(InputSampler, QUAD_REAL4(IN.UV,0,TBias)); return texCol; } ////////////////////////////////////////////////////////////////// /// Macros to define passes within Techniques //////////////////// ////////////////////////////////////////////////////////////////// // older HLSL syntax #define TEX_TECH(TechName,SamplerName) technique TechName { \ pass TexturePass { \ VertexShader = compile vs_2_0 ScreenQuadVS(); \ AlphaBlendEnable = false; ZEnable = false; \ PixelShader = compile ps_2_a TexQuadPS(SamplerName); } } #define TEX_BLEND_TECH(TechName,SamplerName) technique TechName { \ pass TexturePass { \ VertexShader = compile vs_2_0 ScreenQuadVS(); \ ZEnable = false; AlphaBlendEnable = true; \ SrcBlend = SrcAlpha; DestBlend = InvSrcAlpha; \ PixelShader = compile ps_2_a TexQuadPS(SamplerName); } } // newer HLSL syntax #define TEX_TECH2(TechName,SamplerName,TargName) technique TechName { \ pass TexturePass < \ string ScriptFunction = "RenderColorTarget0=" (TargName) ";" \ "DrawInternal=Buffer;"; \ > { \ VertexShader = compile vs_2_0 ScreenQuadVS(); \ AlphaBlendEnable = false; ZEnable = false; \ PixelShader = compile ps_2_a TexQuadPS(SamplerName); } } #define TEX_BLEND_TECH2(TechName,SamplerName) technique TechName { \ pass TexturePass < \ string ScriptFunction = "RenderColorTarget0=" (TargName) ";" \ "DrawInternal=Buffer;"; \ > { \ VertexShader = compile vs_2_0 ScreenQuadVS(); \ ZEnable = false; AlphaBlendEnable = true; \ SrcBlend = SrcAlpha; DestBlend = InvSrcAlpha; \ PixelShader = compile ps_2_a TexQuadPS(SamplerName); } } #endif /* _QUAD_FXH */ ////////////// eof /// ]]></effect><texture path="C:\Program Files\NVIDIA Corporation\NVIDIA FX Composer\MEDIA\textures\2D\Veggie.dds"/><effect path="F:\devrel\SDK\MEDIA\HLSL\pre_texture.fx"><![CDATA[/*********************************************************************NVMH3**** File: $Id: //sw/devrel/SDK/MEDIA/HLSL/pre_texture.fx#4 $ Copyright NVIDIA Corporation 2004 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Comments: Put a texture behind the current scene Geometry Ignored ******************************************************************************/ #include <include\\Quad.fxh> float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "scene"; string ScriptOrder = "preprocess"; string ScriptOutput = "color"; string Script = "Technique=TexBg;"; > = 0.8; // version # float ClearDepth <string UIWidget = "none";> = 1.0; ///////// Textures /////////////// texture BgTexture < string ResourceName = "Veggie.dds"; string ResourceType = "2D"; string UIName = "Background Texture"; >; sampler2D BgSampler = sampler_state { Texture = <BgTexture>; MinFilter = Point; MagFilter = Point; MipFilter = None; }; //////////////////////// technique TexBg < string Script = "ClearSetDepth=ClearDepth;" "Clear=Depth;" "Pass=Bg;" "ScriptExternal=Scene;"; > { pass Bg < string Script = "Draw=Buffer;"; > { VertexShader = compile vs_1_1 ScreenQuadVS(); AlphaBlendEnable = false; ZEnable = false; PixelShader = compile ps_1_1 TexQuadPS(BgSampler); } } /***************************** eof ***/ ]]></effect><effect path="F:\devrel\SDK\MEDIA\HLSL\plasticQ.fx"><![CDATA[/*********************************************************************NVMH3**** File: $Id: //sw/devrel/SDK/MEDIA/HLSL/plasticQ.fx#16 $ Copyright NVIDIA Corporation 2002-2004 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Comments: A phong-shaded plastic surface. The highlight is done in VERTEX shading -- not as a texture. Plastic surface, vertex shaded phong model with quadratic falloff. The falloff is interpolated between vertices, so if the light is in the middle of a large triangle, it will be wrong. If at a distance from all vertices, it will look pretty good for many applications. ******************************************************************************/ float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "object"; string ScriptOrder = "standard"; string ScriptOutput = "color"; string Script = "Technique=ps11;"; > = 0.8; /*********** UNTWEAKABLES **************/ float4x4 WorldIT : WorldInverseTranspose < string UIWidget="None"; >; float4x4 WorldViewProj : WorldViewProjection < string UIWidget="None"; >; float4x4 World : World < string UIWidget="None"; >; float4x4 ViewI : ViewInverse < string UIWidget="None"; >; /************* TWEAKABLES **************/ float3 LightPos : Position < string Object = "PointLight"; string Space = "World"; > = {-10.0f, 10.0f, -10.0f}; float3 LightColor < string UIName = "Light Color"; string UIWidget = "Color"; > = {1.0f, 1.0f, 1.0f}; float LightIntensity < string UIWidget = "slider"; float UIMin = 1.0; float UIMax = 1000.0; float UIStep = 0.2; string UIName = "Intensity"; > = 1.0; float3 AmbiColor : Ambient < string UIName = "Ambient Light Color"; string UIWidget = "Color"; > = {0.2f, 0.2f, 0.2f}; //// float3 SurfColor : Diffuse < string UIName = "Surface Color"; string UIWidget = "Color"; > = {0.9f, 0.5f, 0.9f}; float SpecExpon : SpecularPower < string UIWidget = "slider"; float UIMin = 1.0; float UIMax = 128.0; float UIStep = 1.0; string UIName = "specular power"; > = 22.0; /************* DATA STRUCTS **************/ /* data from application vertex buffer */ struct appdata { float3 Position : POSITION; float4 UV : TEXCOORD0; float4 Normal : NORMAL; }; /* data passed from vertex shader to pixel shader */ struct vertexOutput { float4 HPosition : POSITION; float4 TexCoord0 : TEXCOORD0; // put light distance into "z" float4 diffCol : COLOR0; float4 specCol : COLOR1; }; /*********** vertex shader ******/ vertexOutput plasticQVS(appdata IN) { vertexOutput OUT; float3 Nn = normalize(mul(IN.Normal, WorldIT).xyz); float4 Po = float4(IN.Position.xyz,1); float3 Pw = mul(Po, World).xyz; OUT.HPosition = mul(Po, WorldViewProj); float3 LightDelta = (LightPos - Pw); float falloff = LightIntensity / dot(LightDelta,LightDelta); float3 Ln = normalize(LightDelta); float ldn = dot(Ln,Nn); float diffComp = max(0,ldn); float3 diffContrib = SurfColor * (diffComp * LightColor + AmbiColor); OUT.diffCol = float4(diffContrib,1); OUT.TexCoord0 = float4(IN.UV.xy,falloff,1.0); float3 Vn = normalize(ViewI[3].xyz - Pw); float3 Hn = normalize(Vn + Ln); float hdn = pow(max(0,dot(Hn,Nn)),SpecExpon); OUT.specCol = float4((diffComp * hdn * LightColor).xyz,1); return OUT; } /********* pixel shader ********/ float4 plasticQPS(vertexOutput IN) : COLOR { return (IN.TexCoord0.z * (IN.diffCol + IN.specCol)); } /*************/ technique ps11 < string Script = "Pass=p0;"; > { pass p0 < string Script = "Draw=geometry;"; > { VertexShader = compile vs_1_1 plasticQVS(); ZEnable = true; ZWriteEnable = true; CullMode = None; PixelShader = compile ps_1_1 plasticQPS(); } } /***************************** eof ***/ ]]></effect></media_objects></fxstudio_project>