ÿþ<?xml version="1.0" encoding="UTF-16" standalone="no"?> <fxstudio_project fileversion="3" buildversion="1.6.1005.600" originalpath="F:\devtools\FXComposer\1.6\SDK\MEDIA\projects\tonemap.fxproj"><system_settings><searchpaths><texture><path name="F:\devtools\FXComposer\1.6\SDK\MEDIA\projects\"/><path name="D:\src\sw\devrel\SDK\MEDIA\fxcomposer\"/><path name="F:\Playpen\HLSL\toys\"/></texture><shader><path name="F:\devtools\FXComposer\1.6\SDK\MEDIA\projects\"/><path name="D:\src\sw\devrel\SDK\MEDIA\fxcomposer\"/><path name="F:\Playpen\HLSL\toys\"/></shader><model><path name="F:\devtools\FXComposer\1.6\SDK\MEDIA\projects\"/><path name="D:\src\sw\devrel\SDK\MEDIA\fxcomposer\"/><path name="F:\Playpen\HLSL\toys\"/></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="3512672" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="4.943467e-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="66563312" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="1.457184e-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="9.999999e-001,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,9.999999e-001,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,9.999999e-001,0.000000e+000,0.000000e+000,0.000000e+000,1.538205e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Projection" semantic="PROJECTION" type="5" rows="4" columns="4" handle="3530440" animated="0" numkeys="1" defaulttype="float4x4" defaultvalue="4.945608e-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.137690e+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,-6.239928e-003,0.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Scene Center" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="66560136" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="0.000000e+000, -6.332994e-008, -1.456602e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Scene Extents" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="66571216" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 0.000000e+000"><keys><key num="0" value="0.000000e+000, 6.332994e-008, 1.456602e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Screen Size" semantic="UNKNOWN" type="2" rows="0" columns="0" handle="3523824" animated="0" numkeys="1" defaulttype="float2" defaultvalue="2.560000e+002, 2.560000e+002"><keys><key num="0" value="5.070000e+002, 4.840000e+002"/></keys></connectionparameter><connectionparameter objectid="3" name="Show Lights" semantic="UNKNOWN" type="4" rows="0" columns="0" handle="66562536" 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="3523432" 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="66620720" animated="0" numkeys="1" defaulttype="bool" defaultvalue="1"><keys><key num="0" value="1"/></keys></connectionparameter></parameterlist><material objectid="4" name="tonemap" handle="113" effect="F:\devtools\FXComposer\1.6\SDK\MEDIA\HLSL\tonemap.fx"><parameterlist objectid="2"><connectionparameter objectid="3" name="Script" semantic="STANDARDSGLOBAL" type="3" rows="0" columns="0" handle="89756408" 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="SCENE"/><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="Image" semantic="UNKNOWN" type="6" rows="0" columns="0" handle="89765448" animated="0" numkeys="1" defaulttype="texture" defaultvalue=""><keys><key num="0" value="C:\Program Files\NVIDIA Corporation\NVIDIA FX Composer\MEDIA\textures\hdr\nave.hdr"/></keys><annotation nametype="9" valuetype="9" name="FORMAT" value="A16B16G16R16f"/><annotation nametype="9" valuetype="9" name="RESOURCENAME" value="nave.hdr"/><annotation nametype="9" valuetype="9" name="RESOURCETYPE" value="2D"/></connectionparameter><connectionparameter objectid="3" name="ImageSampler" semantic="UNKNOWN" type="12" rows="0" columns="0" handle="89766008" animated="0" numkeys="1" defaulttype="sampler" defaultvalue="UNKNOWN"><keys><key num="0" value="UNKNOWN"/></keys></connectionparameter><connectionparameter objectid="3" name="exposure" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="89778064" animated="1" numkeys="1" defaulttype="float" defaultvalue="0.000000e+000"><keys><key num="0" value="1.300000e+000"/></keys><annotation nametype="9" valuetype="3" name="UIMAX" value="1.000000e+001"/><annotation nametype="9" valuetype="3" name="UIMIN" value="-1.000000e+001"/><annotation nametype="9" valuetype="9" name="UINAME" value="Exposure"/><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="defog" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="89768696" animated="1" numkeys="1" defaulttype="float" defaultvalue="0.000000e+000"><keys><key num="0" value="0.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="De-fog"/><annotation nametype="9" valuetype="3" name="UISTEP" value="1.000000e-003"/><annotation nametype="9" valuetype="9" name="UIWIDGET" value="SLIDER"/></connectionparameter><connectionparameter objectid="3" name="gamma" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="89758648" animated="1" numkeys="1" defaulttype="float" defaultvalue="4.545455e-001"><keys><key num="0" value="4.400000e-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="Gamma"/><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="fogColor" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="89776776" 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></parameterlist><ScriptParams num="0" value="1.000000e+000, 1.000000e+000, 1.000000e+000"><parameterlist objectid="2"/></ScriptParams></material><node objectid="5" name="Default Scene Camera" handle="24" target="4294967295" defaultcamera="1" activecamera="1"><parameterlist objectid="2"><connectionparameter objectid="3" name="Focal Length" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="108575048" animated="0" numkeys="1" defaulttype="float" defaultvalue="1.000000e+000"><keys><key num="0" value="1.538205e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Field of View" semantic="UNKNOWN" type="3" rows="0" columns="0" handle="108575672" 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="108581064" animated="0" numkeys="1" defaulttype="float2" defaultvalue="0.000000e+000, 1.000000e+000"><keys><key num="0" value="6.215554e-003, 1.591182e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Look Direction" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="108575984" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, 1.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, 1.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Up Direction" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="108576336" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 1.000000e+000, 0.000000e+000"><keys><key num="0" value="0.000000e+000, 1.000000e+000, 0.000000e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Lookat Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="108577360" 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="9.999999e-001,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,9.999999e-001,0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000,9.999999e-001,0.000000e+000,0.000000e+000,0.000000e+000,1.538205e+000,1.000000e+000,"/></keys></connectionparameter><connectionparameter objectid="3" name="Camera Position" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="108576848" animated="0" numkeys="1" defaulttype="float3" defaultvalue="0.000000e+000, 0.000000e+000, -1.000000e+000"><keys><key num="0" value="0.000000e+000, 0.000000e+000, -1.538205e+000"/></keys></connectionparameter></parameterlist></node><nvtransformlink objectid="6" parent="0" handle="18" 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="107639424" 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="107638824" 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="89919088" 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="89920368" 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="89919800" 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="89920824" 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="6" parent="18" handle="23" name="Default Camera Transform" animated="0" separable="1"><nodes><node handle="24"/></nodes><parameterlist objectid="2"><connectionparameter objectid="3" name="Matrix" semantic="UNKNOWN" type="5" rows="4" columns="4" handle="107699304" 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="107700016" 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="108566424" animated="0" 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="108568984" 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.538205e+000"/></keys></connectionparameter><connectionparameter objectid="3" name="Scale" semantic="UNKNOWN" type="1" rows="0" columns="0" handle="108575360" 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="108578872" 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,-1.538205e+000,1.000000e+000,"/></keys></connectionparameter></parameterlist></nvtransformlink></nvtransformlink><scenematerials scenematerial="113"/></scene><objects><object objectid="3" objectguid="1178903711_54835_17816_162_225_77_133_92_204_97_107" objectname="NVConnectionParameter Object" progid="nvsys.NVConnectionParameter.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="5" objectguid="1675712286_15683_20022_149_108_42_250_122_123_231_64" objectname="NVCamera Object" progid="nvsys.NVCamera.1"/><object objectid="6" objectguid="2342579002_10168_19906_178_150_26_144_17_106_220_182" objectname="NVTransformLink Object" progid="nvsys.NVTransformLink.1"/><object objectid="2" objectguid="3275223899_28196_19999_162_153_111_232_35_119_165_23" objectname="NVParameterList Object" progid="nvsys.NVParameterList.1"/></objects><media_objects><texture path="C:\Program Files\NVIDIA Corporation\NVIDIA FX Composer\MEDIA\textures\hdr\nave.hdr"/><effect path="F:\devtools\FXComposer\1.6\SDK\MEDIA\HLSL\tonemap.fx"><![CDATA[/*********************************************************************NVMH3**** File: $Id: //sw/devtools/FXComposer/1.6/SDK/MEDIA/HLSL/tonemap.fx#2 $ Copyright NVIDIA Corporation 2002 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: Simple tone mapping shader with exposure and gamma controls ******************************************************************************/ float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "scene"; string ScriptOrder = "standard"; string ScriptOutput = "color"; string Script = "Technique=Main;"; > = 0.8; // version # texture Image < string ResourceName = "nave.hdr"; string ResourceType = "2D"; string format="A16B16G16R16f"; >; sampler2D ImageSampler = sampler_state { Texture = <Image>; MinFilter = Linear; MagFilter = Linear; MipFilter = None; }; float exposure < string UIWidget = "slider"; string UIName = "Exposure"; float UIMin = -10.0; float UIMax = 10.0; float UIStep = 0.1; > = 0.0; float defog < string UIWidget = "slider"; string UIName = "De-fog"; float UIMin = 0.0; float UIMax = 0.1; float UIStep = 0.001; > = 0.0; float gamma < string UIWidget = "slider"; string UIName = "Gamma"; float UIMin = 0.0; float UIMax = 1.0; float UIStep = 0.01; > = 1.0 / 2.2; float3 fogColor = { 1.0, 1.0, 1.0 }; ////////////////////////////// struct a2v { float4 position : POSITION; float4 texcoord : TEXCOORD0; }; struct v2f { float4 position : POSITION; float4 texcoord : TEXCOORD0; // calculated values: float exposure : TEXCOORD1; }; ///////////////////////////////// v2f TonemapVS(a2v IN) { v2f OUT; OUT.position = IN.position; OUT.texcoord = IN.texcoord; OUT.exposure = pow(2.0, exposure); return OUT; } half4 TonemapPS(v2f IN, uniform half3 defog, uniform half gamma) : COLOR { half3 c = tex2D(ImageSampler, IN.texcoord); c = max(0, c - defog); c *= IN.exposure; // gamma correction - could use texture lookups for this c = pow(c, gamma); return half4(c.rgb, 1.0); } ////////////////////////////////////////// technique Main < string ScriptClass = "scene"; string ScriptOrder = "standard"; string ScriptOutput = "color"; string Script = "Pass=p0;"; > { pass p0 < string Script = "RenderColorTarget0=;" "Draw=Buffer;"; > { cullmode = none; ZEnable = false; AlphaBlendEnable = false; VertexShader = compile vs_1_1 TonemapVS(); PixelShader = compile ps_2_0 TonemapPS(defog*fogColor, gamma); } } ]]></effect></media_objects></fxstudio_project>