ÿþ<?xml version="1.0" encoding="UTF-16" standalone="no"?> <fxstudio_project fileversion="3" buildversion="1.6.1029.1130" originalpath="F:\devrel\SDK\MEDIA\projects\nightfall.fxproj"><system_settings><searchpaths><texture/><shader/><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="3530840" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="4.942525e-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="3530256" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.462573e-036,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.614482e-001,-3.045102e-001,-4.064237e-001,0.000000e+000,2.384185e-007,8.002902e-001,-5.996127e-001,0.000000e+000,5.078451e-001,-5.165354e-001,-6.894088e-001,0.000000e+000,3.576279e-006,-4.768372e-007,1.895471e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Projection" semantic="PROJECTION" type="5" rows="4" columns="4" handle="3529704" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.462336e-036,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.330398e+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.511167e-002,0.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Scene Center" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="3522152" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="1.654460e-001, 4.805081e-001, 6.318300e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Scene Extents" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="3524232" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="1.163754e+000, 1.480508e+000, 1.622859e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Screen Size" semantic="UNKNOWN" type="2" rows="0" columns="0" handle="66628072" animated="0" numkeys="1" defaulttype="float2" defaultvalue="2.560000e+002, 2.560000e+002"><keys><key num="0" value="4.040000e+002, 4.510000e+002"/></keys></connectionparameter><connectionparameter objectid="3" name="Show Lights" semantic="UNKNOWN" type="4" rows="0" columns="0" handle="66647048" 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="3523840" 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="66686608" animated="0" numkeys="1" defaulttype="bool" defaultvalue="1"><keys><key num="0" value="1"/></keys></connectionparameter></parameterlist><material objectid="4" name="Nightfall" handle="84" effect="F:\devrel\SDK\MEDIA\HLSL\Nightfall.fx"><parameterlist objectid="2"><connectionparameter objectid="3" name="Script" semantic="STANDARDSGLOBAL" type="3" rows="0" columns="0" handle="165846544" 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=Main;"/><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="WorldITXf" semantic="WORLDINVERSETRANSPOSE" type="5" rows="4" columns="4" handle="165848984" 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="WvpXf" semantic="WORLDVIEWPROJECTION" type="5" rows="4" columns="4" handle="165745616" 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="WorldXf" semantic="WORLD" type="5" rows="4" columns="4" handle="165746088" 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="ViewIXf" semantic="VIEWINVERSE" type="5" rows="4" columns="4" handle="165829896" 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="Timer" semantic="TIME" type="3" rows="0" columns="0" handle="67379568" animated="1" numkeys="1" defaulttype="float" defaultvalue="0.000000e+000"><keys><key num="0" value="1.393472e+006"/></keys><annotation nametype="9" valuetype="9" name="UIWIDGET" value="NONE"/></connectionparameter><connectionparameter objectid="3" name="LightDir" semantic="DIRECTION" type="1" rows="0" columns="0" handle="67379736" animated="1" numkeys="1" defaulttype="float3" defaultvalue="-1.000000e+000, -1.000000e+000, -2.000000e-001"><keys><key num="0" value="-1.000000e+000, -1.000000e+000, -2.000000e-001"/></keys><annotation nametype="9" valuetype="9" name="OBJECT" value="DIRECTIONALLIGHT"/><annotation nametype="9" valuetype="9" name="SPACE" value="WORLD"/><annotation nametype="9" valuetype="9" name="UINAME" value="Sun Direction"/><calculator objectid="5" name="Directional Light : DIRECTION"><nvcalculator_load objectid="6" scenehandle="10" paramname="Object Direction" regdest="1" constantvalue="UNKNOWN" constanttype="2147483647" constantrows="0" constantcolumns="0"/><nvcalculator_load objectid="6" scenehandle="9" paramname="Current Transform" regdest="2" constantvalue="UNKNOWN" constanttype="2147483647" constantrows="0" constantcolumns="0"/><nvcalculator_mul objectid="7" regdest="3" reg1="1" reg2="2" op="1"/><nvcalculator_normalize objectid="8" regdest="3" regsource="3"/><nvcalculator_mov objectid="9" type="1" rows="0" columns="0" regdest="0" regsource="3"/></calculator></connectionparameter><connectionparameter objectid="3" name="LightColor" semantic="SPECULAR" type="1" rows="0" columns="0" handle="165848344" 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="Sun"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="COLOR"/></connectionparameter><connectionparameter objectid="3" name="AmbiLightColor" semantic="AMBIENT" type="1" rows="0" columns="0" handle="165848512" animated="1" numkeys="1" defaulttype="float3" defaultvalue="7.000000e-002, 7.000000e-002, 7.000000e-002"><keys><key num="0" value="7.000000e-002, 7.000000e-002, 7.000000e-002"/></keys><annotation nametype="9" valuetype="9" name="UINAME" value="Ambient"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="COLOR"/></connectionparameter><connectionparameter objectid="3" name="Speed" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="165846048" animated="1" numkeys="1" defaulttype="float" defaultvalue="2.000000e-001"><keys><key num="0" value="2.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="Rotation"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-002"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="Kd" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="67381360" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="8.800000e-001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.500000e+000"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Diffuse"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-002"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="Ks" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="67380752" animated="1" numkeys="1" defaulttype="float" defaultvalue="8.500000e-001"><keys><key num="0" value="8.500000e-001"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.500000e+000"/><annotation nametype="9" valuetype="3" name="UIMIN" value="0.000000e+000"/><annotation nametype="9" valuetype="9" name="UINAME" value="Specular"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-002"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="SpecExpon" semantic="SPECULARPOWER" type="3" rows="0" columns="0" handle="165872648" animated="1" numkeys="1" defaulttype="float" defaultvalue="3.200000e+001"><keys><key num="0" value="3.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><connectionparameter objectid="3" name="Bumpy" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="165844104" animated="1" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="4.600000e+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="Bump Height"/><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="DayTexture" semantic="DIFFUSE" type="6" rows="0" columns="0" handle="165871896" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value="F:\devrel\SDK\MEDIA\textures\2D\EarthDay.dds"/></keys><annotation nametype="9" valuetype="9" name="RESOURCENAME" value="EarthDay.dds"/><annotation nametype="9" valuetype="9" name="RESOURCETYPE" value="2D"/></connectionparameter><connectionparameter objectid="3" name="DaySampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="165870224" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="NightTexture" semantic="DIFFUSE" type="6" rows="0" columns="0" handle="165867160" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value="F:\devrel\SDK\MEDIA\textures\2D\EarthMoonLit.dds"/></keys><annotation nametype="9" valuetype="9" name="RESOURCENAME" value="EarthMoonLit.dds"/><annotation nametype="9" valuetype="9" name="RESOURCETYPE" value="2D"/></connectionparameter><connectionparameter objectid="3" name="NightSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="165865576" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="NormalTexture" semantic="NORMAL" type="6" rows="0" columns="0" handle="165859528" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value="F:\devrel\SDK\MEDIA\textures\2D\earth_bump.dds"/></keys><annotation nametype="9" valuetype="9" name="RESOURCENAME" value="earth_bump.dds"/><annotation nametype="9" valuetype="9" name="RESOURCETYPE" value="2D"/></connectionparameter><connectionparameter objectid="3" name="NormalSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="165861544" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="GlossTexture" semantic="SPECULAR" type="6" rows="0" columns="0" handle="165860792" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value="F:\devrel\SDK\MEDIA\textures\2D\EarthSpec.dds"/></keys><annotation nametype="9" valuetype="9" name="RESOURCENAME" value="EarthSpec.dds"/><annotation nametype="9" valuetype="9" name="RESOURCETYPE" value="2D"/></connectionparameter><connectionparameter objectid="3" name="GlossSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="165857648" 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><node objectid="10" name="Sphere" materialoverride="84" handle="3" worldskin="0"><sphere objectid="11" name=""><parameterlist objectid="2"><connectionparameter objectid="3" name="Radius" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="102934400" animated="0" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Latitude Segments" semantic="UNKNOWN" type="7" rows="0" columns="0" handle="102934744" animated="0" numkeys="1" defaulttype="dword" defaultvalue="26"><keys><key num="0" value="26"/></keys></connectionparameter><connectionparameter objectid="3" name="Longitude Segments" semantic="UNKNOWN" type="7" rows="0" columns="0" handle="102935192" animated="0" numkeys="1" defaulttype="dword" defaultvalue="26"><keys><key num="0" value="26"/></keys></connectionparameter></parameterlist></sphere><meshmender objectid="12" name=""><parameterlist objectid="2"/></meshmender></node><node objectid="13" name="Default Scene Camera" handle="8" target="4294967295" defaultcamera="1" activecamera="1"><parameterlist objectid="2"><connectionparameter objectid="3" name="Focal Length" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="103218712" animated="0" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="1.895476e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Field of View" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="103219272" 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="103219840" animated="0" numkeys="1" defaulttype="float2" defaultvalue="0.000000e+000, 1.000000e+000"><keys><key num="0" value="1.505264e-002, 3.853476e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Look Direction" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="103220408" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="-4.064238e-001, -5.996127e-001, -6.894088e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Up Direction" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="103221048" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 1.000000e+000, 0.000000e+000"><keys><key num="0" value="-3.045103e-001, 8.002903e-001, -5.165355e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Lookat Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="103222328" 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.614482e-001,-3.045102e-001,-4.064237e-001,0.000000e+000,2.384185e-007,8.002902e-001,-5.996127e-001,0.000000e+000,5.078451e-001,-5.165354e-001,-6.894088e-001,0.000000e+000,3.576279e-006,-4.768372e-007,1.895471e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Camera Position" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="103221688" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, -1.000000e+000"><keys><key num="0" value="7.703673e-001, 1.136549e+000, 1.306752e+000"/></keys></connectionparameter></parameterlist></node><node objectid="14" name="Directional Light" handle="10" type="2"><parameterlist objectid="2"><connectionparameter objectid="3" name="Diffuse" semantic="DIFFUSE" type="0" rows="0" columns="0" handle="166047920" 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="166047352" 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="166069488" 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="102870520" 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="166069832" 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="Object Direction" semantic="DIRECTION" type="1" rows="0" columns="0" handle="166070000" 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, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="View" semantic="VIEW" type="5" rows="4" columns="4" handle="103189936" 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="7.525580e-001,2.572019e-001,6.062207e-001,0.000000e+000,2.572020e-001,7.326530e-001,-6.301321e-001,0.000000e+000,-6.062208e-001,6.301321e-001,4.852110e-001,0.000000e+000,2.693306e-001,-6.731654e-001,1.055906e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Projection" semantic="PROJECTION" type="5" rows="4" columns="4" handle="103190720" 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="6.445172e-001,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,5.773502e-001,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.325866e-002,0.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Depth Range" semantic="UNKNOWN" type="2" rows="0" columns="0" handle="103191472" animated="0" numkeys="1" defaulttype="float2" defaultvalue="0.000000e+000, 1.000000e+000"><keys><key num="0" value="1.320687e-002, 3.380959e+000"/></keys></connectionparameter></parameterlist></node><nvtransformlink objectid="15" parent="0" handle="2" 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="101227280" 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="67582424" 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="67583784" 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="67584352" 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="67584808" 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="67583072" 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="15" parent="2" handle="4" name="Object Transform" animated="1" separable="1"><nodes><node handle="3"/></nodes><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="102936648" 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="102937656" 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="102939080" 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="102939648" 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="102940176" 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="102938368" 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="15" parent="2" handle="7" name="Default Camera Transform" animated="0" separable="1"><nodes><node handle="8"/></nodes><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="103205312" 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="103215512" 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="103216824" animated="0" numkeys="1" defaulttype="quat" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="8.317153e-002, -9.153070e-001, 3.048562e-001, 2.497166e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Translation" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="103217408" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="7.703673e-001, 1.136549e+000, 1.306752e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Scale" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="103217936" 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="103216168" 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.614485e-001,2.980232e-007,5.078453e-001,0.000000e+000,-3.045103e-001,8.002903e-001,-5.165355e-001,0.000000e+000,-4.064239e-001,-5.996127e-001,-6.894089e-001,0.000000e+000,7.703673e-001,1.136549e+000,1.306752e+000,1.000000e+000,"/></keys></connectionparameter></parameterlist></nvtransformlink><nvtransformlink objectid="15" parent="2" handle="9" name="light transform" animated="1" separable="1"><nodes><node handle="10"/></nodes><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="166043024" 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="166043552" 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="166044688" animated="1" numkeys="1" defaulttype="quat" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="3.656138e-001, 3.517399e-001, 0.000000e+000, 8.617458e-001"/></keys></connectionparameter><connectionparameter objectid="3" name="Translation" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="166045472" animated="1" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="-6.696594e-001, 1.089285e+000, 7.511985e-002"/></keys></connectionparameter><connectionparameter objectid="3" name="Scale" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="166046824" 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="166044120" 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="7.525580e-001,2.572019e-001,-6.062208e-001,0.000000e+000,2.572019e-001,7.326531e-001,6.301322e-001,0.000000e+000,6.062208e-001,-6.301322e-001,4.852112e-001,0.000000e+000,-6.696594e-001,1.089285e+000,7.511985e-002,1.000000e+000,"/></keys></connectionparameter></parameterlist></nvtransformlink></nvtransformlink></scene><objects><object objectid="14" objectguid="92143635_32865_19454_144_22_137_91_158_38_251_67" objectname="NVLight_Directional Object" progid="nvsys.NVLight_Directional.1"/><object objectid="11" objectguid="272529616_58327_19386_146_87_182_219_95_121_44_221" objectname="NVGeoPipeObject_Sphere Object" progid="nvsys.NVGeoPipeObject_Sphere.1"/><object objectid="8" objectguid="579911188_50621_18994_170_80_102_6_63_80_234_94" objectname="NVCalculator_Normalize Object" progid="nvsys.NVCalculator_Normalize.1"/><object objectid="5" objectguid="687344697_14784_17624_175_112_25_78_110_206_178_195" objectname="NVCalculator Object" progid="nvsys.NVCalculator.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="10" 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="13" objectguid="1675712286_15683_20022_149_108_42_250_122_123_231_64" objectname="NVCamera Object" progid="nvsys.NVCamera.1"/><object objectid="9" objectguid="1755565597_56309_18722_149_152_96_3_18_125_126_123" objectname="NVCalculator_Assign Object" progid="nvsys.NVCalculator_Assign.1"/><object objectid="15" objectguid="2342579002_10168_19906_178_150_26_144_17_106_220_182" objectname="NVTransformLink Object" progid="nvsys.NVTransformLink.1"/><object objectid="12" objectguid="2516468428_38854_16959_155_101_192_176_42_10_71_202" objectname="NVGeoPipeObject_MeshMender Object" progid="nvsys.NVGeoPipeObject_MeshMender.1"/><object objectid="6" objectguid="3098681227_22869_16810_191_237_249_13_61_143_28_123" objectname="NVCalculator_Load Object" progid="nvsys.NVCalculator_Load.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="7" objectguid="4162726501_8958_17137_170_77_131_38_3_90_246_20" objectname="NVCalculator_Mul Object" progid="nvsys.NVCalculator_Mul.1"/></objects><media_objects><texture path="F:\devrel\SDK\MEDIA\textures\2D\EarthDay.dds"/><texture path="F:\devrel\SDK\MEDIA\textures\2D\EarthMoonLit.dds"/><texture path="F:\devrel\SDK\MEDIA\textures\2D\earth_bump.dds"/><texture path="F:\devrel\SDK\MEDIA\textures\2D\EarthSpec.dds"/><effect path="F:\devrel\SDK\MEDIA\HLSL\Nightfall.fx"><![CDATA[/*********************************************************************NVMH3**** File: $Id: //sw/devrel/SDK/MEDIA/HLSL/Nightfall.fx#5 $ 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: Day/Night Earth Shader ******************************************************************************/ // Compile-time flags // feature flags // performance flags //#define USE_NORMALIZATION_CUBEMAP float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "object"; string ScriptOrder = "standard"; string ScriptOutput = "color"; string Script = "Technique=Main;"; > = 0.8; /************* "UN-TWEAKABLES," TRACKED BY CPU APPLICATION **************/ float4x4 WorldITXf : WorldInverseTranspose <string UIWidget="None";>; float4x4 WvpXf : WorldViewProjection <string UIWidget="None";>; float4x4 WorldXf : World <string UIWidget="None";>; float4x4 ViewIXf : ViewInverse <string UIWidget="None";>; float Timer : TIME <string UIWidget="None";>; /////////////////////////////////////////////////////////////// /// TWEAKABLES //////////////////////////////////////////////// /////////////////////////////////////////////////////////////// ////////////////////////////////////////////// light float3 LightDir : DIRECTION < string UIName = "Sun Direction"; string Object = "DirectionalLight"; string Space = "World"; > = {-1.0f, -1.0f, -0.2f}; float3 LightColor : SPECULAR < string UIName = "Sun"; string UIWidget = "Color"; > = {1.0f, 1.0f, 1.0f}; ////////////////////////////////////////////// ambient light float3 AmbiLightColor : Ambient < string UIName = "Ambient"; string UIWidget = "Color"; > = {0.07f, 0.07f, 0.07f}; ////////////////////////////////////////////// surface float Speed < string UIWidget = "slider"; float UIMin = 0.0; float UIMax = 1; float UIStep = 0.01; string UIName = "Rotation"; > = 0.2; float Kd < string UIWidget = "slider"; float UIMin = 0.0; float UIMax = 1.5; float UIStep = 0.01; string UIName = "Diffuse"; > = 1.0; float Ks < string UIWidget = "slider"; float UIMin = 0.0; float UIMax = 1.5; float UIStep = 0.01; string UIName = "Specular"; > = 0.85; float SpecExpon : SpecularPower < string UIWidget = "slider"; float UIMin = 1.0; float UIMax = 128.0; float UIStep = 1.0; string UIName = "Specular power"; > = 32.0; float Bumpy < string UIWidget = "slider"; float UIMin = 0.0; float UIMax = 10.0; float UIStep = 0.1; string UIName = "Bump Height"; > = 1.0; //////////////////////////////////////////////////////// /// TEXTURES /////////////////////////////////////////// //////////////////////////////////////////////////////// texture DayTexture : DIFFUSE < string ResourceName = "EarthDay.dds"; string ResourceType = "2D"; >; sampler2D DaySampler = sampler_state { Texture = <DayTexture>; MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; }; texture NightTexture : DIFFUSE < string ResourceName = "EarthMoonLit.dds"; string ResourceType = "2D"; >; sampler2D NightSampler = sampler_state { Texture = <NightTexture>; MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; }; texture NormalTexture : NORMAL < string ResourceName = "earth_bump.dds"; string ResourceType = "2D"; >; sampler2D NormalSampler = sampler_state { Texture = <NormalTexture>; MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; }; ////////////// texture GlossTexture : SPECULAR < string ResourceName = "EarthSpec.dds"; string ResourceType = "2D"; >; sampler2D GlossSampler = sampler_state { Texture = <GlossTexture>; MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; }; ////////////// #ifdef USE_NORMALIZATION_CUBEMAP #include "normalize.fxh" // only for pixel shaders.... #define NORM my_normalize #else /* !USE_NORMALIZATION_CUBEMAP */ #define NORM normalize #endif /* !USE_NORMALIZATION_CUBEMAP */ /*********************************************************/ /************* DATA STRUCTS ******************************/ /*********************************************************/ /* data from application vertex buffer */ struct appdata { float3 Position : POSITION; float4 UV : TEXCOORD0; float4 Normal : NORMAL; float4 Tangent : TANGENT0; float4 Binormal : BINORMAL0; }; struct vertexOutput { float4 HPosition : POSITION; float2 UV : TEXCOORD0; float3 WorldNormal : TEXCOORD1; float3 WorldView : TEXCOORD2; float3 WorldTangent : TEXCOORD3; float3 WorldBinorm : TEXCOORD4; }; /*********************************************************/ /*********** Virtual Machine *****************************/ /*********************************************************/ #include "nvMatrix.fxh" float4x4 planetMat() { return(nvYRotateXf(Timer*Speed)); } float4x4 planetMatN() { float4x4 R = (nvYRotateXf(Timer*Speed)); return mul(R,WorldITXf); } /*********************************************************/ /*********** vertex shader *******************************/ /*********************************************************/ vertexOutput basicVS(appdata IN,uniform float4x4 rotMat,uniform float4x4 rotMatN) { vertexOutput OUT; OUT.WorldNormal = mul(IN.Normal,rotMatN).xyz; OUT.WorldTangent = mul(IN.Tangent,rotMatN).xyz; OUT.WorldBinorm = mul(IN.Binormal,rotMatN).xyz; float4 Po = float4(IN.Position.xyz,1.0); // object coordinates Po = mul(Po,rotMat); float3 Pw = mul(Po,WorldXf).xyz; // world coordinates OUT.UV = float2(IN.UV.x,1-IN.UV.y); OUT.WorldView = normalize(ViewIXf[3].xyz - Pw); // obj coords OUT.HPosition = mul(Po,WvpXf); // screen clipspace coords return OUT; } /*********************************************************/ /*********** pixel shader ********************************/ /*********************************************************/ float4 everythingPS(vertexOutput IN) : COLOR { float3 Nn = NORM(IN.WorldNormal); float3 Tn = NORM(IN.WorldTangent); float3 Bn = NORM(IN.WorldBinorm); float3 bumps = Bumpy * (tex2D(NormalSampler,IN.UV).xyz-(0.5).xxx); Nn += (bumps.x * Tn + bumps.y * Bn); Nn = NORM(Nn); float3 Vn = NORM(IN.WorldView); float3 Ln = NORM(-LightDir); // NORM() required? float3 Hn = NORM(Vn + Ln); float hdn = dot(Hn,Nn); float ldn = dot(Ln,Nn); float4 litVec = lit(ldn,hdn,SpecExpon); float3 diffContrib = litVec.y * LightColor; float gloss = Ks * tex2D(GlossSampler,IN.UV).x; float3 specContrib = ((litVec.y * litVec.z * gloss) * LightColor); // add, incorporating ambient light term float3 dayTex = tex2D(DaySampler,IN.UV).xyz; float3 nitTex = tex2D(NightSampler,IN.UV).xyz; float3 result = dayTex*(Kd*diffContrib+AmbiLightColor) + specContrib; result += saturate(4*(-ldn-0.1))*nitTex; return float4(result.xyz,1.0); } //////////////////////////////////////////////////////////////////// /// TECHNIQUES ///////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// technique Main < string Script = "Pass=p0;"; > { pass p0 < string Script = "Draw=geometry;"; > { VertexShader = compile vs_2_0 basicVS(planetMat(),planetMatN()); ZEnable = true; ZWriteEnable = true; CullMode = None; PixelShader = compile ps_2_0 everythingPS(); } } /***************************** eof ***/ ]]></effect><effect path="f:\devrel\sdk\media\hlsl\nvinverse.fxh"><![CDATA[//////////////////////////////////////////////////////////////////////NVMH3//// // File: $Id: //sw/devrel/SDK/MEDIA/HLSL/nvInverse.fxh#5 $ // // 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. // // HLSL Virtual Machine code for matrix inverse // // This file provides a stand-in until HLSL has an inverse() intrinic function // /////////////////////////////////////////////////////////////////////////////// #ifndef _NVINVERSE_H #define _NVINVERSE_H // okay, so this one seems excessive float nvMatrixCollapse(float2x2 inpMatrix, int row, int column) { float result = 0; int i; int m = 0; for (i = 0; i < 1; i += 1) { if (m == row) m += 1; int j; int n = 0; for ( j = 0; j < 1; j += 1) { if (n == column) n += 1; result = inpMatrix[m][n]; n += 1; } m += 1; } return result; } float2x2 nvMatrixCollapse(float3x3 inpMatrix, int row, int column) { float2x2 result = (float2x2)0; int i; int m = 0; for (i = 0; i < 2; i += 1) { if (m == row) m += 1; int j; int n = 0; for ( j = 0; j < 2; j += 1) { if (n == column) n += 1; result[i][j] = inpMatrix[m][n]; n += 1; } m += 1; } return result; } float3x3 nvMatrixCollapse(float4x4 inpMatrix, int row, int column ) { float3x3 result = (float3x3)0; int i; int m = 0; for (i = 0; i < 3; i += 1) { if (m == row) m += 1; int j; int n = 0; for ( j = 0; j < 3; j += 1) { if (n == column) n += 1; result[i][j] = inpMatrix[m][n]; n += 1; } m += 1; } return result; } // Returns a matrix which is the Adjoint of inpMatrix. float4x4 nvAdjoint(float4x4 inpMatrix) { float4x4 result = (float4x4)0; result[0][0] = determinant(nvMatrixCollapse(inpMatrix, 0, 0)); result[0][1] = -determinant(nvMatrixCollapse(inpMatrix, 0, 1)); result[0][2] = determinant(nvMatrixCollapse(inpMatrix, 0, 2)); result[1][0] = -determinant(nvMatrixCollapse(inpMatrix, 1, 0)); result[1][1] = determinant(nvMatrixCollapse(inpMatrix, 1, 1)); result[1][2] = -determinant(nvMatrixCollapse(inpMatrix, 1, 2)); result[2][0] = determinant(nvMatrixCollapse(inpMatrix, 2, 0)); result[2][1] = -determinant(nvMatrixCollapse(inpMatrix, 2, 1)); result[2][2] = determinant(nvMatrixCollapse(inpMatrix, 2, 2)); // Cofactor of 4th column result[0][3] = -determinant(nvMatrixCollapse(inpMatrix, 0, 3)); result[1][3] = determinant(nvMatrixCollapse(inpMatrix, 1, 3)); result[2][3] = -determinant(nvMatrixCollapse(inpMatrix, 2, 3)); // Cofactor of 4th row result[3][0] = -determinant(nvMatrixCollapse(inpMatrix, 3, 0)); result[3][1] = determinant(nvMatrixCollapse(inpMatrix, 3, 1)); result[3][2] = -determinant(nvMatrixCollapse(inpMatrix, 3, 2)); result[3][3] = determinant(nvMatrixCollapse(inpMatrix, 3, 3)); // Adjoint is TRANSPOSE of matrix containing cofactors return transpose(result); } // Returns a matrix which is the Adjoint of inpMatrix. float3x3 nvAdjoint(float3x3 inpMatrix) { float3x3 result = (float3x3)0; // Cofactor of top-left 3×3 matrix result[0][0] = determinant(nvMatrixCollapse(inpMatrix, 0, 0)); result[0][1] = -determinant(nvMatrixCollapse(inpMatrix, 0, 1)); result[0][2] = determinant(nvMatrixCollapse(inpMatrix, 0, 2)); result[1][0] = -determinant(nvMatrixCollapse(inpMatrix, 1, 0)); result[1][1] = determinant(nvMatrixCollapse(inpMatrix, 1, 1)); result[1][2] = -determinant(nvMatrixCollapse(inpMatrix, 1, 2)); result[2][0] = determinant(nvMatrixCollapse(inpMatrix, 2, 0)); result[2][1] = -determinant(nvMatrixCollapse(inpMatrix, 2, 1)); result[2][2] = determinant(nvMatrixCollapse(inpMatrix, 2, 2)); // Adjoint is TRANSPOSE of matrix containing cofactors return transpose(result); } // Returns a matrix which is the Inverse of inpMatrix. float4x4 nvInverse(float4x4 inpMatrix) { float4x4 outMatrix = (float4x4)0; float det = determinant(inpMatrix); if ( det != 0.0 ) outMatrix = (1.0/ det) * nvAdjoint(inpMatrix); return outMatrix; } // Returns a matrix which is the Inverse of inpMatrix. float3x3 nvInverse(float3x3 inpMatrix) { float3x3 outMatrix = (float3x3)0; float det = determinant(inpMatrix); if ( det != 0.0 ) outMatrix = (1.0/ det) * nvAdjoint(inpMatrix); return outMatrix; } #endif /* _NVINVERSE_H */ ///////////////////////////////////////////// eof /// ]]></effect><effect path="f:\devrel\sdk\media\hlsl\nvmatrix.fxh"><![CDATA[//////////////////////////////////////////////////////////////////////NVMH3//// // File: $Id: //devrel/Playpen/kbjorke/HLSL/nvMatrix.fxh#7 $ // // 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. // // HLSL for matrix ops -- mostly useful for the Virtual Machine when setting up // state for hardware shaders. // // All functions return float4x4 // /////////////////////////////////////////////////////////////////////////////// #ifndef _NVMATRIX_H #define _NVMATRIX_H // FOR NOW, use dummy function in place of HLSL intrinsic inverse() #include "nvInverse.fxh" #ifdef _NVINVERSE_H #define inverse nvInverse #endif /* _NVINVERSE_H */ ////////////////////// Super Basics ///////////////////// // Identity float4x4 nvIdentityXf() { return float4x4(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1); } /// translate float4x4 nvTranslateXf(float4 Vect) { return float4x4(1,0,0,0, 0,1,0,0, 0,0,1,0, Vect.xyz,1); } float4x4 nvTranslateXf(float3 Vect) { return float4x4(1,0,0,0, 0,1,0,0, 0,0,1,0, Vect.xyz,1); } float4x4 nvTranslateXf(float2 Vect) { return float4x4(1,0,0,0, 0,1,0,0, 0,0,1,0, Vect.xy,0,1); } float4x4 nvTranslateXf(float tx,float ty, float tz) { return float4x4(1,0,0,0, 0,1,0,0, 0,0,1,0, tx,ty,tz,1); } /// scale float4x4 nvScaleXf(float S) { return float4x4(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,S); } float4x4 nvScaleXf(float3 S) { return float4x4(S.x,0,0,0, 0,S.y,0,0, 0,0,S.z,0, 0,0,0,1); } float4x4 nvScaleXf(float4 S) { return float4x4(S.x,0,0,0, 0,S.y,0,0, 0,0,S.z,0, 0,0,0,S.w); } float4x4 nvScaleXf(float Sx, float Sy, float Sz) { return float4x4(Sx,0,0,0, 0,Sy,0,0, 0,0,Sz,0, 0,0,0,1); } /// rotate -- angles in radians float4x4 nvXRotateXf(float A) { float s = sin(A); float c = cos(A); return float4x4(1,0,0,0, 0,c,s,0, 0,-s,c,0, 0,0,0,1); } float4x4 nvYRotateXf(float A) { float s = sin(A); float c = cos(A); return float4x4(c,0,s,0, 0,1,0,0, -s,0,c,0, 0,0,0,1); } float4x4 nvZRotateXf(float A) { float s = sin(A); float c = cos(A); return float4x4(c,s,0,0, -s,c,0,0, 0,0,1,0, 0,0,0,1); } // we assume here that axis is NORMALIZED.... float4x4 nvRotateXf(float A,float3 Axis) { float s = sin(A); float c = cos(A); float t = 1.0 - c; float3 Ax2 = Axis*Axis; float txy = t*Axis.x*Axis.y; float txz = t*Axis.x*Axis.z; float tyz = t*Axis.y*Axis.z; return float4x4(t*Ax2.x+c, txy+s*Axis.z,txz-s*Axis.y,0, txy-s*Axis.z,t*Ax2.y+c, tyz+s*Axis.x,0, txz+s*Axis.y,tyz-s*Axis.x,t*Ax2.z+c, 0, 0,0,0,1); } float4x4 nvRotateXf(float A,float4 Axis) { return nvRotateXf(A,Axis.xyz); } float4x4 nvRotateXf(float A,float Ax,float Ay,float Az) { return nvRotateXf(A,normalize(float3(Ax,Ay,Az))); } // rotation submatrix // extract rotation matrix only float4x4 nvRotOnly(float4x4 inMatrix) { return float4x4(inMatrix[0].xyz,0, inMatrix[1].xyz,0, inMatrix[2].xyz,0, 0,0,0,1); } // extract translation matrix only float4x4 nvTransOnly(float4x4 inMatrix) { float4x4 R = nvRotOnly(inMatrix); float4x4 Rt = transpose(R); return mul(inMatrix,Rt); } //////////////// Projection /////////////////////////////////////// // D = distance to near Z float4x4 nvFrustumXf(float D) { return float4x4(1,0,0,0, 0,1,0,0, 0,0,1,(1.0/D), 0,0,-D,0); } // angles in radians float4x4 nvPerspAnglesXf(float AngleX,float AngleY,float ZNear, float ZFar) { float Q = ZFar/(ZFar-ZNear); float w = 1.0/tan(AngleX/2.0); float h = 1.0/tan(AngleY/2.0); return float4x4(w,0,0,0, 0,h,0,0, 0,0,Q,1, 0,0,-Q*ZNear,0); } // formula like D3DXMatrixPerspectiveLH() float4x4 nvPerspViewportXf(float Width,float Height,float ZNear, float ZFar) { float Q = ZFar/(ZFar-ZNear); float w = 2.0*ZNear / Width; float h = 2.0*ZNear / Height; return float4x4(w,0,0,0, 0,h,0,0, 0,0,Q,1, 0,0,-Q*ZNear,0); } float4x4 nvClipProjXf(float ZNear, float ZFar) { float zr = ZFar-ZNear; float a = (ZNear+ZFar)/zr; float b = (-2.0*ZNear*ZFar)/zr; return float4x4(1,0,0,0, 0,1,0,0, 0,0,a,-1, 0,0,b,0); } // Angle in Radians! float4x4 nvPerspectiveXf(float Angle,float Aspect,float ZNear, float ZFar) { float zr = ZFar-ZNear; float a = (ZNear+ZFar)/zr; float b = (-2.0*ZNear*ZFar)/zr; float t = 1.0 / tan(Angle/2.0); return float4x4(t/Aspect,0,0,0, 0,t,0,0, 0,0,a,-1, 0,0,b,0); } ///////// orthographic float4x4 nvOrthoProjXf(float Left, float Right, float Top, float Bottom, float ZNear, float ZFar) { float xr = Right-Left; float yr = Bottom-Top; float zr = ZFar-ZNear; float a = (ZNear+ZFar)/zr; float b = (-2.0*ZNear*ZFar)/zr; return float4x4(2.0/xr,0,0,0, 0,2.0/yr,0,0, 0,0,-2.0/zr,0, -(Right+Left)/xr,-(Top+Bottom)/yr,(ZNear+ZFar)/zr,1); } // handy matrices for spotlight projections ////////////////////////////////// // Since we might not ave the full xfrom of a spotlight, we can make a guess -- // we DO know its location and orientation, so by adding an arbitrary "up" // vector we can create a useful matrix for this spotlamp // // Inputs should be normalized // float4x4 nv_spot_xf(float3 Pos,float3 Aim,float3 Up) { float3 side = cross(Up,Aim); // to the side side = normalize(side); float3 top = cross(side,Aim); top = normalize(top); float4x4 tXf =nvTranslateXf(Pos.xyz); float4x4 rota = float4x4(side.xyz,0, top.xyz,0, Aim.xyz,0, 0,0,0,1); return mul(rota,tXf); } // // pass xf of a spotlight, its coneangle (in radians), near and far distances. // Handy for shadow mapping! // float4x4 nv_spot_proj_xf(float4x4 SpotXf,float ShadCone,float ShadNear,float ShadFar) { float4x4 invSpot = inverse(SpotXf); float4x4 proj = nvPerspAnglesXf(ShadCone,ShadCone,ShadNear, ShadFar); return mul(invSpot,proj); } #endif /* _NVMATRIX_H */ ///////////////////////////////////////////// eof /// ]]></effect></media_objects></fxstudio_project>