浏览代码

Clear out old core structure before adding the new module-ified structure.

Areloch 7 年之前
父节点
当前提交
bfc140a6fa
共有 100 个文件被更改,包括 0 次插入11972 次删除
  1. 0 10
      Templates/BaseGame/game/core/CoreComponents.cs
  2. 0 19
      Templates/BaseGame/game/core/CoreComponents.module
  3. 0 436
      Templates/BaseGame/game/core/audio.cs
  4. 0 162
      Templates/BaseGame/game/core/canvas.cs
  5. 0 8
      Templates/BaseGame/game/core/components/RigidBodyComponent.asset.taml
  6. 0 8
      Templates/BaseGame/game/core/components/animationComponent.asset.taml
  7. 0 8
      Templates/BaseGame/game/core/components/cameraOrbiterComponent.asset.taml
  8. 0 8
      Templates/BaseGame/game/core/components/collisionComponent.asset.taml
  9. 0 9
      Templates/BaseGame/game/core/components/game/camera.asset.taml
  10. 0 185
      Templates/BaseGame/game/core/components/game/camera.cs
  11. 0 10
      Templates/BaseGame/game/core/components/game/controlObject.asset.taml
  12. 0 89
      Templates/BaseGame/game/core/components/game/controlObject.cs
  13. 0 10
      Templates/BaseGame/game/core/components/game/itemRotate.asset.taml
  14. 0 49
      Templates/BaseGame/game/core/components/game/itemRotate.cs
  15. 0 10
      Templates/BaseGame/game/core/components/game/playerSpawner.asset.taml
  16. 0 78
      Templates/BaseGame/game/core/components/game/playerSpawner.cs
  17. 0 9
      Templates/BaseGame/game/core/components/input/fpsControls.asset.taml
  18. 0 247
      Templates/BaseGame/game/core/components/input/fpsControls.cs
  19. 0 82
      Templates/BaseGame/game/core/components/input/inputManager.cs
  20. 0 8
      Templates/BaseGame/game/core/components/meshComponent.asset.taml
  21. 0 8
      Templates/BaseGame/game/core/components/playerControllerComponent.asset.taml
  22. 0 8
      Templates/BaseGame/game/core/components/soundComponent.asset.taml
  23. 0 8
      Templates/BaseGame/game/core/components/stateMachineComponent.asset.taml
  24. 0 191
      Templates/BaseGame/game/core/console/console.gui
  25. 0 140
      Templates/BaseGame/game/core/console/main.cs
  26. 0 70
      Templates/BaseGame/game/core/console/profiles.cs
  27. 0 102
      Templates/BaseGame/game/core/cursor.cs
  28. 二进制
      Templates/BaseGame/game/core/fonts/Arial 10 (ansi).uft
  29. 二进制
      Templates/BaseGame/game/core/fonts/Arial 12 (ansi).uft
  30. 二进制
      Templates/BaseGame/game/core/fonts/Arial 14 (ansi).uft
  31. 二进制
      Templates/BaseGame/game/core/fonts/Arial 16 (ansi).uft
  32. 二进制
      Templates/BaseGame/game/core/fonts/Arial 36 (ansi).uft
  33. 二进制
      Templates/BaseGame/game/core/fonts/Arial Bold 14 (ansi).uft
  34. 二进制
      Templates/BaseGame/game/core/fonts/Arial Bold 16 (ansi).uft
  35. 二进制
      Templates/BaseGame/game/core/fonts/Arial Bold 18 (ansi).uft
  36. 二进制
      Templates/BaseGame/game/core/fonts/ArialBold 14 (ansi).uft
  37. 二进制
      Templates/BaseGame/game/core/fonts/ArialItalic 14 (ansi).uft
  38. 二进制
      Templates/BaseGame/game/core/fonts/Lucida Console 12 (ansi).uft
  39. 0 55
      Templates/BaseGame/game/core/gfxData/clouds.cs
  40. 0 79
      Templates/BaseGame/game/core/gfxData/commonMaterialData.cs
  41. 0 48
      Templates/BaseGame/game/core/gfxData/scatterSky.cs
  42. 0 152
      Templates/BaseGame/game/core/gfxData/shaders.cs
  43. 0 36
      Templates/BaseGame/game/core/gfxData/terrainBlock.cs
  44. 0 208
      Templates/BaseGame/game/core/gfxData/water.cs
  45. 0 36
      Templates/BaseGame/game/core/gfxprofile/D3D9.ATITechnologiesInc.cs
  46. 0 36
      Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.GeForce8600.cs
  47. 0 39
      Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.QuadroFXGo1000.cs
  48. 0 36
      Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.cs
  49. 0 26
      Templates/BaseGame/game/core/gfxprofile/D3D9.cs
  50. 0 102
      Templates/BaseGame/game/core/globals.cs
  51. 0 1158
      Templates/BaseGame/game/core/helperFunctions.cs
  52. 二进制
      Templates/BaseGame/game/core/images/AreaMap33.dds
  53. 二进制
      Templates/BaseGame/game/core/images/button.png
  54. 二进制
      Templates/BaseGame/game/core/images/caustics_1.png
  55. 二进制
      Templates/BaseGame/game/core/images/caustics_2.png
  56. 二进制
      Templates/BaseGame/game/core/images/checkbox.png
  57. 二进制
      Templates/BaseGame/game/core/images/group-border.png
  58. 二进制
      Templates/BaseGame/game/core/images/inactive-overlay.png
  59. 二进制
      Templates/BaseGame/game/core/images/loadingbar.png
  60. 0 32
      Templates/BaseGame/game/core/images/materials.cs
  61. 二进制
      Templates/BaseGame/game/core/images/missingTexture.png
  62. 二进制
      Templates/BaseGame/game/core/images/noise.png
  63. 二进制
      Templates/BaseGame/game/core/images/null_color_ramp.png
  64. 二进制
      Templates/BaseGame/game/core/images/scrollBar.png
  65. 二进制
      Templates/BaseGame/game/core/images/textEdit.png
  66. 二进制
      Templates/BaseGame/game/core/images/thumbHighlightButton.png
  67. 二进制
      Templates/BaseGame/game/core/images/unavailable.png
  68. 二进制
      Templates/BaseGame/game/core/images/warnMat.dds
  69. 二进制
      Templates/BaseGame/game/core/images/window.png
  70. 0 74
      Templates/BaseGame/game/core/lighting.cs
  71. 0 71
      Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs
  72. 0 68
      Templates/BaseGame/game/core/lighting/advanced/init.cs
  73. 0 276
      Templates/BaseGame/game/core/lighting/advanced/shaders.cs
  74. 0 92
      Templates/BaseGame/game/core/lighting/basic/init.cs
  75. 0 76
      Templates/BaseGame/game/core/lighting/basic/shadowFilter.cs
  76. 0 32
      Templates/BaseGame/game/core/lighting/shadowMaps/init.cs
  77. 0 99
      Templates/BaseGame/game/core/main.cs
  78. 0 248
      Templates/BaseGame/game/core/oculusVR.cs
  79. 0 19
      Templates/BaseGame/game/core/oculusVROverlay.gui
  80. 0 392
      Templates/BaseGame/game/core/parseArgs.cs
  81. 0 73
      Templates/BaseGame/game/core/postFX/GammaPostFX.cs
  82. 0 186
      Templates/BaseGame/game/core/postFX/MLAA.cs
  83. 0 53
      Templates/BaseGame/game/core/postFX/MotionBlurFx.cs
  84. 0 64
      Templates/BaseGame/game/core/postFX/caustics.cs
  85. 0 77
      Templates/BaseGame/game/core/postFX/chromaticLens.cs
  86. 0 72
      Templates/BaseGame/game/core/postFX/default.postfxpreset.cs
  87. 0 599
      Templates/BaseGame/game/core/postFX/dof.cs
  88. 0 113
      Templates/BaseGame/game/core/postFX/edgeAA.cs
  89. 0 63
      Templates/BaseGame/game/core/postFX/flash.cs
  90. 0 135
      Templates/BaseGame/game/core/postFX/fog.cs
  91. 0 64
      Templates/BaseGame/game/core/postFX/fxaa.cs
  92. 0 184
      Templates/BaseGame/game/core/postFX/glow.cs
  93. 0 529
      Templates/BaseGame/game/core/postFX/hdr.cs
  94. 0 110
      Templates/BaseGame/game/core/postFX/lightRay.cs
  95. 0 167
      Templates/BaseGame/game/core/postFX/ovrBarrelDistortion.cs
  96. 0 2755
      Templates/BaseGame/game/core/postFX/postFxManager.gui
  97. 0 446
      Templates/BaseGame/game/core/postFX/postFxManager.gui.cs
  98. 0 439
      Templates/BaseGame/game/core/postFX/postFxManager.gui.settings.cs
  99. 0 79
      Templates/BaseGame/game/core/postFX/postFxManager.persistance.cs
  100. 0 302
      Templates/BaseGame/game/core/postFX/ssao.cs

+ 0 - 10
Templates/BaseGame/game/core/CoreComponents.cs

@@ -1,10 +0,0 @@
-
-function CoreComponentsModule::onCreate(%this)
-{
-   %classList = enumerateConsoleClasses( "Component" );
-
-   foreach$( %componentClass in %classList )
-   {
-      echo("Native Component of type: " @ %componentClass);
-   }  
-}

+ 0 - 19
Templates/BaseGame/game/core/CoreComponents.module

@@ -1,19 +0,0 @@
-<ModuleDefinition
-	ModuleId="CoreComponentsModule"
-	VersionId="1"
-	Description="Module that implements the core engine-level components for the game."
-	ScriptFile="CoreComponents.cs"
-	CreateFunction="onCreate"
-	DestroyFunction="onDestroy"
-	Group="Game">
-	<DeclaredAssets
-           canSave="true"
-           canSaveDynamicFields="true"
-           Extension="asset.taml"
-           Recurse="true" />
-	<AutoloadAssets
-	   canSave="true"
-	   canSaveDynamicFields="true"
-	   AssetType="ComponentAsset"
-	   Recurse="true" />
-</ModuleDefinition>

+ 0 - 436
Templates/BaseGame/game/core/audio.cs

@@ -1,436 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-//    Source groups.
-//-----------------------------------------------------------------------------
-
-singleton SFXDescription( AudioMaster );
-singleton SFXSource( AudioChannelMaster )
-{
-   description = AudioMaster;
-};
-
-singleton SFXDescription( AudioChannel )
-{
-   sourceGroup = AudioChannelMaster;
-};
-
-singleton SFXSource( AudioChannelDefault )
-{
-   description = AudioChannel;
-};
-singleton SFXSource( AudioChannelGui )
-{
-   description = AudioChannel;
-};
-singleton SFXSource( AudioChannelEffects )
-{
-   description = AudioChannel;
-};
-singleton SFXSource( AudioChannelMessages )
-{
-   description = AudioChannel;
-};
-singleton SFXSource( AudioChannelMusic )
-{
-   description = AudioChannel;
-};
-
-// Set default playback states of the channels.
-
-AudioChannelMaster.play();
-AudioChannelDefault.play();
-
-AudioChannelGui.play();
-AudioChannelMusic.play();
-AudioChannelMessages.play();
-
-// Stop in-game effects channels.
-AudioChannelEffects.stop();
-
-//-----------------------------------------------------------------------------
-//    Master SFXDescriptions.
-//-----------------------------------------------------------------------------
-
-// Master description for interface audio.
-singleton SFXDescription( AudioGui )
-{
-   volume         = 1.0;
-   sourceGroup    = AudioChannelGui;
-};
-
-// Master description for game effects audio.
-singleton SFXDescription( AudioEffect )
-{
-   volume         = 1.0;
-   sourceGroup    = AudioChannelEffects;
-};
-
-// Master description for audio in notifications.
-singleton SFXDescription( AudioMessage )
-{
-   volume         = 1.0;
-   sourceGroup    = AudioChannelMessages;
-};
-
-// Master description for music.
-singleton SFXDescription( AudioMusic )
-{
-   volume         = 1.0;
-   sourceGroup    = AudioChannelMusic;
-};
-
-//-----------------------------------------------------------------------------
-//    SFX Functions.
-//-----------------------------------------------------------------------------
-
-/// This initializes the sound system device from
-/// the defaults in the $pref::SFX:: globals.
-function sfxStartup()
-{   
-   echo( "\nsfxStartup..." );
-   
-   // If we have a provider set, try initialize a device now.
-   
-   if( $pref::SFX::provider !$= "" )
-   {
-      if( sfxInit() )
-         return;
-      else
-      {
-         // Force auto-detection.
-         $pref::SFX::autoDetect = true;
-      }
-   }
-
-   // If enabled autodetect a safe device.
-
-   if( ( !isDefined( "$pref::SFX::autoDetect" ) || $pref::SFX::autoDetect ) &&
-       sfxAutodetect() )
-      return;
-   
-   // Failure.
-
-   error( "   Failed to initialize device!\n\n" );
-   
-   $pref::SFX::provider = "";
-   $pref::SFX::device   = "";
-   
-   return;
-}
-
-
-/// This initializes the sound system device from
-/// the defaults in the $pref::SFX:: globals.
-function sfxInit()
-{
-   // If already initialized, shut down the current device first.
-   
-   if( sfxGetDeviceInfo() !$= "" )
-      sfxShutdown();
-      
-   // Start it up!
-   %maxBuffers = $pref::SFX::useHardware ? -1 : $pref::SFX::maxSoftwareBuffers;
-   if ( !sfxCreateDevice( $pref::SFX::provider, $pref::SFX::device, $pref::SFX::useHardware, %maxBuffers ) )
-      return false;
-
-   // This returns a tab seperated string with
-   // the initialized system info.
-   %info = sfxGetDeviceInfo();
-   $pref::SFX::provider       = getField( %info, 0 );
-   $pref::SFX::device         = getField( %info, 1 );
-   $pref::SFX::useHardware    = getField( %info, 2 );
-   %useHardware               = $pref::SFX::useHardware ? "Yes" : "No";
-   %maxBuffers                = getField( %info, 3 );
-   
-   echo( "   Provider: "    @ $pref::SFX::provider );
-   echo( "   Device: "      @ $pref::SFX::device );
-   echo( "   Hardware: "    @ %useHardware );
-   echo( "   Max Buffers: " @ %maxBuffers );
-   echo( " " );
-   
-   if( isDefined( "$pref::SFX::distanceModel" ) )
-      sfxSetDistanceModel( $pref::SFX::distanceModel );
-   if( isDefined( "$pref::SFX::dopplerFactor" ) )
-      sfxSetDopplerFactor( $pref::SFX::dopplerFactor );
-   if( isDefined( "$pref::SFX::rolloffFactor" ) )
-      sfxSetRolloffFactor( $pref::SFX::rolloffFactor );
-
-   // Restore master volume.
-   
-   sfxSetMasterVolume( $pref::SFX::masterVolume );
-
-   // Restore channel volumes.
-   
-   for( %channel = 0; %channel <= 8; %channel ++ )
-      sfxSetChannelVolume( %channel, $pref::SFX::channelVolume[ %channel ] );
-      
-   return true;
-}
-
-
-/// Destroys the current sound system device.
-function sfxShutdown()
-{
-   // Store volume prefs.
-   
-   $pref::SFX::masterVolume = sfxGetMasterVolume();
-   
-   for( %channel = 0; %channel <= 8; %channel ++ )
-      $pref::SFX::channelVolume[ %channel ] = sfxGetChannelVolume( %channel );
-   
-   // We're assuming here that a null info 
-   // string means that no device is loaded.
-   if( sfxGetDeviceInfo() $= "" )
-      return;
-
-   sfxDeleteDevice();
-}
-
-
-/// Determines which of the two SFX providers is preferable.
-function sfxCompareProvider( %providerA, %providerB )
-{
-   if( %providerA $= %providerB )
-      return 0;
-      
-   switch$( %providerA )
-   {
-      // Always prefer FMOD over anything else.
-      case "FMOD":
-         return 1;
-         
-      // Prefer OpenAL over anything but FMOD.
-      case "OpenAL":
-         if( %providerB $= "FMOD" )
-            return -1;
-         else
-            return 1;
-      
-      // choose XAudio over DirectSound
-      case "XAudio":
-         if( %providerB $= "FMOD" || %providerB $= "OpenAL" )
-            return -1;
-         else
-            return 0;
-            
-      case "DirectSound":
-         if( %providerB !$= "FMOD" && %providerB !$= "OpenAL" && %providerB !$= "XAudio" )
-            return 1;
-         else
-            return -1;
-         
-      default:
-         return -1;
-   }
-}
-
-
-/// Try to detect and initalize the best SFX device available.
-function sfxAutodetect()
-{
-   // Get all the available devices.
-   
-   %devices = sfxGetAvailableDevices();
-
-   // Collect and sort the devices by preferentiality.
-   
-   %deviceTrySequence = new ArrayObject();
-   %bestMatch = -1;
-   %count = getRecordCount( %devices );
-   for( %i = 0; %i < %count; %i ++ )
-   {
-      %info = getRecord( %devices, %i );
-      %provider = getField( %info, 0 );
-         
-      %deviceTrySequence.push_back( %provider, %info );
-   }
-   
-   %deviceTrySequence.sortfkd( "sfxCompareProvider" );
-         
-   // Try the devices in order.
-   
-   %count = %deviceTrySequence.count();
-   for( %i = 0; %i < %count; %i ++ )
-   {
-      %provider = %deviceTrySequence.getKey( %i );
-      %info = %deviceTrySequence.getValue( %i );
-      
-      $pref::SFX::provider       = %provider;
-      $pref::SFX::device         = getField( %info, 1 );
-      $pref::SFX::useHardware    = getField( %info, 2 );
-      
-      // By default we've decided to avoid hardware devices as
-      // they are buggy and prone to problems.
-      $pref::SFX::useHardware = false;
-
-      if( sfxInit() )
-      {
-         $pref::SFX::autoDetect = false;
-         %deviceTrySequence.delete();
-         return true;
-      }
-   }
-   
-   // Found no suitable device.
-   
-   error( "sfxAutodetect - Could not initialize a valid SFX device." );
-   
-   $pref::SFX::provider = "";
-   $pref::SFX::device = "";
-   $pref::SFX::useHardware = "";
-   
-   %deviceTrySequence.delete();
-   
-   return false;
-}
-
-
-//-----------------------------------------------------------------------------
-//    Backwards-compatibility with old channel system.
-//-----------------------------------------------------------------------------
-
-// Volume channel IDs for backwards-compatibility.
-
-$GuiAudioType        = 1;  // Interface.
-$SimAudioType        = 2;  // Game.
-$MessageAudioType    = 3;  // Notifications.
-$MusicAudioType      = 4;  // Music.
-
-$AudioChannels[ 0 ] = AudioChannelDefault;
-$AudioChannels[ $GuiAudioType ] = AudioChannelGui;
-$AudioChannels[ $SimAudioType ] = AudioChannelEffects;
-$AudioChannels[ $MessageAudioType ] = AudioChannelMessages;
-$AudioChannels[ $MusicAudioType ] = AudioChannelMusic;
-
-function sfxOldChannelToGroup( %channel )
-{
-   return $AudioChannels[ %channel ];
-}
-
-function sfxGroupToOldChannel( %group )
-{
-   %id = %group.getId();
-   for( %i = 0;; %i ++ )
-      if( !isObject( $AudioChannels[ %i ] ) )
-         return -1;
-      else if( $AudioChannels[ %i ].getId() == %id )
-         return %i;
-         
-   return -1;
-}
-
-function sfxSetMasterVolume( %volume )
-{
-   AudioChannelMaster.setVolume( %volume );
-}
-
-function sfxGetMasterVolume( %volume )
-{
-   return AudioChannelMaster.getVolume();
-}
-
-function sfxStopAll( %channel )
-{
-   // Don't stop channel itself since that isn't quite what the function
-   // here intends.
-   
-   %channel = sfxOldChannelToGroup( %channel );
-   if (isObject(%channel))
-   {
-      foreach( %source in %channel )
-         %source.stop();
-   }
-}
-
-function sfxGetChannelVolume( %channel )
-{
-   %obj = sfxOldChannelToGroup( %channel );
-   if( isObject( %obj ) )
-      return %obj.getVolume();
-}
-
-function sfxSetChannelVolume( %channel, %volume )
-{
-   %obj = sfxOldChannelToGroup( %channel );
-   if( isObject( %obj ) )
-      %obj.setVolume( %volume );
-}
-
-/*singleton SimSet( SFXPausedSet );
-
-
-/// Pauses the playback of active sound sources.
-/// 
-/// @param %channels    An optional word list of channel indices or an empty 
-///                     string to pause sources on all channels.
-/// @param %pauseSet    An optional SimSet which is filled with the paused 
-///                     sources.  If not specified the global SfxSourceGroup 
-///                     is used.
-///
-/// @deprecated
-/// 
-function sfxPause( %channels, %pauseSet )
-{
-   // Did we get a set to populate?
-   if ( !isObject( %pauseSet ) )
-      %pauseSet = SFXPausedSet;
-      
-   %count = SFXSourceSet.getCount();
-   for ( %i = 0; %i < %count; %i++ )
-   {
-      %source = SFXSourceSet.getObject( %i );
-
-      %channel = sfxGroupToOldChannel( %source.getGroup() );
-      if( %channels $= "" || findWord( %channels, %channel ) != -1 )
-      {
-         %source.pause();
-         %pauseSet.add( %source );
-      }
-   }
-}
-
-
-/// Resumes the playback of paused sound sources.
-/// 
-/// @param %pauseSet    An optional SimSet which contains the paused sound 
-///                     sources to be resumed.  If not specified the global 
-///                     SfxSourceGroup is used.
-/// @deprecated
-///
-function sfxResume( %pauseSet )
-{
-   if ( !isObject( %pauseSet ) )
-      %pauseSet = SFXPausedSet;
-                  
-   %count = %pauseSet.getCount();
-   for ( %i = 0; %i < %count; %i++ )
-   {
-      %source = %pauseSet.getObject( %i );
-      %source.play();
-   }
-
-   // Clear our pause set... the caller is left
-   // to clear his own if he passed one.
-   %pauseSet.clear();
-}*/

+ 0 - 162
Templates/BaseGame/game/core/canvas.cs

@@ -1,162 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-function createCanvas(%windowTitle)
-{
-   if ($isDedicated)
-   {
-      GFXInit::createNullDevice();
-      return true;
-   }
-   
-   // Create the Canvas
-   $GameCanvas = new GuiCanvas(Canvas)
-   {
-      displayWindow = $platform !$= "windows";
-   };
-
-   // Set the window title
-   if (isObject(Canvas)) 
-   {
-      Canvas.setWindowTitle(%windowTitle @ " - " @ $pref::Video::displayDevice);
-      configureCanvas();
-   } 
-   else 
-   {
-      error("Canvas creation failed. Shutting down.");
-      quit();
-   }
-}
-
-// Constants for referencing video resolution preferences
-$WORD::RES_X = 0;
-$WORD::RES_Y = 1;
-$WORD::FULLSCREEN = 2;
-$WORD::BITDEPTH = 3;
-$WORD::REFRESH = 4;
-$WORD::AA = 5;
-
-function configureCanvas()
-{
-   // Setup a good default if we don't have one already.
-   if ($pref::Video::Resolution $= "")
-      $pref::Video::Resolution = "800 600";
-   if ($pref::Video::FullScreen $= "")
-      $pref::Video::FullScreen = false;
-   if ($pref::Video::BitDepth $= "")
-      $pref::Video::BitDepth = "32";
-   if ($pref::Video::RefreshRate $= "")
-      $pref::Video::RefreshRate = "60";
-   if ($pref::Video::AA $= "")
-      $pref::Video::AA = "4";
-
-   %resX = $pref::Video::Resolution.x;
-   %resY = $pref::Video::Resolution.y;
-   %fs = $pref::Video::FullScreen;
-   %bpp = $pref::Video::BitDepth;
-   %rate = $pref::Video::RefreshRate;
-   %aa = $pref::Video::AA;
-   
-   if($cliFullscreen !$= "") {
-      %fs = $cliFullscreen;
-      $cliFullscreen = "";
-   }
-   
-   echo("--------------");
-   echo("Attempting to set resolution to \"" @ %resX SPC %resY SPC %fs SPC %bpp SPC %rate SPC %aa @ "\"");
-   
-   %deskRes    = getDesktopResolution();      
-   %deskResX   = getWord(%deskRes, $WORD::RES_X);
-   %deskResY   = getWord(%deskRes, $WORD::RES_Y);
-   %deskResBPP = getWord(%deskRes, 2);
-   
-   // We shouldn't be getting this any more but just in case...
-   if (%bpp $= "Default")
-      %bpp = %deskResBPP;
-      
-   // Make sure we are running at a valid resolution
-   if (%fs $= "0" || %fs $= "false")
-   {
-      // Windowed mode has to use the same bit depth as the desktop
-      %bpp = %deskResBPP;
-      
-      // Windowed mode also has to run at a smaller resolution than the desktop
-      if ((%resX >= %deskResX) || (%resY >= %deskResY))
-      {
-         warn("Warning: The requested windowed resolution is equal to or larger than the current desktop resolution. Attempting to find a better resolution");
-      
-         %resCount = Canvas.getModeCount();
-         for (%i = (%resCount - 1); %i >= 0; %i--)
-         {
-            %testRes = Canvas.getMode(%i);
-            %testResX = getWord(%testRes, $WORD::RES_X);
-            %testResY = getWord(%testRes, $WORD::RES_Y);
-            %testBPP  = getWord(%testRes, $WORD::BITDEPTH);
-
-            if (%testBPP != %bpp)
-               continue;
-            
-            if ((%testResX < %deskResX) && (%testResY < %deskResY))
-            {
-               // This will work as our new resolution
-               %resX = %testResX;
-               %resY = %testResY;
-               
-               warn("Warning: Switching to \"" @ %resX SPC %resY SPC %bpp @ "\"");
-               
-               break;
-            }
-         }
-      }
-   }
-   
-   $pref::Video::Resolution = %resX SPC %resY;
-   $pref::Video::FullScreen = %fs;
-   $pref::Video::BitDepth = %bpp;
-   $pref::Video::RefreshRate = %rate;
-   $pref::Video::AA = %aa;
-   
-   if (%fs == 1 || %fs $= "true")
-      %fsLabel = "Yes";
-   else
-      %fsLabel = "No";
-
-   echo("Accepted Mode: " NL
-      "--Resolution : " @  %resX SPC %resY NL 
-      "--Full Screen : " @ %fsLabel NL
-      "--Bits Per Pixel : " @ %bpp NL
-      "--Refresh Rate : " @ %rate NL
-      "--AA TypeXLevel : " @ %aa NL
-      "--------------");
-
-   // Actually set the new video mode
-   Canvas.setVideoMode(%resX, %resY, %fs, %bpp, %rate, %aa);
-
-   commandToServer('setClientAspectRatio', %resX, %resY);
-
-   // AA piggybacks on the AA setting in $pref::Video::mode.
-   // We need to parse the setting between AA modes, and then it's level
-   // It's formatted as AATypexAALevel
-   // So, FXAAx4 or MLAAx2
-   if ( isObject( FXAA_PostEffect ) )
-      FXAA_PostEffect.isEnabled = ( %aa > 0 ) ? true : false;
-}

+ 0 - 8
Templates/BaseGame/game/core/components/RigidBodyComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="RigidBodyComponentAsset"
-    componentClass="RigidBodyComponent"
-    friendlyName="Rigid Body"
-    componentType="Physics"
-    description="Allows an entity to have rigid body physics." />

+ 0 - 8
Templates/BaseGame/game/core/components/animationComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="AnimationComponentAsset"
-    componentClass="AnimationComponent"
-    friendlyName="animation"
-    componentType="animation"
-    description="Allows a mesh component to be animated." />

+ 0 - 8
Templates/BaseGame/game/core/components/cameraOrbiterComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="CameraOrbiterComponentAsset"
-    componentClass="CameraOrbiterComponent"
-    friendlyName="Camera Orbiter"
-    componentType="Game"
-    description="Acts as a boon arm for a camera component." />

+ 0 - 8
Templates/BaseGame/game/core/components/collisionComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="CollisionComponentAsset"
-    componentClass="CollisionComponent"
-    friendlyName="Collision"
-    componentType="Collision"
-    description="Enables an entity to collide with things." />

+ 0 - 9
Templates/BaseGame/game/core/components/game/camera.asset.taml

@@ -1,9 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="CameraComponentAsset"
-    componentClass="CameraComponent"
-    friendlyName="Camera"
-    componentType="Game"
-    description="Allows the component owner to operate as a camera."
-    scriptFile="core/components/game/camera.cs" />

+ 0 - 185
Templates/BaseGame/game/core/components/game/camera.cs

@@ -1,185 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-function CameraComponent::onAdd(%this) 
-{
-   %this.addComponentField(clientOwner, "The client that views this camera", "int", "1", "");
-
-   %test = %this.clientOwner;
-
-   %barf = ClientGroup.getCount();
-
-   %clientID = %this.getClientID();
-   if(%clientID && !isObject(%clientID.camera))
-   {
-      %this.scopeToClient(%clientID);
-      %this.setDirty();
-
-      %clientID.setCameraObject(%this.owner);
-      %clientID.setControlCameraFov(%this.FOV);
-      
-      %clientID.camera = %this.owner;
-   }
-
-   %res = $pref::Video::mode;
-   %derp = 0;
-}
-
-function CameraComponent::onRemove(%this)
-{
-   %clientID = %this.getClientID();
-   if(%clientID)
-      %clientID.clearCameraObject();
-}
-
-function CameraComponent::onInspectorUpdate(%this)
-{
-   //if(%this.clientOwner)
-      //%this.clientOwner.setCameraObject(%this.owner);
-}
-
-function CameraComponent::getClientID(%this)
-{
-	return ClientGroup.getObject(%this.clientOwner-1);
-}
-
-function CameraComponent::isClientCamera(%this, %client)
-{
-	%clientID = ClientGroup.getObject(%this.clientOwner-1);
-	
-	if(%client.getID() == %clientID)
-		return true;
-	else
-	    return false;
-}
-
-function CameraComponent::onClientConnect(%this, %client)
-{
-   //if(%this.isClientCamera(%client) && !isObject(%client.camera))
-   //{
-      %this.scopeToClient(%client);
-      %this.setDirty();
-      
-      %client.setCameraObject(%this.owner);
-      %client.setControlCameraFov(%this.FOV);
-      
-      %client.camera = %this.owner;
-   //}
-   //else
-   //{
-   //   echo("CONNECTED CLIENT IS NOT CAMERA OWNER!");
-   //}
-}
-
-function CameraComponent::onClientDisconnect(%this, %client)
-{
-   Parent::onClientDisconnect(%this, %client);
-   
-   if(isClientCamera(%client)){
-      %this.clearScopeToClient(%client);
-      %client.clearCameraObject();
-   }
-}
-
-///
-///
-///
-
-function VRCameraComponent::onAdd(%this) 
-{
-   %this.addComponentField(clientOwner, "The client that views this camera", "int", "1", "");
-
-   %test = %this.clientOwner;
-
-   %barf = ClientGroup.getCount();
-
-   %clientID = %this.getClientID();
-   if(%clientID && !isObject(%clientID.camera))
-   {
-      %this.scopeToClient(%clientID);
-      %this.setDirty();
-
-      %clientID.setCameraObject(%this.owner);
-      %clientID.setControlCameraFov(%this.FOV);
-      
-      %clientID.camera = %this.owner;
-   }
-
-   %res = $pref::Video::mode;
-   %derp = 0;
-}
-
-function VRCameraComponent::onRemove(%this)
-{
-   %clientID = %this.getClientID();
-   if(%clientID)
-      %clientID.clearCameraObject();
-}
-
-function CameraComponent::onInspectorUpdate(%this)
-{
-   //if(%this.clientOwner)
-      //%this.clientOwner.setCameraObject(%this.owner);
-}
-
-function VRCameraComponent::getClientID(%this)
-{
-	return ClientGroup.getObject(%this.clientOwner-1);
-}
-
-function VRCameraComponent::isClientCamera(%this, %client)
-{
-	%clientID = ClientGroup.getObject(%this.clientOwner-1);
-	
-	if(%client.getID() == %clientID)
-		return true;
-	else
-	    return false;
-}
-
-function VRCameraComponent::onClientConnect(%this, %client)
-{
-   //if(%this.isClientCamera(%client) && !isObject(%client.camera))
-   //{
-      %this.scopeToClient(%client);
-      %this.setDirty();
-      
-      %client.setCameraObject(%this.owner);
-      %client.setControlCameraFov(%this.FOV);
-      
-      %client.camera = %this.owner;
-   //}
-   //else
-   //{
-   //   echo("CONNECTED CLIENT IS NOT CAMERA OWNER!");
-   //}
-}
-
-function VRCameraComponent::onClientDisconnect(%this, %client)
-{
-   Parent::onClientDisconnect(%this, %client);
-   
-   if(isClientCamera(%client)){
-      %this.clearScopeToClient(%client);
-      %client.clearCameraObject();
-   }
-}

+ 0 - 10
Templates/BaseGame/game/core/components/game/controlObject.asset.taml

@@ -1,10 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="ControlObjectComponentAsset"
-    componentName="ControlObjectComponent"
-    componentClass="Component"
-    friendlyName="Control Object"
-    componentType="Game"
-    description="Allows the component owner to be controlled by a client."
-    scriptFile="core/components/game/controlObject.cs" />

+ 0 - 89
Templates/BaseGame/game/core/components/game/controlObject.cs

@@ -1,89 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//registerComponent("ControlObjectComponent", "Component", "Control Object", "Game", false, "Allows the behavior owner to operate as a camera.");
-
-function ControlObjectComponent::onAdd(%this)
-{
-   %this.addComponentField(clientOwner, "The shape to use for rendering", "int", "1", "");
-
-   %clientID = %this.getClientID();
-
-   if(%clientID && !isObject(%clientID.getControlObject()))
-      %clientID.setControlObject(%this.owner);
-}
-
-function ControlObjectComponent::onRemove(%this)
-{
-   %clientID = %this.getClientID();
-	
-   if(%clientID)
-      %clientID.setControlObject(0);
-}
-
-function ControlObjectComponent::onClientConnect(%this, %client)
-{
-   if(%this.isControlClient(%client) && !isObject(%client.getControlObject()))
-      %client.setControlObject(%this.owner);
-}
-
-function ControlObjectComponent::onClientDisconnect(%this, %client)
-{
-   if(%this.isControlClient(%client))
-      %client.setControlObject(0);
-}
-
-function ControlObjectComponent::getClientID(%this)
-{
-	return ClientGroup.getObject(%this.clientOwner-1);
-}
-
-function ControlObjectComponent::isControlClient(%this, %client)
-{
-	%clientID = ClientGroup.getObject(%this.clientOwner-1);
-	
-	if(%client.getID() == %clientID)
-		return true;
-	else
-	    return false;
-}
-
-function ControlObjectComponent::onInspectorUpdate(%this, %field)
-{
-   %clientID = %this.getClientID();
-	
-   if(%clientID && !isObject(%clientID.getControlObject()))
-      %clientID.setControlObject(%this.owner);
-}
-
-function switchControlObject(%client, %newControlEntity)
-{
-	if(!isObject(%client) || !isObject(%newControlEntity))
-		return error("SwitchControlObject: No client or target controller!");
-		
-	%control = %newControlEntity.getComponent(ControlObjectComponent);
-		
-	if(!isObject(%control))
-		return error("SwitchControlObject: Target controller has no conrol object behavior!");
-		
-    %client.setControlObject(%newControlEntity);
-}

+ 0 - 10
Templates/BaseGame/game/core/components/game/itemRotate.asset.taml

@@ -1,10 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="ItemRotationComponentAsset"
-    componentName="ItemRotationComponent"
-    componentClass="Component"
-    friendlyName="Item Rotation"
-    componentType="Game"
-    description="Rotates the entity around an axis, like an item pickup."
-    scriptFile="core/components/game/itemRotate.cs" />

+ 0 - 49
Templates/BaseGame/game/core/components/game/itemRotate.cs

@@ -1,49 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//registerComponent("ItemRotationComponent", "Component", "Item Rotation", "Game", false, "Rotates the entity around the z axis, like an item pickup.");
-
-function ItemRotationComponent::onAdd(%this)
-{
-   %this.addComponentField(rotationsPerMinute, "Number of rotations per minute", "float", "5", "");
-   %this.addComponentField(forward, "Rotate forward or backwards", "bool", "1", "");
-   %this.addComponentField(horizontal, "Rotate horizontal or verticle, true for horizontal", "bool", "1", "");
-}
-
-function ItemRotationComponent::Update(%this)
-{
-    %tickRate = 0.032;
-    
-	//Rotations per second is calculated based on a standard update tick being 32ms. So we scale by the tick speed, then add that to our rotation to 
-	//get a nice rotation speed.
-	if(%this.horizontal)
-	{
-		if(%this.forward)
-			%this.owner.rotation.z += ( ( 360 * %this.rotationsPerMinute ) / 60 ) * %tickRate;
-		else
-			%this.owner.rotation.z -= ( ( 360 * %this.rotationsPerMinute ) / 60 ) * %tickRate;
-	}
-	else
-	{
-		%this.owner.rotation.x += ( ( 360 * %this.rotationsPerMinute ) / 60 ) * %tickRate;
-	}
-}

+ 0 - 10
Templates/BaseGame/game/core/components/game/playerSpawner.asset.taml

@@ -1,10 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="PlayerSpawnerComponentAsset"
-    componentName="PlayerSpawner"
-    componentClass="Component"
-    friendlyName="Player Spawner"
-    componentType="Game"
-    description="When a client connects, it spawns a player object for them and attaches them to it."
-    scriptFile="core/components/game/playerSpawner.cs" />

+ 0 - 78
Templates/BaseGame/game/core/components/game/playerSpawner.cs

@@ -1,78 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//registerComponent("PlayerSpawner", "Component", 
-//			"Player Spawner", "Game", false, "When a client connects, it spawns a player object for them and attaches them to it");
-
-function PlayerSpawner::onAdd(%this)
-{
-	%this.clientCount = 1;
-	%this.friendlyName = "Player Spawner";
-	%this.componentType = "Spawner";
-	
-	%this.addComponentField("GameObjectName", "The name of the game object we spawn for the players", "gameObject", "PlayerObject");
-}
-
-function PlayerSpawner::onClientConnect(%this, %client)
-{
-	%playerObj = spawnGameObject(%this.GameObjectName, false);
-	
-	if(!isObject(%playerObj))
-		return;
-
-	%playerObj.position = %this.owner.position;
-	
-	%playerObj.notify("onClientConnect", %client);
-	
-	switchControlObject(%client, %playerObj);
-	switchCamera(%client, %playerObj);
-	
-	%client.player = %playerObj;
-	%client.camera = %playerObj;
-	
-	%inventory = %playerObj.getComponent(InventoryController);
-	
-	if(isObject(%inventory))
-	{
-      for(%i=0; %i<5; %i++)
-      {
-         %arrow = spawnGameObject(ArrowProjectile, false);
-         
-         %inventory.addItem(%arrow);
-      }
-	}
-	
-	%playerObj.position = %this.owner.position;
-	%playerObj.rotation = "0 0 0";
-	
-	%this.clientCount++;
-}
-
-function PlayerSpawner::onClientDisConnect(%this, %client)
-{
-	
-}
-
-function PlayerSpawner::getClientID(%this)
-{
-	return ClientGroup.getObject(%this.clientOwner-1);
-}

+ 0 - 9
Templates/BaseGame/game/core/components/input/fpsControls.asset.taml

@@ -1,9 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="FPSControlsComponentAsset"
-    componentName="FPSControls"
-    componentClass="Component"
-    friendlyName="FPS Controls"
-    componentType="Input"
-    description="First Person Shooter-type controls." />

+ 0 - 247
Templates/BaseGame/game/core/components/input/fpsControls.cs

@@ -1,247 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//registerComponent("FPSControls", "Component", "FPS Controls", "Input", false, "First Person Shooter-type controls");
-
-function FPSControls::onAdd(%this)
-{
-   //
-	%this.beginGroup("Keys");
-		%this.addComponentField(forwardKey, "Key to bind to vertical thrust", keybind, "keyboard w");
-		%this.addComponentField(backKey, "Key to bind to vertical thrust", keybind, "keyboard s");
-		%this.addComponentField(leftKey, "Key to bind to horizontal thrust", keybind, "keyboard a");
-		%this.addComponentField(rightKey, "Key to bind to horizontal thrust", keybind, "keyboard d");
-		
-		%this.addComponentField(jump, "Key to bind to horizontal thrust", keybind, "keyboard space");
-	%this.endGroup();
-	
-	%this.beginGroup("Mouse");
-		%this.addComponentField(pitchAxis, "Key to bind to horizontal thrust", keybind, "mouse yaxis");
-		%this.addComponentField(yawAxis, "Key to bind to horizontal thrust", keybind, "mouse xaxis");
-	%this.endGroup();
-	
-	%this.addComponentField(moveSpeed, "Horizontal thrust force", float, 300.0);
-	%this.addComponentField(jumpStrength, "Vertical thrust force", float, 3.0);
-   //
-
-   %control = %this.owner.getComponent( ControlObjectComponent );
-   if(!%control)
-   	   return echo("SPECTATOR CONTROLS: No Control Object behavior!");
-		
-	//%this.Physics = %this.owner.getComponent( PlayerPhysicsComponent );
-	
-	//%this.Animation = %this.owner.getComponent( AnimationComponent );
-	
-	//%this.Camera = %this.owner.getComponent( MountedCameraComponent );
-	
-	//%this.Animation.playThread(0, "look");
-	
-	%this.setupControls(%control.getClientID());
-}
-
-function FPSControls::onRemove(%this)
-{
-   Parent::onBehaviorRemove(%this);
-   
-   commandToClient(%control.clientOwnerID, 'removeInput', %this.forwardKey);
-   commandToClient(%control.clientOwnerID, 'removeInput', %this.backKey);
-   commandToClient(%control.clientOwnerID, 'removeInput', %this.leftKey);
-   commandToClient(%control.clientOwnerID, 'removeInput', %this.rightKey);
-   
-   commandToClient(%control.clientOwnerID, 'removeInput', %this.pitchAxis);
-   commandToClient(%control.clientOwnerID, 'removeInput', %this.yawAxis);
-}
-
-function FPSControls::onBehaviorFieldUpdate(%this, %field)
-{
-   %controller = %this.owner.getBehavior( ControlObjectBehavior );
-   commandToClient(%controller.clientOwnerID, 'updateInput', %this.getFieldValue(%field), %field);
-}
-
-function FPSControls::onClientConnect(%this, %client)
-{
-   %this.setupControls(%client);
-}
-
-
-function FPSControls::setupControls(%this, %client)
-{
-   %control = %this.owner.getComponent( ControlObjectComponent );
-   if(!%control.isControlClient(%client))
-   {
-      echo("FPS CONTROLS: Client Did Not Match");
-      return;
-   }
-   
-   %inputCommand = "FPSControls";
-
-   %test = %this.forwardKey;
-   
-   /*SetInput(%client, %this.forwardKey.x,  %this.forwardKey.y,  %inputCommand@"_forwardKey");
-   SetInput(%client, %this.backKey.x,     %this.backKey.y,     %inputCommand@"_backKey");
-   SetInput(%client, %this.leftKey.x,     %this.leftKey.y,     %inputCommand@"_leftKey");
-   SetInput(%client, %this.rightKey.x,    %this.rightKey.y,    %inputCommand@"_rightKey");
-   
-   SetInput(%client, %this.jump.x,        %this.jump.y,        %inputCommand@"_jump");
-      
-   SetInput(%client, %this.pitchAxis.x,   %this.pitchAxis.y,   %inputCommand@"_pitchAxis");
-   SetInput(%client, %this.yawAxis.x,     %this.yawAxis.y,     %inputCommand@"_yawAxis");*/
-
-   SetInput(%client, "keyboard",  "w",  %inputCommand@"_forwardKey");
-   SetInput(%client, "keyboard",  "s",     %inputCommand@"_backKey");
-   SetInput(%client, "keyboard",  "a",     %inputCommand@"_leftKey");
-   SetInput(%client, "keyboard",  "d",    %inputCommand@"_rightKey");
-   
-   SetInput(%client, "keyboard",  "space",        %inputCommand@"_jump");
-      
-   SetInput(%client, "mouse",   "yaxis",   %inputCommand@"_pitchAxis");
-   SetInput(%client, "mouse",   "xaxis",     %inputCommand@"_yawAxis");
-
-   SetInput(%client, "keyboard",   "f",     %inputCommand@"_flashlight");
- 
-}
-
-function FPSControls::onMoveTrigger(%this, %triggerID)
-{
-   //check if our jump trigger was pressed!
-   if(%triggerID == 2)
-   {
-      %this.owner.applyImpulse("0 0 0", "0 0 " @ %this.jumpStrength);
-   }
-}
-
-function FPSControls::Update(%this)
-{
-	return;
-	
-	%moveVector = %this.owner.getMoveVector();
-	%moveRotation = %this.owner.getMoveRotation();
-	
-	%this.Physics.moveVector = "0 0 0";
-
-   if(%moveVector.x != 0)
-   {
-		%fv = VectorNormalize(%this.owner.getRightVector());
-      
-		%forMove = VectorScale(%fv, (%moveVector.x));// * (%this.moveSpeed * 0.032)));
-		
-   		//%this.Physics.velocity = VectorAdd(%this.Physics.velocity, %forMove);
-		
-		%this.Physics.moveVector = VectorAdd(%this.Physics.moveVector, %forMove);
-	
-		//if(%forMove > 0)
-		//	%this.Animation.playThread(1, "run");
-   }
-	/*else
-	{
-		%fv = VectorNormalize(%this.owner.getRightVector());
-      
-		%forMove = VectorScale(%fv, (%moveVector.x * (%this.moveSpeed * 0.032)));
-	
-	    if(%forMove <= 0)
-			%this.Animation.stopThread(1);
-		
-	}*/
-   
-   if(%moveVector.y != 0)
-   {
-      %fv = VectorNormalize(%this.owner.getForwardVector());
-      
-      %forMove = VectorScale(%fv, (%moveVector.y));// * (%this.moveSpeed * 0.032)));
-	
-	  //%this.Physics.velocity = VectorAdd(%this.Physics.velocity, %forMove);
-	
-	  %this.Physics.moveVector = VectorAdd(%this.Physics.moveVector, %forMove);
-      
-	//if(VectorLen(%this.Physics.velocity) < 2)
-    //  		%this.Physics.velocity = VectorAdd(%this.Physics.velocity, %forMove);
-   }
-   
-   /*if(%moveVector.z)
-   {
-      %fv = VectorNormalize(%this.owner.getUpVector());
-      
-      %forMove = VectorScale(%fv, (%moveVector.z * (%this.moveSpeed * 0.032)));
-      
-      %this.Physics.velocity = VectorAdd(%this.Physics.velocity, %forMove);
-   }*/
-   
-   if(%moveRotation.x != 0)
-   {
-		%look = mRadToDeg(%moveRotation.x) / 180;
-		
-		//%this.Animation.setThreadPos(0, %look);
-		
-		%this.owner.getComponent( MountedCameraComponent ).rotationOffset.x += mRadToDeg(%moveRotation.x);
-		
-		//%this.Camera.rotationOffset.x += mRadToDeg(%moveRotation.x);
-   }
-   //   %this.owner.rotation.x += mRadToDeg(%moveRotation.x);
-   
-   if(%moveRotation.z != 0)
-   {
-	  %zrot = mRadToDeg(%moveRotation.z);
-	  %this.owner.getComponent( MountedCameraComponent ).rotationOffset.z += %zrot;
-      //%this.owner.rotation.z += %zrot;
-   }
-}
-
-//
-function FPSControls_forwardKey(%val)
-{
-   $mvForwardAction = %val;
-}
-
-function FPSControls_backKey(%val)
-{
-   $mvBackwardAction = %val;
-}
-
-function FPSControls_leftKey(%val)
-{
-   $mvLeftAction = %val;
-}
-
-function FPSControls_rightKey(%val)
-{
-   $mvRightAction = %val;
-}
-
-function FPSControls_yawAxis(%val)
-{
-   $mvYaw += getMouseAdjustAmount(%val);
-}
-
-function FPSControls_pitchAxis(%val)
-{
-   $mvPitch += getMouseAdjustAmount(%val);
-}
-
-function FPSControls_jump(%val)
-{
-   $mvTriggerCount2++;
-}
-
-function FPSControls_flashLight(%val)
-{
-   $mvTriggerCount3++;
-}

+ 0 - 82
Templates/BaseGame/game/core/components/input/inputManager.cs

@@ -1,82 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-function SetInput(%client, %device, %key, %command, %bindMap, %behav)
-{
-   commandToClient(%client, 'SetInput', %device, %key, %command, %bindMap, %behav);  
-}
-
-function RemoveInput(%client, %device, %key, %command, %bindMap)
-{
-   commandToClient(%client, 'removeInput', %device, %key, %command, %bindMap);  
-}
-
-function clientCmdSetInput(%device, %key, %command, %bindMap, %behav)
-{
-   //if we're requesting a custom bind map, set that up
-   if(%bindMap $= "")
-      %bindMap = moveMap;
-   
-   if (!isObject(%bindMap)){
-      new ActionMap(moveMap);
-      moveMap.push();
-   }
-      
-   //get our local
-   //%localID = ServerConnection.resolveGhostID(%behav); 
-   
-   //%tmpl = %localID.getTemplate();
-   //%tmpl.insantiateNamespace(%tmpl.getName());
-      
-   //first, check if we have an existing command
-   %oldBind = %bindMap.getBinding(%command);
-   if(%oldBind !$= "")
-      %bindMap.unbind(getField(%oldBind, 0), getField(%oldBind, 1));
-    
-   //now, set the requested bind   
-   %bindMap.bind(%device, %key, %command);
-}
-
-function clientCmdRemoveSpecCtrlInput(%device, %key, %bindMap)
-{
-   //if we're requesting a custom bind map, set that up
-   if(%bindMap $= "")
-      %bindMap = moveMap;
-   
-   if (!isObject(%bindMap))
-      return;
-      
-   %bindMap.unbind(%device, %key);
-}
-
-function clientCmdSetupClientBehavior(%bhvrGstID)
-{
-   %localID = ServerConnection.resolveGhostID(%bhvrGstID); 
-   %tmpl = %localID.getTemplate();
-   %tmpl.insantiateNamespace(%tmpl.getName());
-}
-
-function getMouseAdjustAmount(%val)
-{
-   // based on a default camera FOV of 90'
-   return(%val * ($cameraFov / 90) * 0.01) * $pref::Input::LinkMouseSensitivity;
-}

+ 0 - 8
Templates/BaseGame/game/core/components/meshComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="MeshComponentAsset"
-    componentClass="MeshComponent"
-    friendlyName="mesh"
-    componentType="Render"
-    description="Enables an entity to render a shape." />

+ 0 - 8
Templates/BaseGame/game/core/components/playerControllerComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="PlayerControllerComponentAsset"
-    componentClass="PlayerControllerComponent"
-    friendlyName="Player Controller"
-    componentType="Game"
-    description="Enables an entity to move like a player object." />

+ 0 - 8
Templates/BaseGame/game/core/components/soundComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="SoundComponentAsset"
-    componentClass="SoundComponent"
-    friendlyName="Sound(Component)"
-    componentType="sound"
-    description="Stores up to 4 sounds for playback." />

+ 0 - 8
Templates/BaseGame/game/core/components/stateMachineComponent.asset.taml

@@ -1,8 +0,0 @@
-<ComponentAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="StateMachineComponentAsset"
-    componentClass="StateMachineComponent"
-    friendlyName="State Machine"
-    componentType="Game"
-    description="Enables a state machine on the entity." />

+ 0 - 191
Templates/BaseGame/game/core/console/console.gui

@@ -1,191 +0,0 @@
-//--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(ConsoleDlg) {
-   position = "0 0";
-   extent = "1024 768";
-   minExtent = "8 8";
-   horizSizing = "right";
-   vertSizing = "bottom";
-   profile = "GuiDefaultProfile";
-   visible = "1";
-   active = "1";
-   tooltipProfile = "GuiToolTipProfile";
-   hovertime = "1000";
-   isContainer = "1";
-   canSave = "1";
-   canSaveDynamicFields = "1";
-      helpTag = "0";
-
-   new GuiConsoleEditCtrl(ConsoleEntry) {
-      useSiblingScroller = "1";
-      historySize = "40";
-      tabComplete = "0";
-      sinkAllKeyEvents = "1";
-      password = "0";
-      passwordMask = "*";
-      maxLength = "255";
-      margin = "0 0 0 0";
-      padding = "0 0 0 0";
-      anchorTop = "1";
-      anchorBottom = "0";
-      anchorLeft = "1";
-      anchorRight = "0";
-      position = "0 750";
-      extent = "1024 18";
-      minExtent = "8 8";
-      horizSizing = "width";
-      vertSizing = "top";
-      profile = "ConsoleTextEditProfile";
-      visible = "1";
-      active = "1";
-      altCommand = "ConsoleEntry::eval();";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-   };
-   new GuiContainer() {
-      margin = "0 0 0 0";
-      padding = "0 0 0 0";
-      anchorTop = "1";
-      anchorBottom = "0";
-      anchorLeft = "1";
-      anchorRight = "0";
-      position = "1 728";
-      extent = "1024 22";
-      minExtent = "8 2";
-      horizSizing = "width";
-      vertSizing = "top";
-      profile = "GuiDefaultProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-
-      new GuiBitmapCtrl() {
-         bitmap = "data/ui/art/hudfill.png";
-         color = "255 255 255 255";
-         wrap = "0";
-         position = "0 0";
-         extent = "1024 22";
-         minExtent = "8 2";
-         horizSizing = "width";
-         vertSizing = "bottom";
-         profile = "GuiDefaultProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiCheckBoxCtrl(ConsoleDlgErrorFilterBtn) {
-         text = "Errors";
-         groupNum = "-1";
-         buttonType = "ToggleButton";
-         useMouseEvents = "0";
-         position = "2 2";
-         extent = "113 20";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiCheckBoxProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiCheckBoxCtrl(ConsoleDlgWarnFilterBtn) {
-         text = "Warnings";
-         groupNum = "-1";
-         buttonType = "ToggleButton";
-         useMouseEvents = "0";
-         position = "119 2";
-         extent = "113 20";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiCheckBoxProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiCheckBoxCtrl(ConsoleDlgNormalFilterBtn) {
-         text = "Normal Messages";
-         groupNum = "-1";
-         buttonType = "ToggleButton";
-         useMouseEvents = "0";
-         position = "236 2";
-         extent = "113 20";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiCheckBoxProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-   };
-   new GuiScrollCtrl() {
-      willFirstRespond = "1";
-      hScrollBar = "alwaysOn";
-      vScrollBar = "alwaysOn";
-      lockHorizScroll = "0";
-      lockVertScroll = "0";
-      constantThumbHeight = "0";
-      childMargin = "0 0";
-      mouseWheelScrollSpeed = "-1";
-      margin = "0 0 0 0";
-      padding = "0 0 0 0";
-      anchorTop = "1";
-      anchorBottom = "0";
-      anchorLeft = "1";
-      anchorRight = "0";
-      position = "0 0";
-      extent = "1024 730";
-      minExtent = "8 8";
-      horizSizing = "width";
-      vertSizing = "height";
-      profile = "ConsoleScrollProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      internalName = "Scroll";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-
-      new GuiConsole(ConsoleMessageLogView) {
-         position = "1 1";
-         extent = "622 324";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiConsoleProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-   };
-};
-//--- OBJECT WRITE END ---

+ 0 - 140
Templates/BaseGame/game/core/console/main.cs

@@ -1,140 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-exec("./profiles.cs");
-exec("./console.gui");
-
-GlobalActionMap.bind("keyboard", "tilde", "toggleConsole");
-
-function ConsoleEntry::eval()
-{
-   %text = trim(ConsoleEntry.getValue());
-   if(%text $= "")
-      return;
-
-   // If it's missing a trailing () and it's not a variable,
-   // append the parentheses.
-   if(strpos(%text, "(") == -1 && !isDefined(%text)) {
-      if(strpos(%text, "=") == -1 && strpos(%text, " ") == -1) {
-         if(strpos(%text, "{") == -1 && strpos(%text, "}") == -1) {
-            %text = %text @ "()";
-         }
-      }
-   }
-
-   // Append a semicolon if need be.
-   %pos = strlen(%text) - 1;
-   if(strpos(%text, ";", %pos) == -1 && strpos(%text, "}") == -1) {
-      %text = %text @ ";";
-   }
-
-   // Turn off warnings for assigning from void
-   // and evaluate the snippet.
-   if(!isDefined("$Con::warnVoidAssignment"))
-      %oldWarnVoidAssignment = true;
-   else
-      %oldWarnVoidAssignment = $Con::warnVoidAssignment;
-   $Con::warnVoidAssignment = false;
-
-   echo("==>" @ %text);
-   if(   !startsWith(%text, "function ")
-       && !startsWith(%text, "datablock ")
-       && !startsWith(%text, "foreach(")
-       && !startsWith(%text, "foreach$(")
-       && !startsWith(%text, "if(")
-       && !startsWith(%text, "while(")
-       && !startsWith(%text, "for(")
-       && !startsWith(%text, "switch(")
-       && !startsWith(%text, "switch$("))
-      eval("%result = " @ %text);
-   else
-      eval(%text);
-   $Con::warnVoidAssignment = %oldWarnVoidAssignment;
-
-   ConsoleEntry.setValue("");
-
-   // Echo result.
-   if(%result !$= "")
-      echo(%result);
-}
-
-function ToggleConsole(%make)
-{
-   if (%make) {
-      if (ConsoleDlg.isAwake()) {
-         // Deactivate the console.
-         Canvas.popDialog(ConsoleDlg);
-      } else {
-         Canvas.pushDialog(ConsoleDlg, 99);         
-      }
-   }
-}
-
-function ConsoleDlg::hideWindow(%this)
-{
-   %this-->Scroll.setVisible(false);
-}
-
-function ConsoleDlg::showWindow(%this)
-{
-   %this-->Scroll.setVisible(true);
-}
-
-function ConsoleDlg::onWake(%this)
-{
-   ConsoleDlgErrorFilterBtn.setStateOn(ConsoleMessageLogView.getErrorFilter());
-   ConsoleDlgWarnFilterBtn.setStateOn(ConsoleMessageLogView.getWarnFilter());
-   ConsoleDlgNormalFilterBtn.setStateOn(ConsoleMessageLogView.getNormalFilter());
-   
-   ConsoleMessageLogView.refresh();
-}
-
-function ConsoleDlg::setAlpha( %this, %alpha)
-{
-   if (%alpha $= "")
-      ConsoleScrollProfile.fillColor = $ConsoleDefaultFillColor;
-   else
-      ConsoleScrollProfile.fillColor = getWords($ConsoleDefaultFillColor, 0, 2) SPC %alpha * 255.0;
-}
-
-function ConsoleDlgErrorFilterBtn::onClick(%this)
-{
-   ConsoleMessageLogView.toggleErrorFilter();
-}
-
-function ConsoleDlgWarnFilterBtn::onClick(%this)
-{
-  
-   ConsoleMessageLogView.toggleWarnFilter();
-}
-
-function ConsoleDlgNormalFilterBtn::onClick(%this)
-{
-   ConsoleMessageLogView.toggleNormalFilter();
-}
-
-function ConsoleMessageLogView::onNewMessage(%this, %errorCount, %warnCount, %normalCount)
-{
-   ConsoleDlgErrorFilterBtn.setText("(" @ %errorCount @ ") Errors");
-   ConsoleDlgWarnFilterBtn.setText("(" @ %warnCount @ ") Warnings");
-   ConsoleDlgNormalFilterBtn.setText("(" @ %normalCount @ ") Messages");
-}

+ 0 - 70
Templates/BaseGame/game/core/console/profiles.cs

@@ -1,70 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-if(!isObject(GuiConsoleProfile))
-new GuiControlProfile(GuiConsoleProfile)
-{
-   fontType = ($platform $= "macos") ? "Monaco" : "Lucida Console";
-   fontSize = ($platform $= "macos") ? 13 : 12;
-   fontColor = "255 255 255";
-   fontColorHL = "0 255 255";
-   fontColorNA = "255 0 0";
-   fontColors[6] = "100 100 100";
-   fontColors[7] = "100 100 0";
-   fontColors[8] = "0 0 100";
-   fontColors[9] = "0 100 0";
-   category = "Core";
-};
-
-if(!isObject(GuiConsoleTextProfile))
-new GuiControlProfile(GuiConsoleTextProfile)
-{   
-   fontColor = "0 0 0";
-   autoSizeWidth = true;
-   autoSizeHeight = true;   
-   textOffset = "2 2";
-   opaque = true;   
-   fillColor = "255 255 255";
-   border = true;
-   borderThickness = 1;
-   borderColor = "0 0 0";
-   category = "Core";
-};
-
-if(!isObject(ConsoleScrollProfile))
-new GuiControlProfile(ConsoleScrollProfile : GuiScrollProfile)
-{
-	opaque = true;
-	fillColor = "0 0 0 175";
-	border = 1;
-	//borderThickness = 0;
-	borderColor = "0 0 0";
-   category = "Core";
-};
-
-if(!isObject(ConsoleTextEditProfile))
-new GuiControlProfile(ConsoleTextEditProfile : GuiTextEditProfile)
-{
-   fillColor = "242 241 240 255";
-   fillColorHL = "255 255 255";   
-   category = "Core";
-};

+ 0 - 102
Templates/BaseGame/game/core/cursor.cs

@@ -1,102 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------------------------
-// Cursor toggle functions.
-//---------------------------------------------------------------------------------------------
-$cursorControlled = true;
-function showCursor()
-{
-   if ($cursorControlled)
-      lockMouse(false);
-   Canvas.cursorOn();
-}
-
-function hideCursor()
-{
-   if ($cursorControlled)
-      lockMouse(true);
-   Canvas.cursorOff();
-}
-
-//---------------------------------------------------------------------------------------------
-// In the CanvasCursor package we add some additional functionality to the built-in GuiCanvas
-// class, of which the global Canvas object is an instance. In this case, the behavior we want
-// is for the cursor to automatically display, except when the only guis visible want no
-// cursor - usually the in game interface.
-//---------------------------------------------------------------------------------------------
-package CanvasCursorPackage
-{
-
-//---------------------------------------------------------------------------------------------
-// checkCursor
-// The checkCursor method iterates through all the root controls on the canvas checking each
-// ones noCursor property. If the noCursor property exists as anything other than false or an
-// empty string on every control, the cursor will be hidden.
-//---------------------------------------------------------------------------------------------
-function GuiCanvas::checkCursor(%this)
-{
-   %count = %this.getCount();
-   for(%i = 0; %i < %count; %i++)
-   {
-      %control = %this.getObject(%i);
-      if ((%control.noCursor $= "") || !%control.noCursor)
-      {
-         showCursor();
-         return;
-      }
-   }
-   // If we get here, every control requested a hidden cursor, so we oblige.
-   hideCursor();
-}
-
-//---------------------------------------------------------------------------------------------
-// The following functions override the GuiCanvas defaults that involve changing the content
-// of the Canvas. Basically, all we are doing is adding a call to checkCursor to each one.
-//---------------------------------------------------------------------------------------------
-function GuiCanvas::setContent(%this, %ctrl)
-{
-   Parent::setContent(%this, %ctrl);
-   %this.checkCursor();
-}
-
-function GuiCanvas::pushDialog(%this, %ctrl, %layer, %center)
-{
-   Parent::pushDialog(%this, %ctrl, %layer, %center);
-   %this.checkCursor();
-}
-
-function GuiCanvas::popDialog(%this, %ctrl)
-{
-   Parent::popDialog(%this, %ctrl);
-   %this.checkCursor();
-}
-
-function GuiCanvas::popLayer(%this, %layer)
-{
-   Parent::popLayer(%this, %layer);
-   %this.checkCursor();
-}
-
-};
-
-activatePackage(CanvasCursorPackage);

二进制
Templates/BaseGame/game/core/fonts/Arial 10 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Arial 12 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Arial 14 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Arial 16 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Arial 36 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Arial Bold 14 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Arial Bold 16 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Arial Bold 18 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/ArialBold 14 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/ArialItalic 14 (ansi).uft


二进制
Templates/BaseGame/game/core/fonts/Lucida Console 12 (ansi).uft


+ 0 - 55
Templates/BaseGame/game/core/gfxData/clouds.cs

@@ -1,55 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//------------------------------------------------------------------------------
-// CloudLayer
-//------------------------------------------------------------------------------
-
-singleton ShaderData( CloudLayerShader )
-{
-   DXVertexShaderFile   = $Core::CommonShaderPath @ "/cloudLayerV.hlsl";
-   DXPixelShaderFile    = $Core::CommonShaderPath @ "/cloudLayerP.hlsl";
-   
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/cloudLayerV.glsl";
-   OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/cloudLayerP.glsl";
-      
-   samplerNames[0] = "$normalHeightMap";
-      
-   pixVersion = 2.0;   
-};
-
-//------------------------------------------------------------------------------
-// BasicClouds
-//------------------------------------------------------------------------------
-
-singleton ShaderData( BasicCloudsShader )
-{
-   DXVertexShaderFile   = $Core::CommonShaderPath @ "/basicCloudsV.hlsl";
-   DXPixelShaderFile    = $Core::CommonShaderPath @ "/basicCloudsP.hlsl";
-   
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/basicCloudsV.glsl";
-   OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/basicCloudsP.glsl";
-   
-   samplerNames[0] = "$diffuseMap";
-      
-   pixVersion = 2.0;   
-};

+ 0 - 79
Templates/BaseGame/game/core/gfxData/commonMaterialData.cs

@@ -1,79 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Anim flag settings - must match material.h
-// These cannot be enumed through script becuase it cannot
-// handle the "|" operation for combining them together
-// ie. Scroll | Wave does not work.
-//-----------------------------------------------------------------------------
-$scroll = 1;
-$rotate = 2;
-$wave   = 4;
-$scale  = 8;
-$sequence = 16;
-
-
-// Common stateblock definitions
-new GFXSamplerStateData(SamplerClampLinear)
-{
-   textureColorOp = GFXTOPModulate;
-   addressModeU = GFXAddressClamp;
-   addressModeV = GFXAddressClamp;
-   addressModeW = GFXAddressClamp;
-   magFilter = GFXTextureFilterLinear;
-   minFilter = GFXTextureFilterLinear;
-   mipFilter = GFXTextureFilterLinear;
-};
-
-new GFXSamplerStateData(SamplerClampPoint)
-{
-   textureColorOp = GFXTOPModulate;
-   addressModeU = GFXAddressClamp;
-   addressModeV = GFXAddressClamp;
-   addressModeW = GFXAddressClamp;
-   magFilter = GFXTextureFilterPoint;
-   minFilter = GFXTextureFilterPoint;
-   mipFilter = GFXTextureFilterPoint;
-};
-
-new GFXSamplerStateData(SamplerWrapLinear)
-{
-   textureColorOp = GFXTOPModulate;
-   addressModeU = GFXTextureAddressWrap;
-   addressModeV = GFXTextureAddressWrap;
-   addressModeW = GFXTextureAddressWrap;
-   magFilter = GFXTextureFilterLinear;
-   minFilter = GFXTextureFilterLinear;
-   mipFilter = GFXTextureFilterLinear;
-};
-
-new GFXSamplerStateData(SamplerWrapPoint)
-{
-   textureColorOp = GFXTOPModulate;
-   addressModeU = GFXTextureAddressWrap;
-   addressModeV = GFXTextureAddressWrap;
-   addressModeW = GFXTextureAddressWrap;
-   magFilter = GFXTextureFilterPoint;
-   minFilter = GFXTextureFilterPoint;
-   mipFilter = GFXTextureFilterPoint;
-};

+ 0 - 48
Templates/BaseGame/game/core/gfxData/scatterSky.cs

@@ -1,48 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-new GFXStateBlockData( ScatterSkySBData )
-{
-   cullMode = "GFXCullNone";
-   
-   zDefined = true;
-   zEnable = true;
-   zWriteEnable = false;
-   
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;   
-   samplerStates[1] = SamplerClampLinear;
-   vertexColorEnable = true;
-};
-
-singleton ShaderData( ScatterSkyShaderData )
-{
-   DXVertexShaderFile     = $Core::CommonShaderPath @ "/scatterSkyV.hlsl";
-   DXPixelShaderFile      = $Core::CommonShaderPath @ "/scatterSkyP.hlsl";   
-   
-   OGLVertexShaderFile     = $Core::CommonShaderPath @ "/gl/scatterSkyV.glsl";
-   OGLPixelShaderFile      = $Core::CommonShaderPath @ "/gl/scatterSkyP.glsl";   
-   
-   samplerNames[0] = "$nightSky";
-   
-   pixVersion = 2.0;
-};

+ 0 - 152
Templates/BaseGame/game/core/gfxData/shaders.cs

@@ -1,152 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-//  This file contains shader data necessary for various engine utility functions
-//-----------------------------------------------------------------------------
-
-
-singleton ShaderData( ParticlesShaderData )
-{
-   DXVertexShaderFile     = $Core::CommonShaderPath @ "/particlesV.hlsl";
-   DXPixelShaderFile      = $Core::CommonShaderPath @ "/particlesP.hlsl";   
-   
-   OGLVertexShaderFile     = $Core::CommonShaderPath @ "/gl/particlesV.glsl";
-   OGLPixelShaderFile      = $Core::CommonShaderPath @ "/gl/particlesP.glsl";
-   
-   samplerNames[0] = "$diffuseMap";
-   samplerNames[1] = "$deferredTex";
-   samplerNames[2] = "$paraboloidLightMap";
-   
-   pixVersion = 2.0;
-};
-
-singleton ShaderData( OffscreenParticleCompositeShaderData )
-{
-   DXVertexShaderFile     = $Core::CommonShaderPath @ "/particleCompositeV.hlsl";
-   DXPixelShaderFile      = $Core::CommonShaderPath @ "/particleCompositeP.hlsl";
-   
-   OGLVertexShaderFile     = $Core::CommonShaderPath @ "/gl/particleCompositeV.glsl";
-   OGLPixelShaderFile      = $Core::CommonShaderPath @ "/gl/particleCompositeP.glsl";
-   
-   samplerNames[0] = "$colorSource";
-   samplerNames[1] = "$edgeSource";
-   
-   pixVersion = 2.0;
-};
-
-//-----------------------------------------------------------------------------
-// Planar Reflection
-//-----------------------------------------------------------------------------
-new ShaderData( ReflectBump )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/planarReflectBumpV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/planarReflectBumpP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/gl/planarReflectBumpV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/gl/planarReflectBumpP.glsl";
-              
-   samplerNames[0] = "$diffuseMap";
-   samplerNames[1] = "$refractMap";
-   samplerNames[2] = "$bumpMap";
-   
-   pixVersion = 2.0;
-};
-
-new ShaderData( Reflect )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/planarReflectV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/planarReflectP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/gl/planarReflectV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/gl/planarReflectP.glsl";
-   
-   samplerNames[0] = "$diffuseMap";
-   samplerNames[1] = "$refractMap";
-   
-   pixVersion = 1.4;
-};
-
-//-----------------------------------------------------------------------------
-// fxFoliageReplicator
-//-----------------------------------------------------------------------------
-new ShaderData( fxFoliageReplicatorShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/fxFoliageReplicatorV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/fxFoliageReplicatorP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/gl/fxFoliageReplicatorV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/gl/fxFoliageReplicatorP.glsl";
-
-   samplerNames[0] = "$diffuseMap";
-   samplerNames[1] = "$alphaMap";
-   
-   pixVersion = 1.4;
-};
-
-singleton ShaderData( VolumetricFogDeferredShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogPreV.hlsl";
-   DXPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogPreP.hlsl";
-	
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogPreV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogPreP.glsl";
-   
-   pixVersion = 3.0;
-};
-singleton ShaderData( VolumetricFogShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogV.hlsl";
-   DXPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogP.hlsl";
-	
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogP.glsl";	
-	
-   samplerNames[0] = "$deferredTex";
-   samplerNames[1] = "$depthBuffer";
-   samplerNames[2] = "$frontBuffer";
-   samplerNames[3] = "$density";
-   
-   pixVersion = 3.0;
-};
-singleton ShaderData( VolumetricFogReflectionShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogPreV.hlsl";
-   DXPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogRefl.hlsl";
-	
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogPreV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogRefl.glsl";
-
-   pixVersion = 3.0;
-};
-singleton ShaderData( CubemapSaveShader )
-{
-   DXVertexShaderFile = "shaders/common/cubemapSaveV.hlsl";
-   DXPixelShaderFile = "shaders/common/cubemapSaveP.hlsl";
-	
-   OGLVertexShaderFile  = "shaders/common/gl/cubemapSaveV.glsl";
-   OGLPixelShaderFile   = "shaders/common/gl/cubemapSaveP.glsl";
-   
-   samplerNames[0] = "$cubemapTex";
-	
-   pixVersion = 3.0;
-};

+ 0 - 36
Templates/BaseGame/game/core/gfxData/terrainBlock.cs

@@ -1,36 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-/// Used when generating the blended base texture.
-singleton ShaderData( TerrainBlendShader )
-{
-   DXVertexShaderFile   = $Core::CommonShaderPath @ "/terrain/blendV.hlsl";
-   DXPixelShaderFile    = $Core::CommonShaderPath @ "/terrain/blendP.hlsl";
-   
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/terrain/gl/blendV.glsl";
-   OGLPixelShaderFile = $Core::CommonShaderPath @ "/terrain/gl/blendP.glsl";
-   
-   samplerNames[0] = "layerTex";
-   samplerNames[1] = "textureMap";
-   
-   pixVersion = 2.0;
-};

+ 0 - 208
Templates/BaseGame/game/core/gfxData/water.cs

@@ -1,208 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-
-//-----------------------------------------------------------------------------
-// Water
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( WaterShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/water/waterV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/water/waterP.hlsl";
-   
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/water/gl/waterV.glsl";
-   OGLPixelShaderFile = $Core::CommonShaderPath @ "/water/gl/waterP.glsl";
-   
-   samplerNames[0] = "$bumpMap";  // noise
-   samplerNames[1] = "$deferredTex";  // #deferred
-   samplerNames[2] = "$reflectMap"; // $reflectbuff
-   samplerNames[3] = "$refractBuff";  // $backbuff
-   samplerNames[4] = "$skyMap";  // $cubemap   
-   samplerNames[5] = "$foamMap";  // foam     
-   samplerNames[6] = "$depthGradMap"; // depthMap ( color gradient ) 
-   
-   pixVersion = 3.0;
-};
-
-new GFXSamplerStateData(WaterSampler)
-{
-   textureColorOp = GFXTOPModulate;
-   addressModeU = GFXAddressWrap;
-   addressModeV = GFXAddressWrap;
-   addressModeW = GFXAddressWrap;
-   magFilter = GFXTextureFilterLinear;
-   minFilter = GFXTextureFilterAnisotropic;
-   mipFilter = GFXTextureFilterLinear;
-   maxAnisotropy = 4;
-};
-
-singleton GFXStateBlockData( WaterStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = WaterSampler;  // noise
-   samplerStates[1] = SamplerClampPoint;  // #deferred
-   samplerStates[2] = SamplerClampLinear; // $reflectbuff
-   samplerStates[3] = SamplerClampPoint;  // $backbuff
-   samplerStates[4] = SamplerWrapLinear;  // $cubemap   
-   samplerStates[5] = SamplerWrapLinear;  // foam     
-   samplerStates[6] = SamplerClampLinear; // depthMap ( color gradient ) 
-   cullDefined = true;
-   cullMode = "GFXCullCCW";
-};
-
-singleton GFXStateBlockData( UnderWaterStateBlock : WaterStateBlock )
-{
-   cullMode = "GFXCullCW";
-};
-
-singleton CustomMaterial( WaterMat )
-{   
-   sampler["deferredTex"] = "#deferred";
-   sampler["reflectMap"] = "$reflectbuff";
-   sampler["refractBuff"] = "$backbuff";
-   // These samplers are set in code not here.
-   // This is to allow different WaterObject instances
-   // to use this same material but override these textures
-   // per instance.
-   //sampler["bumpMap"] = "";    
-   //sampler["skyMap"] = "";
-   //sampler["foamMap"] = "";  
-   //sampler["depthGradMap"] = "";
-   
-   shader = WaterShader;
-   stateBlock = WaterStateBlock;
-   version = 3.0;
-   
-   useAnisotropic[0] = true;
-};
-
-//-----------------------------------------------------------------------------
-// Underwater
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( UnderWaterShader : WaterShader )
-{   
-   defines = "UNDERWATER";   
-};
-
-singleton CustomMaterial( UnderwaterMat )
-{  
-   // These samplers are set in code not here.
-   // This is to allow different WaterObject instances
-   // to use this same material but override these textures
-   // per instance.   
-   //sampler["bumpMap"] = "core/art/water/noise02";
-   //sampler["foamMap"] = "core/art/water/foam";
-
-   sampler["deferredTex"] = "#deferred";
-   sampler["refractBuff"] = "$backbuff";   
-   
-   shader = UnderWaterShader;
-   stateBlock = UnderWaterStateBlock;
-   specular = "0.75 0.75 0.75 1.0";
-   specularPower = 48.0;
-   version = 3.0;
-};
-
-//-----------------------------------------------------------------------------
-// Basic Water
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( WaterBasicShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/water/waterBasicV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/water/waterBasicP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/water/gl/waterBasicV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/water/gl/waterBasicP.glsl";
-   
-   samplerNames[0] = "$bumpMap";
-   samplerNames[2] = "$reflectMap";
-   samplerNames[3] = "$refractBuff";
-   samplerNames[4] = "$skyMap";
-   samplerNames[5] = "$depthGradMap";
-   
-   pixVersion = 2.0;
-};
-
-singleton GFXStateBlockData( WaterBasicStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = WaterSampler;  // noise
-   samplerStates[2] = SamplerClampLinear;  // $reflectbuff
-   samplerStates[3] = SamplerClampPoint;  // $backbuff
-   samplerStates[4] = SamplerWrapLinear;  // $cubemap
-   cullDefined = true;
-   cullMode = "GFXCullCCW";
-};
-
-singleton GFXStateBlockData( UnderWaterBasicStateBlock : WaterBasicStateBlock )
-{
-   cullMode = "GFXCullCW";
-};
-
-singleton CustomMaterial( WaterBasicMat )
-{
-   // These samplers are set in code not here.
-   // This is to allow different WaterObject instances
-   // to use this same material but override these textures
-   // per instance.     
-   //sampler["bumpMap"] = "core/art/water/noise02";
-   //sampler["skyMap"] = "$cubemap";   
-   
-   //sampler["deferredTex"] = "#deferred";
-   sampler["reflectMap"] = "$reflectbuff";
-   sampler["refractBuff"] = "$backbuff";
-    
-   cubemap = NewLevelSkyCubemap;
-   shader = WaterBasicShader;
-   stateBlock = WaterBasicStateBlock;
-   version = 2.0;
-};
-
-//-----------------------------------------------------------------------------
-// Basic UnderWater
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( UnderWaterBasicShader : WaterBasicShader)
-{
-   defines = "UNDERWATER";  
-};
-
-singleton CustomMaterial( UnderwaterBasicMat )
-{
-   // These samplers are set in code not here.
-   // This is to allow different WaterObject instances
-   // to use this same material but override these textures
-   // per instance.  
-   //sampler["bumpMap"] = "core/art/water/noise02";
-   //samplers["skyMap"] = "$cubemap";  
-
-   //sampler["deferredTex"] = "#deferred";
-   sampler["refractBuff"] = "$backbuff";
-   
-   shader = UnderWaterBasicShader;
-   stateBlock = UnderWaterBasicStateBlock;
-   version = 2.0;
-};

+ 0 - 36
Templates/BaseGame/game/core/gfxprofile/D3D9.ATITechnologiesInc.cs

@@ -1,36 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// ATI Vendor Profile Script
-//
-// This script is responsible for setting global
-// capability strings based on the nVidia vendor.
-
-if(GFXCardProfiler::getVersion() < 64.44)
-{
-	$GFX::OutdatedDrivers = true;
-	$GFX::OutdatedDriversLink = "<a:www.ati.com>You can get newer drivers here.</a>.";
-}
-else
-{
-   $GFX::OutdatedDrivers = false;
-}

+ 0 - 36
Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.GeForce8600.cs

@@ -1,36 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// nVidia Vendor Profile Script
-//
-// This script is responsible for setting global
-// capability strings based on the nVidia vendor.
-
-if(GFXCardProfiler::getVersion() < 1.2)
-{
-   $GFX::OutdatedDrivers = true;
-   $GFX::OutdatedDriversLink = "<a:www.nvidia.com>You can get newer drivers here.</a>.";
-}
-else
-{
-   $GFX::OutdatedDrivers = false;
-}

+ 0 - 39
Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.QuadroFXGo1000.cs

@@ -1,39 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// nVidia Vendor Profile Script
-//
-// This script is responsible for setting global
-// capability strings based on the nVidia vendor.
-
-if(GFXCardProfiler::getVersion() < 53.82)
-{
-   $GFX::OutdatedDrivers = true;
-   $GFX::OutdatedDriversLink = "<a:www.nvidia.com>You can get newer drivers here.</a>.";
-}
-else
-{
-   $GFX::OutdatedDrivers = false;
-}
-
-// Silly card has trouble with this!
-GFXCardProfiler::setCapability("autoMipmapLevel", false);

+ 0 - 36
Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.cs

@@ -1,36 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// nVidia Vendor Profile Script
-//
-// This script is responsible for setting global
-// capability strings based on the nVidia vendor.
-
-if(GFXCardProfiler::getVersion() < 56.72)
-{
-	$GFX::OutdatedDrivers = true;
-	$GFX::OutdatedDriversLink = "<a:www.nvidia.com>You can get newer drivers here.</a>.";
-}
-else
-{
-   $GFX::OutdatedDrivers = false;
-}

+ 0 - 26
Templates/BaseGame/game/core/gfxprofile/D3D9.cs

@@ -1,26 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// Direct3D 9 Renderer Profile Script
-//
-// This script is responsible for setting global
-// capability strings based on the D3D9 renderer type.

+ 0 - 102
Templates/BaseGame/game/core/globals.cs

@@ -1,102 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// DInput keyboard, mouse, and joystick prefs
-// ----------------------------------------------------------------------------
-
-$pref::Input::MouseEnabled = 1;
-$pref::Input::LinkMouseSensitivity = 1;
-$pref::Input::KeyboardEnabled = 1;
-$pref::Input::KeyboardTurnSpeed = 0.1;
-$pref::Input::JoystickEnabled = 0;
-
-// ----------------------------------------------------------------------------
-// Video Preferences
-// ----------------------------------------------------------------------------
-
-// Set directory paths for various data or default images.
-$pref::Video::ProfilePath = "core/gfxprofile";
-$pref::Video::missingTexturePath = "core/images/missingTexture.png";
-$pref::Video::unavailableTexturePath = "core/images/unavailable.png";
-$pref::Video::warningTexturePath = "core/images/warnMat.dds";
-
-$pref::Video::disableVerticalSync = 1;
-$pref::Video::mode = "800 600 false 32 60 4";
-$pref::Video::defaultFenceCount = 0;
-
-// This disables the hardware FSAA/MSAA so that we depend completely on the FXAA
-// post effect which works on all cards and in deferred mode.  Note that the new
-// Intel Hybrid graphics on laptops will fail to initialize when hardware AA is
-// enabled... so you've been warned.
-$pref::Video::disableHardwareAA = true;
-
-$pref::Video::disableNormalmapping = false;
-$pref::Video::disablePixSpecular = false;
-$pref::Video::disableCubemapping = false;
-$pref::Video::disableParallaxMapping = false;
-
-// The number of mipmap levels to drop on loaded textures to reduce video memory
-// usage.  It will skip any textures that have been defined as not allowing down
-// scaling.
-$pref::Video::textureReductionLevel = 0;
-
-$pref::Video::defaultAnisotropy = 1;
-//$pref::Video::Gamma = 1.0;
-
-/// AutoDetect graphics quality levels the next startup.
-$pref::Video::autoDetect = 1;
-
-// ----------------------------------------------------------------------------
-// Shader stuff
-// ----------------------------------------------------------------------------
-
-// This is the path used by ShaderGen to cache procedural shaders.  If left
-// blank ShaderGen will only cache shaders to memory and not to disk.
-$shaderGen::cachePath = "data/shaderCache";
-
-// Uncomment to disable ShaderGen, useful when debugging
-//$ShaderGen::GenNewShaders = false;
-   
-// Uncomment to dump disassembly for any shader that is compiled to disk.  These
-// will appear as shadername_dis.txt in the same path as the shader file.   
-//$gfx::disassembleAllShaders = true;
-
-// ----------------------------------------------------------------------------
-// Lighting and shadowing
-// ----------------------------------------------------------------------------
-
-// Uncomment to enable AdvancedLighting on the Mac (T3D 2009 Beta 3)
-//$pref::machax::enableAdvancedLighting = true;
-
-$sceneLighting::cacheSize = 20000;
-$sceneLighting::purgeMethod = "lastCreated";
-$sceneLighting::cacheLighting = 1;
-
-$pref::Shadows::textureScalar = 1.0;
-$pref::Shadows::disable = false;
-
-// Sets the shadow filtering mode.
-//  None - Disables filtering.
-//  SoftShadow - Does a simple soft shadow
-//  SoftShadowHighQuality 
-$pref::Shadows::filterMode = "SoftShadow";

+ 0 - 1158
Templates/BaseGame/game/core/helperFunctions.cs

@@ -1,1158 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------------
-// Check if a script file exists, compiled or not.
-function isScriptFile(%path)
-{
-   if( isFile(%path @ ".dso") || isFile(%path) )
-      return true;
-   
-   return false;
-}
-
-function loadMaterials()
-{
-   // Load any materials files for which we only have DSOs.
-
-   for( %file = findFirstFile( "*/materials.cs.dso" );
-        %file !$= "";
-        %file = findNextFile( "*/materials.cs.dso" ))
-   {
-      // Only execute, if we don't have the source file.
-      %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
-      if( !isFile( %csFileName ) )
-         exec( %csFileName );
-   }
-
-   // Load all source material files.
-
-   for( %file = findFirstFile( "*/materials.cs" );
-        %file !$= "";
-        %file = findNextFile( "*/materials.cs" ))
-   {
-      exec( %file );
-   }
-
-   // Load all materials created by the material editor if
-   // the folder exists
-   if( IsDirectory( "materialEditor" ) )
-   {
-      for( %file = findFirstFile( "materialEditor/*.cs.dso" );
-           %file !$= "";
-           %file = findNextFile( "materialEditor/*.cs.dso" ))
-      {
-         // Only execute, if we don't have the source file.
-         %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
-         if( !isFile( %csFileName ) )
-            exec( %csFileName );
-      }
-
-      for( %file = findFirstFile( "materialEditor/*.cs" );
-           %file !$= "";
-           %file = findNextFile( "materialEditor/*.cs" ))
-      {
-         exec( %file );
-      }
-   }
-}
-
-function reloadMaterials()
-{
-   reloadTextures();
-   loadMaterials();
-   reInitMaterials();
-}
-
-function loadDatablockFiles( %datablockFiles, %recurse )
-{
-   if ( %recurse )
-   {
-      recursiveLoadDatablockFiles( %datablockFiles, 9999 );
-      return;
-   }
-   
-   %count = %datablockFiles.count();
-   for ( %i=0; %i < %count; %i++ )
-   {
-      %file = %datablockFiles.getKey( %i );
-      if ( !isFile(%file @ ".dso") && !isFile(%file) )
-         continue;
-                  
-      exec( %file );
-   }
-      
-   // Destroy the incoming list.
-   //%datablockFiles.delete();
-}
-
-function recursiveLoadDatablockFiles( %datablockFiles, %previousErrors )
-{
-   %reloadDatablockFiles = new ArrayObject();
-
-   // Keep track of the number of datablocks that 
-   // failed during this pass.
-   %failedDatablocks = 0;
-   
-   // Try re-executing the list of datablock files.
-   %count = %datablockFiles.count();
-   for ( %i=0; %i < %count; %i++ )
-   {      
-      %file = %datablockFiles.getKey( %i );
-      if ( !isFile(%file @ ".dso") && !isFile(%file) )
-         continue;
-         
-      // Start counting copy constructor creation errors.
-      $Con::objectCopyFailures = 0;
-                                       
-      exec( %file );
-                                    
-      // If errors occured then store this file for re-exec later.
-      if ( $Con::objectCopyFailures > 0 )
-      {
-         %reloadDatablockFiles.add( %file );
-         %failedDatablocks = %failedDatablocks + $Con::objectCopyFailures;
-      }
-   }
-            
-   // Clear the object copy failure counter so that
-   // we get console error messages again.
-   $Con::objectCopyFailures = -1;
-                  
-   // Delete the old incoming list... we're done with it.
-   //%datablockFiles.delete();
-               
-   // If we still have datablocks to retry.
-   %newCount = %reloadDatablockFiles.count();
-   if ( %newCount > 0 )
-   {
-      // If the datablock failures have not been reduced
-      // from the last pass then we must have a real syntax
-      // error and not just a bad dependancy.         
-      if ( %previousErrors > %failedDatablocks )
-         recursiveLoadDatablockFiles( %reloadDatablockFiles, %failedDatablocks );
-                  
-      else
-      {      
-         // Since we must have real syntax errors do one 
-         // last normal exec to output error messages.
-         loadDatablockFiles( %reloadDatablockFiles, false );
-      }
-      
-      return;
-   }
-                  
-   // Cleanup the empty reload list.
-   %reloadDatablockFiles.delete();         
-}
-
-function getUserPath()
-{
-	%temp = getUserHomeDirectory();  
-	echo(%temp);  
-	if(!isDirectory(%temp))  
-	{  
-		%temp = getUserDataDirectory();  
-		echo(%temp);
-		if(!isDirectory(%temp)) 
-		{
-			%userPath = "data";  
-		}
-		else  
-		{
-			//put it in appdata/roaming
-			%userPath = %temp @ "/" @ $appName;  
-		}  
-	}  
-	else  
-	{  
-		//put it in user/documents  
-		%userPath = %temp @ "/" @ $appName;  
-	}
-	return %userPath;
-}
-
-function getPrefpath()
-{
-   $prefPath = getUserPath() @ "/preferences";
-	return $prefPath;
-}
-
-function updateTSShapeLoadProgress(%progress, %msg)
-{
-   // Check if the loading GUI is visible and use that instead of the
-   // separate import progress GUI if possible
-  /* if ( isObject(LoadingGui) && LoadingGui.isAwake() )
-   {
-      // Save/Restore load progress at the start/end of the import process
-      if ( %progress == 0 )
-      {
-         ColladaImportProgress.savedProgress = LoadingProgress.getValue();
-         ColladaImportProgress.savedText = LoadingProgressTxt.getValue();
-
-         ColladaImportProgress.msgPrefix = "Importing " @ %msg;
-         %msg = "Reading file into memory...";
-      }
-      else if ( %progress == 1.0 )
-      {
-         LoadingProgress.setValue( ColladaImportProgress.savedProgress );
-         LoadingProgressTxt.setValue( ColladaImportProgress.savedText );
-      }
-
-      %msg = ColladaImportProgress.msgPrefix @ ": " @ %msg;
-
-      %progressCtrl = LoadingProgress;
-      %textCtrl = LoadingProgressTxt;
-   }
-   else
-   {
-      //it's probably the editors using it
-      if(isFunction("updateToolTSShapeLoadProgress"))
-      {
-         updateToolTSShapeLoadProgress(%progress, %msg);
-      }
-   }
-
-   // Update progress indicators
-   if (%progress == 0)
-   {
-      %progressCtrl.setValue(0.001);
-      %textCtrl.setText(%msg);
-   }
-   else if (%progress != 1.0)
-   {
-      %progressCtrl.setValue(%progress);
-      %textCtrl.setText(%msg);
-   }
-
-   Canvas.repaint(33);*/
-}
-
-/// A helper function which will return the ghosted client object
-/// from a server object when connected to a local server.
-function serverToClientObject( %serverObject )
-{
-   assert( isObject( LocalClientConnection ), "serverToClientObject() - No local client connection found!" );
-   assert( isObject( ServerConnection ), "serverToClientObject() - No server connection found!" );      
-         
-   %ghostId = LocalClientConnection.getGhostId( %serverObject );
-   if ( %ghostId == -1 )
-      return 0;
-                
-   return ServerConnection.resolveGhostID( %ghostId );   
-}
-
-//----------------------------------------------------------------------------
-// Debug commands
-//----------------------------------------------------------------------------
-
-function netSimulateLag( %msDelay, %packetLossPercent )
-{
-   if ( %packetLossPercent $= "" )
-      %packetLossPercent = 0;
-                  
-   commandToServer( 'NetSimulateLag', %msDelay, %packetLossPercent );
-}
-
-//Various client functions
-
-function validateDatablockName(%name)
-{
-   // remove whitespaces at beginning and end
-   %name = trim( %name );
-   
-   // remove numbers at the beginning
-   %numbers = "0123456789";   
-   while( strlen(%name) > 0 )
-   {
-      // the first character
-      %firstChar = getSubStr( %name, 0, 1 );
-      // if the character is a number remove it
-      if( strpos( %numbers, %firstChar ) != -1 )
-      {
-         %name = getSubStr( %name, 1, strlen(%name) -1 );
-         %name = ltrim( %name );
-      }
-      else
-         break;
-   }
-   
-   // replace whitespaces with underscores
-   %name = strreplace( %name, " ", "_" );
-   
-   // remove any other invalid characters
-   %invalidCharacters = "-+*/%$&§=()[].?\"#,;!~<>|°^{}";
-   %name = stripChars( %name, %invalidCharacters );
-   
-   if( %name $= "" )
-      %name = "Unnamed";
-   
-   return %name;
-}
-
-//--------------------------------------------------------------------------
-// Finds location of %word in %text, starting at %start.  Works just like strPos
-//--------------------------------------------------------------------------
-
-function wordPos(%text, %word, %start)
-{
-   if (%start $= "") %start = 0;
-   
-   if (strpos(%text, %word, 0) == -1) return -1;
-   %count = getWordCount(%text);
-   if (%start >= %count) return -1;
-   for (%i = %start; %i < %count; %i++)
-   {
-      if (getWord( %text, %i) $= %word) return %i;
-   }
-   return -1;
-}
-
-//--------------------------------------------------------------------------
-// Finds location of %field in %text, starting at %start.  Works just like strPos
-//--------------------------------------------------------------------------
-
-function fieldPos(%text, %field, %start)
-{
-   if (%start $= "") %start = 0;
-   
-   if (strpos(%text, %field, 0) == -1) return -1;
-   %count = getFieldCount(%text);
-   if (%start >= %count) return -1;
-   for (%i = %start; %i < %count; %i++)
-   {
-      if (getField( %text, %i) $= %field) return %i;
-   }
-   return -1;
-}
-
-//--------------------------------------------------------------------------
-// returns the text in a file with "\n" at the end of each line
-//--------------------------------------------------------------------------
-
-function loadFileText( %file)
-{
-   %fo = new FileObject();
-   %fo.openForRead(%file);
-   %text = "";
-   while(!%fo.isEOF())
-   {
-      %text = %text @ %fo.readLine();
-      if (!%fo.isEOF()) %text = %text @ "\n";
-   }
-
-   %fo.delete();
-   return %text;
-}
-
-function setValueSafe(%dest, %val)
-{
-   %cmd = %dest.command;
-   %alt = %dest.altCommand;
-   %dest.command = "";
-   %dest.altCommand = "";
-
-   %dest.setValue(%val);
-   
-   %dest.command = %cmd;
-   %dest.altCommand = %alt;
-}
-
-function shareValueSafe(%source, %dest)
-{
-   setValueSafe(%dest, %source.getValue());
-}
-
-function shareValueSafeDelay(%source, %dest, %delayMs)
-{
-   schedule(%delayMs, 0, shareValueSafe, %source, %dest);
-}
-
-
-//------------------------------------------------------------------------------
-// An Aggregate Control is a plain GuiControl that contains other controls, 
-// which all share a single job or represent a single value.
-//------------------------------------------------------------------------------
-
-// AggregateControl.setValue( ) propagates the value to any control that has an 
-// internal name.
-function AggregateControl::setValue(%this, %val, %child)
-{
-   for(%i = 0; %i < %this.getCount(); %i++)
-   {
-      %obj = %this.getObject(%i);
-      if( %obj == %child )
-         continue;
-         
-      if(%obj.internalName !$= "")
-         setValueSafe(%obj, %val);
-   }
-}
-
-// AggregateControl.getValue() uses the value of the first control that has an
-// internal name, if it has not cached a value via .setValue
-function AggregateControl::getValue(%this)
-{
-   for(%i = 0; %i < %this.getCount(); %i++)
-   {
-      %obj = %this.getObject(%i);
-      if(%obj.internalName !$= "")
-      {
-         //error("obj = " @ %obj.getId() @ ", " @ %obj.getName() @ ", " @ %obj.internalName );
-         //error(" value = " @ %obj.getValue());
-         return %obj.getValue();
-      }
-   }
-}
-
-// AggregateControl.updateFromChild( ) is called by child controls to propagate
-// a new value, and to trigger the onAction() callback.
-function AggregateControl::updateFromChild(%this, %child)
-{
-   %val = %child.getValue();
-   if(%val == mCeil(%val)){
-      %val = mCeil(%val);
-   }else{
-      if ( %val <= -100){
-         %val = mCeil(%val);
-      }else if ( %val <= -10){
-         %val = mFloatLength(%val, 1);
-      }else if ( %val < 0){
-         %val = mFloatLength(%val, 2);
-      }else if ( %val >= 1000){
-         %val = mCeil(%val);
-      }else if ( %val >= 100){
-         %val = mFloatLength(%val, 1);
-      }else if ( %val >= 10){
-         %val = mFloatLength(%val, 2);
-      }else if ( %val > 0){
-         %val = mFloatLength(%val, 3);
-      }
-   }
-   %this.setValue(%val, %child);
-   %this.onAction();
-}
-
-// default onAction stub, here only to prevent console spam warnings.
-function AggregateControl::onAction(%this) 
-{
-}
-
-// call a method on all children that have an internalName and that implement the method.
-function AggregateControl::callMethod(%this, %method, %args)
-{
-   for(%i = 0; %i < %this.getCount(); %i++)
-   {
-      %obj = %this.getObject(%i);
-      if(%obj.internalName !$= "" && %obj.isMethod(%method))
-         eval(%obj @ "." @ %method @ "( " @ %args @ " );");
-   }
-
-}
-
-//------------------------------------------------------------------------------
-// Altered Version of TGB's QuickEditDropDownTextEditCtrl
-//------------------------------------------------------------------------------
-function QuickEditDropDownTextEditCtrl::onRenameItem( %this )
-{
-}
-
-function QuickEditDropDownTextEditCtrl::updateFromChild( %this, %ctrl )
-{
-   if( %ctrl.internalName $= "PopUpMenu" )
-   {
-      %this->TextEdit.setText( %ctrl.getText() );
-   }
-   else if ( %ctrl.internalName $= "TextEdit" )
-   {
-      %popup = %this->PopupMenu;
-      %popup.changeTextById( %popup.getSelected(), %ctrl.getText() );
-      %this.onRenameItem();
-   }
-}
-
-// Writes out all script functions to a file.
-function writeOutFunctions()
-{
-   new ConsoleLogger(logger, "scriptFunctions.txt", false);
-   dumpConsoleFunctions();
-   logger.delete();
-}
-
-// Writes out all script classes to a file.
-function writeOutClasses()
-{
-   new ConsoleLogger(logger, "scriptClasses.txt", false);
-   dumpConsoleClasses();
-   logger.delete();
-}
-
-//
-function compileFiles(%pattern)
-{  
-   %path = filePath(%pattern);
-
-   %saveDSO    = $Scripts::OverrideDSOPath;
-   %saveIgnore = $Scripts::ignoreDSOs;
-   
-   $Scripts::OverrideDSOPath  = %path;
-   $Scripts::ignoreDSOs       = false;
-   %mainCsFile = makeFullPath("main.cs");
-
-   for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern))
-   {
-      // we don't want to try and compile the primary main.cs
-      if(%mainCsFile !$= %file)      
-         compile(%file, true);
-   }
-
-   $Scripts::OverrideDSOPath  = %saveDSO;
-   $Scripts::ignoreDSOs       = %saveIgnore;
-   
-}
-
-function displayHelp() 
-{
-   // Notes on logmode: console logging is written to console.log.
-   // -log 0 disables console logging.
-   // -log 1 appends to existing logfile; it also closes the file
-   // (flushing the write buffer) after every write.
-   // -log 2 overwrites any existing logfile; it also only closes
-   // the logfile when the application shuts down.  (default)
-
-   error(
-      "Torque Demo command line options:\n"@
-      "  -log <logmode>         Logging behavior; see main.cs comments for details\n"@
-      "  -game <game_name>      Reset list of mods to only contain <game_name>\n"@
-      "  <game_name>            Works like the -game argument\n"@
-      "  -dir <dir_name>        Add <dir_name> to list of directories\n"@
-      "  -console               Open a separate console\n"@
-      "  -jSave  <file_name>    Record a journal\n"@
-      "  -jPlay  <file_name>    Play back a journal\n"@
-      "  -help                  Display this help message\n"
-   );
-}
-
-// Execute startup scripts for each mod, starting at base and working up
-function loadDir(%dir)
-{
-   pushback($userDirs, %dir, ";");
-
-   if (isScriptFile(%dir @ "/main.cs"))
-   exec(%dir @ "/main.cs");
-}
-
-function loadDirs(%dirPath)
-{
-   %dirPath = nextToken(%dirPath, token, ";");
-   if (%dirPath !$= "")
-      loadDirs(%dirPath);
-
-   if(exec(%token @ "/main.cs") != true)
-   {
-      error("Error: Unable to find specified directory: " @ %token );
-      $dirCount--;
-   }
-}
-
-//------------------------------------------------------------------------------
-// Utility remap functions:
-//------------------------------------------------------------------------------
-
-function ActionMap::copyBind( %this, %otherMap, %command )
-{
-   if ( !isObject( %otherMap ) )
-   {
-      error( "ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!" );
-      return;
-   }
-
-   %bind = %otherMap.getBinding( %command );
-   if ( %bind !$= "" )
-   {
-      %device = getField( %bind, 0 );
-      %action = getField( %bind, 1 );
-      %flags = %otherMap.isInverted( %device, %action ) ? "SDI" : "SD";
-      %deadZone = %otherMap.getDeadZone( %device, %action );
-      %scale = %otherMap.getScale( %device, %action );
-      %this.bind( %device, %action, %flags, %deadZone, %scale, %command );
-   }
-}
-
-//------------------------------------------------------------------------------
-function ActionMap::blockBind( %this, %otherMap, %command )
-{
-   if ( !isObject( %otherMap ) )
-   {
-      error( "ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!" );
-      return;
-   }
-
-   %bind = %otherMap.getBinding( %command );
-   if ( %bind !$= "" )
-      %this.bind( getField( %bind, 0 ), getField( %bind, 1 ), "" );
-}
-
-//Dev helpers
-/// Shortcut for typing dbgSetParameters with the default values torsion uses.
-function dbgTorsion()
-{
-   dbgSetParameters( 6060, "password", false );
-}
-
-/// Reset the input state to a default of all-keys-up.
-/// A helpful remedy for when Torque misses a button up event do to your breakpoints
-/// and can't stop shooting / jumping / strafing.
-function mvReset()
-{
-   for ( %i = 0; %i < 6; %i++ )
-      setVariable( "mvTriggerCount" @ %i, 0 );
-      
-   $mvUpAction = 0;
-   $mvDownAction = 0;
-   $mvLeftAction = 0;
-   $mvRightAction = 0;
-   
-   // There are others.
-}
-
-//Persistance Manager tests
-
-new PersistenceManager(TestPManager);
-
-function runPManTest(%test)
-{
-   if (!isObject(TestPManager))
-      return;
-
-   if (%test $= "")
-      %test = 100;
-
-   switch(%test)
-   {
-      case 0:
-         TestPManager.testFieldUpdates();
-      case 1:
-         TestPManager.testObjectRename();
-      case 2:
-         TestPManager.testNewObject();
-      case 3:
-         TestPManager.testNewGroup();
-      case 4:
-         TestPManager.testMoveObject();
-      case 5:
-         TestPManager.testObjectRemove();
-      case 100:
-         TestPManager.testFieldUpdates();
-         TestPManager.testObjectRename();
-         TestPManager.testNewObject();
-         TestPManager.testNewGroup();
-         TestPManager.testMoveObject();
-         TestPManager.testObjectRemove();
-   }
-}
-
-function TestPManager::testFieldUpdates(%doNotSave)
-{
-   // Set some objects as dirty
-   TestPManager.setDirty(AudioGui);
-   TestPManager.setDirty(AudioSim);
-   TestPManager.setDirty(AudioMessage);
-
-   // Alter some of the existing fields
-   AudioEffect.isLooping         = true;
-   AudioMessage.isLooping     = true;
-   AudioEffect.is3D              = true;
-
-   // Test removing a field
-   TestPManager.removeField(AudioGui, "isLooping");
-
-   // Alter some of the persistent fields
-   AudioGui.referenceDistance     = 0.8;
-   AudioMessage.referenceDistance = 0.8;
-
-   // Add some new dynamic fields
-   AudioGui.foo = "bar";
-   AudioEffect.foo = "bar";
-
-   // Remove an object from the dirty list
-   // It shouldn't get updated in the file
-   TestPManager.removeDirty(AudioEffect);
-
-   // Dirty an object in another file as well
-   TestPManager.setDirty(WarningMaterial);
-
-   // Update a field that doesn't exist
-   WarningMaterial.glow[0] = true;
-
-   // Drity another object to test for crashes
-   // when a dirty object is deleted
-   TestPManager.setDirty(SFXPausedSet);
-
-   // Delete the object
-   SFXPausedSet.delete();
-
-   // Unless %doNotSave is set (by a batch/combo test)
-   // then go ahead and save now
-   if (!%doNotSave)
-      TestPManager.saveDirty();
-}
-
-function TestPManager::testObjectRename(%doNotSave)
-{
-   // Flag an object as dirty
-   if (isObject(AudioGui))
-      TestPManager.setDirty(AudioGui);
-   else if (isObject(AudioGuiFoo))
-      TestPManager.setDirty(AudioGuiFoo);
-
-   // Rename it
-   if (isObject(AudioGui))
-      AudioGui.setName(AudioGuiFoo);
-   else if (isObject(AudioGuiFoo))
-      AudioGuiFoo.setName(AudioGui);
-
-   // Unless %doNotSave is set (by a batch/combo test)
-   // then go ahead and save now
-   if (!%doNotSave)
-      TestPManager.saveDirty();
-}
-
-function TestPManager::testNewObject(%doNotSave)
-{
-   // Test adding a new named object
-   new SFXDescription(AudioNew)
-   {
-      volume = 0.5;
-      isLooping = true;
-      channel  = $GuiAudioType;
-      foo = 2;
-   };
-
-   // Flag it as dirty
-   TestPManager.setDirty(AudioNew, "core/scripts/client/audio.cs");
-
-   // Test adding a new unnamed object
-   %obj = new SFXDescription()
-   {
-      volume = 0.75;
-      isLooping = true;
-      bar = 3;
-   };
-
-   // Flag it as dirty
-   TestPManager.setDirty(%obj, "core/scripts/client/audio.cs");
-
-   // Test adding an "empty" object
-   new SFXDescription(AudioEmpty);
-
-   TestPManager.setDirty(AudioEmpty, "core/scripts/client/audio.cs");
-
-   // Unless %doNotSave is set (by a batch/combo test)
-   // then go ahead and save now
-   if (!%doNotSave)
-      TestPManager.saveDirty();
-}
-
-function TestPManager::testNewGroup(%doNotSave)
-{
-   // Test adding a new named SimGroup
-   new SimGroup(TestGroup)
-   {
-      foo = "bar";
-
-      new SFXDescription(TestObject)
-      {
-         volume = 0.5;
-         isLooping = true;
-         channel  = $GuiAudioType;
-         foo = 1;
-      };
-      new SimGroup(SubGroup)
-      {
-         foo = 2;
-
-         new SFXDescription(SubObject)
-         {
-            volume = 0.5;
-            isLooping = true;
-            channel  = $GuiAudioType;
-            foo = 3;
-         };
-      };
-   };
-
-   // Flag this as dirty
-   TestPManager.setDirty(TestGroup, "core/scripts/client/audio.cs");
-
-   // Test adding a new unnamed SimGroup
-   %group = new SimGroup()
-   {
-      foo = "bar";
-
-      new SFXDescription()
-      {
-         volume = 0.75;
-         channel  = $GuiAudioType;
-         foo = 4;
-      };
-      new SimGroup()
-      {
-         foo = 5;
-
-         new SFXDescription()
-         {
-            volume = 0.75;
-            isLooping = true;
-            channel  = $GuiAudioType;
-            foo = 6;
-         };
-      };
-   };
-
-   // Flag this as dirty
-   TestPManager.setDirty(%group, "core/scripts/client/audio.cs");
-
-   // Test adding a new unnamed SimSet
-   %set = new SimSet()
-   {
-      foo = "bar";
-
-      new SFXDescription()
-      {
-         volume = 0.75;
-         channel  = $GuiAudioType;
-         foo = 7;
-      };
-      new SimGroup()
-      {
-         foo = 8;
-
-         new SFXDescription()
-         {
-            volume = 0.75;
-            isLooping = true;
-            channel  = $GuiAudioType;
-            foo = 9;
-         };
-      };
-   };
-
-   // Flag this as dirty
-   TestPManager.setDirty(%set, "core/scripts/client/audio.cs");
-
-   // Unless %doNotSave is set (by a batch/combo test)
-   // then go ahead and save now
-   if (!%doNotSave)
-      TestPManager.saveDirty();
-}
-
-function TestPManager::testMoveObject(%doNotSave)
-{
-   // First add a couple of groups to the file
-   new SimGroup(MoveGroup1)
-   {
-      foo = "bar";
-
-      new SFXDescription(MoveObject1)
-      {
-         volume = 0.5;
-         isLooping = true;
-         channel  = $GuiAudioType;
-         foo = 1;
-      };
-
-      new SimSet(SubGroup1)
-      {
-         new SFXDescription(SubObject1)
-         {
-            volume = 0.75;
-            isLooping = true;
-            channel  = $GuiAudioType;
-            foo = 2;
-         };
-      };
-   };
-
-   // Flag this as dirty
-   TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio.cs");
-
-   new SimGroup(MoveGroup2)
-   {
-      foo = "bar";
-
-      new SFXDescription(MoveObject2)
-      {
-         volume = 0.5;
-         isLooping = true;
-         channel  = $GuiAudioType;
-         foo = 3;
-      };
-   };
-
-   // Flag this as dirty
-   TestPManager.setDirty(MoveGroup2, "core/scripts/client/audio.cs");
-
-   // Unless %doNotSave is set (by a batch/combo test)
-   // then go ahead and save now
-   if (!%doNotSave)
-      TestPManager.saveDirty();
-
-   // Set them as dirty again
-   TestPManager.setDirty(MoveGroup1);
-   TestPManager.setDirty(MoveGroup2);
-
-   // Give the subobject an new value
-   MoveObject1.foo = 4;
-
-   // Move it into the other group
-   MoveGroup1.add(MoveObject2);
-
-   // Switch the other subobject
-   MoveGroup2.add(MoveObject1);
-
-   // Also add a new unnamed object to one of the groups
-   %obj = new SFXDescription()
-   {
-      volume = 0.75;
-      isLooping = true;
-      bar = 5;
-   };
-
-   MoveGroup1.add(%obj);
-
-   // Unless %doNotSave is set (by a batch/combo test)
-   // then go ahead and save now
-   if (!%doNotSave)
-      TestPManager.saveDirty();
-}
-
-function TestPManager::testObjectRemove(%doNotSave)
-{
-   TestPManager.removeObjectFromFile(AudioSim);
-}
-
-//Game Object management
-function findGameObject(%name)
-{
-   //find all GameObjectAssets
-   %assetQuery = new AssetQuery();
-   if(!AssetDatabase.findAssetType(%assetQuery, "GameObjectAsset"))
-      return 0; //if we didn't find ANY, just exit
-      
-   %count = %assetQuery.getCount();
-      
-	for(%i=0; %i < %count; %i++)
-	{
-	   %assetId = %assetQuery.getAsset(%i);
-	   
-	   %assetName = AssetDatabase.getAssetName(%assetId);
-      
-      if(%assetName $= %name)
-		{
-		   %gameObjectAsset = AssetDatabase.acquireAsset(%assetId);
-
-         %assetQuery.delete();
-         return %gameObjectAsset;
-		}
-	}
-		
-   %assetQuery.delete();
-	return 0;
-}
-
-function spawnGameObject(%name, %addToMissionGroup)
-{
-   if(%addToMissionGroup $= "")
-		%addToMissionGroup = true;
-		
-   //First, check if this already exists in our GameObjectPool
-   if(isObject(GameObjectPool))
-   {
-      %goCount = GameObjectPool.countKey(%name);
-      
-      //if we have some already in the pool, pull it out and use that
-      if(%goCount != 0)
-      {
-         %goIdx = GameObjectPool.getIndexFromKey(%name);
-         %go = GameObjectPool.getValue(%goIdx);
-         
-         %go.setHidden(false);
-         %go.setScopeAlways();
-         
-         if(%addToMissionGroup == true) //save instance when saving level
-            MissionGroup.add(%go);
-         else // clear instance on level exit
-            MissionCleanup.add(%go);
-            
-         //remove from the object pool's list
-         GameObjectPool.erase(%goIdx);
-         
-         return %go;
-      }
-   }
-   
-	//We have no existing pool, or no existing game objects of this type, so spawn a new one
-		
-   %gameObjectAsset = findGameObject(%name);
-   
-   if(isObject(%gameObjectAsset))
-   {
-      %newSGOObject = TamlRead(%gameObjectAsset.TAMLFilePath);
-            
-      if(%addToMissionGroup == true) //save instance when saving level
-         MissionGroup.add(%newSGOObject);
-      else // clear instance on level exit
-         MissionCleanup.add(%newSGOObject);
-         
-      return %newSGOObject;
-   }
-		
-	return 0;
-}
-
-function saveGameObject(%name, %tamlPath, %scriptPath)
-{
-	%gameObjectAsset = findGameObject(%name);
-   
-   //find if it already exists. If it does, we'll update it, if it does not, we'll  make a new asset
-   if(isObject(%gameObjectAsset))
-   {
-      %assetID = %gameObjectAsset.getAssetId();
-      
-      %gameObjectAsset.TAMLFilePath = %tamlPath;
-      %gameObjectAsset.scriptFilePath = %scriptPath;
-      
-      TAMLWrite(%gameObjectAsset, AssetDatabase.getAssetFilePath(%assetID));
-      AssetDatabase.refreshAsset(%assetID);
-   }
-   else
-   {
-      //Doesn't exist, so make a new one
-      %gameObjectAsset = new GameObjectAsset()
-      {
-         assetName = %name @ "Asset";
-         gameObjectName = %name;
-         TAMLFilePath = %tamlPath;
-         scriptFilePath = %scriptPath;
-      };
-      
-      //Save it alongside the taml file
-      %path = filePath(%tamlPath);
-      
-      TAMLWrite(%gameObjectAsset, %path @ "/" @ %name @ ".asset.taml");
-      AssetDatabase.refreshAllAssets(true);
-   }
-}
-
-//Allocates a number of a game object into a pool to be pulled from as needed
-function allocateGameObjects(%name, %amount)
-{
-   //First, we need to make sure our pool exists
-   if(!isObject(GameObjectPool))
-   {
-      new ArrayObject(GameObjectPool);  
-   }
-   
-   //Next, we loop and generate our game objects, and add them to the pool
-   for(%i=0; %i < %amount; %i++)
-   {
-      %go = spawnGameObject(%name, false);
-      
-      //When our object is in the pool, it's not "real", so we need to make sure 
-      //that we don't ghost it to clients untill we actually spawn it.
-      %go.clearScopeAlways();
-      
-      //We also hide it, so that we don't 'exist' in the scene until we spawn
-      %go.hidden = true;
-      
-      //Lastly, add us to the pool, with the key being our game object type
-      GameObjectPool.add(%name, %go);
-   }
-}
-
-function Entity::delete(%this)
-{
-   //we want to intercept the delete call, and add it to our GameObjectPool
-   //if it's a game object
-   if(%this.gameObjectAsset !$= "")
-   {
-      %this.setHidden(true);
-      %this.clearScopeAlways();
-      
-      if(!isObject(GameObjectPool))
-      {
-         new ArrayObject(GameObjectPool);
-      }
-      
-      GameObjectPool.add(%this.gameObjectAsset, %this);
-      
-      %missionSet = %this.getGroup();
-      %missionSet.remove(%this);
-   }
-   else
-   {
-      %this.superClass.delete();
-   }
-}
-
-function clearGameObjectPool()
-{
-   if(isObject(GameObjectPool))
-   {
-      %count = GameObjectPool.count();
-      
-      for(%i=0; %i < %count; %i++)
-      {
-         %go = GameObjectPool.getValue(%i);
-         
-         %go.superClass.delete();
-      }
-      
-      GameObjectPool.empty();
-   }
-}
-
-//
-function switchCamera(%client, %newCamEntity)
-{
-	if(!isObject(%client) || !isObject(%newCamEntity))
-		return error("SwitchCamera: No client or target camera!");
-		
-	%cam = %newCamEntity.getComponent(CameraComponent);
-		
-	if(!isObject(%cam))
-		return error("SwitchCamera: Target camera doesn't have a camera behavior!");
-		
-	//TODO: Cleanup clientOwner for previous camera!
-	if(%cam.clientOwner == 0 || %cam.clientOwner $= "")
-		%cam.clientOwner = 0;
-		
-	%cam.scopeToClient(%client);
-	%cam.setDirty();
-	
-	%client.setCameraObject(%newCamEntity);
-	%client.setControlCameraFov(%cam.FOV);
-	
-	%client.camera = %newCamEntity;
-}

二进制
Templates/BaseGame/game/core/images/AreaMap33.dds


二进制
Templates/BaseGame/game/core/images/button.png


二进制
Templates/BaseGame/game/core/images/caustics_1.png


二进制
Templates/BaseGame/game/core/images/caustics_2.png


二进制
Templates/BaseGame/game/core/images/checkbox.png


二进制
Templates/BaseGame/game/core/images/group-border.png


二进制
Templates/BaseGame/game/core/images/inactive-overlay.png


二进制
Templates/BaseGame/game/core/images/loadingbar.png


+ 0 - 32
Templates/BaseGame/game/core/images/materials.cs

@@ -1,32 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-singleton Material( Empty )
-{
-};
-
-singleton Material(WarningMaterial) {
-   detailMap[0] = "missingTexture";
-   diffuseColor[0] = "25 16 0";
-   emissive[0] = false;
-   translucent = false;
-};

二进制
Templates/BaseGame/game/core/images/missingTexture.png


二进制
Templates/BaseGame/game/core/images/noise.png


二进制
Templates/BaseGame/game/core/images/null_color_ramp.png


二进制
Templates/BaseGame/game/core/images/scrollBar.png


二进制
Templates/BaseGame/game/core/images/textEdit.png


二进制
Templates/BaseGame/game/core/images/thumbHighlightButton.png


二进制
Templates/BaseGame/game/core/images/unavailable.png


二进制
Templates/BaseGame/game/core/images/warnMat.dds


二进制
Templates/BaseGame/game/core/images/window.png


+ 0 - 74
Templates/BaseGame/game/core/lighting.cs

@@ -1,74 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-function initLightingSystems(%manager)
-{
-   echo( "\nInitializing Lighting Systems" );
-
-   // First exec the scripts for the different light managers
-   // in the lighting folder.
-   %pattern = "./lighting/*/init.cs";   
-   %file = findFirstFile( %pattern );
-   if ( %file $= "" )
-   {
-      // Try for DSOs next.
-      %pattern = "./lighting/*/init.cs.dso";
-      %file = findFirstFile( %pattern );
-   }
-
-   while( %file !$= "" )
-   {      
-      exec( %file );
-      %file = findNextFile( %pattern );
-   }
-
-   // Try the perfered one first.
-   %success = setLightManager(%manager);
-
-   // Did we completely fail to initialize a light manager?   
-   if (!%success)
-   {
-      // If we completely failed to initialize a light 
-      // manager then the 3d scene cannot be rendered.
-      quitWithErrorMessage( "Failed to set a light manager!" );
-   }
-}
-
-//---------------------------------------------------------------------------------------------
-
-function onLightManagerActivate( %lmName )
-{
-   // Call activation callbacks.
-   %activateNewFn = "onActivate" @ getWord( %lmName, 0 ) @ "LM";   
-   if( isFunction( %activateNewFn ) )
-      eval( %activateNewFn @ "();" );
-}
-
-//---------------------------------------------------------------------------------------------
-
-function onLightManagerDeactivate( %lmName )
-{
-   // Call deactivation callback.
-   %deactivateOldFn = "onDeactivate" @ getWord( %lmName, 0 ) @ "LM";
-   if( isFunction( %deactivateOldFn ) )
-      eval( %deactivateOldFn @ "();" );
-}

+ 0 - 71
Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs

@@ -1,71 +0,0 @@
-singleton ShaderData( ClearGBufferShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/deferredClearGBufferV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/deferredClearGBufferP.hlsl";
-
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/gl/deferredClearGBufferP.glsl";
-
-   pixVersion = 2.0;   
-};
-
-singleton ShaderData( DeferredColorShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/postFx/postFxV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/deferredColorShaderP.hlsl";
-   
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/gl/deferredColorShaderP.glsl";
-
-   pixVersion = 2.0;   
-};
-
-// Primary Deferred Shader
-new GFXStateBlockData( AL_DeferredShadingState : PFX_DefaultStateBlock )
-{  
-   cullMode = GFXCullNone;
-   
-   blendDefined = true;
-   blendEnable = true; 
-   blendSrc = GFXBlendSrcAlpha;
-   blendDest = GFXBlendInvSrcAlpha;
-   
-   samplersDefined = true;
-   samplerStates[0] = SamplerWrapLinear;
-   samplerStates[1] = SamplerWrapLinear;
-   samplerStates[2] = SamplerWrapLinear;
-   samplerStates[3] = SamplerWrapLinear;
-   samplerStates[4] = SamplerWrapLinear;
-};
-
-new ShaderData( AL_DeferredShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/deferredShadingP.hlsl";
-   
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/gl/deferredShadingP.glsl";
-
-   samplerNames[0] = "colorBufferTex";
-   samplerNames[1] = "lightDeferredTex";
-   samplerNames[2] = "matInfoTex";
-   samplerNames[3] = "deferredTex";
-   
-   pixVersion = 2.0;
-};
-
-singleton PostEffect( AL_DeferredShading )
-{
-   renderTime = "PFXAfterBin";
-   renderBin = "SkyBin";
-   shader = AL_DeferredShader;
-   stateBlock = AL_DeferredShadingState;
-   texture[0] = "#color";
-   texture[1] = "#lightinfo";
-   texture[2] = "#matinfo";
-   texture[3] = "#deferred";
-   
-   target = "$backBuffer";
-   renderPriority = 10000;
-   allowReflectPass = true;
-};

+ 0 - 68
Templates/BaseGame/game/core/lighting/advanced/init.cs

@@ -1,68 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-///////////////////////////////////////////////////////////////////////////////
-// Default Prefs
-
-/*
-$pref::LightManager::sgAtlasMaxDynamicLights = "16";
-$pref::LightManager::sgDynamicShadowDetailSize = "0";
-$pref::LightManager::sgDynamicShadowQuality = "0";
-$pref::LightManager::sgLightingProfileAllowShadows = "1";
-$pref::LightManager::sgLightingProfileQuality = "0";
-$pref::LightManager::sgMaxBestLights = "10";
-$pref::LightManager::sgMultipleDynamicShadows = "1";
-$pref::LightManager::sgShowCacheStats = "0";
-$pref::LightManager::sgUseBloom = "";
-$pref::LightManager::sgUseDRLHighDynamicRange = "0";
-$pref::LightManager::sgUseDynamicRangeLighting = "0";
-$pref::LightManager::sgUseDynamicShadows = "1";
-$pref::LightManager::sgUseToneMapping = "";
-*/
-
-exec( "./shaders.cs" );
-exec( "./deferredShading.cs" );
-
-function onActivateAdvancedLM()
-{
-   // Enable the offscreen target so that AL will work
-   // with MSAA back buffers and for HDR rendering.   
-   AL_FormatToken.enable();
-     
-   // Activate Deferred Shading
-   AL_DeferredShading.enable();
-}
-
-function onDeactivateAdvancedLM()
-{
-   // Disable the offscreen render target.
-   AL_FormatToken.disable();
-      
-   // Deactivate Deferred Shading
-   AL_DeferredShading.disable();
-}
-
-function setAdvancedLighting()
-{
-   setLightManager( "Advanced Lighting" );   
-}
-

+ 0 - 276
Templates/BaseGame/game/core/lighting/advanced/shaders.cs

@@ -1,276 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-// Vector Light State
-new GFXStateBlockData( AL_VectorLightState )
-{
-   blendDefined = true;
-   blendEnable = true;
-   blendSrc = GFXBlendOne;
-   blendDest = GFXBlendOne;
-   blendOp = GFXBlendOpAdd;
-   
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;  // G-buffer
-   mSamplerNames[0] = "deferredBuffer";
-   samplerStates[1] = SamplerClampPoint;  // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
-   mSamplerNames[1] = "shadowMap";
-   samplerStates[2] = SamplerClampPoint;  // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
-   mSamplerNames[2] = "dynamicShadowMap";
-   samplerStates[3] = SamplerClampLinear;  // SSAO Mask
-   mSamplerNames[3] = "ssaoMask";
-   samplerStates[4] = SamplerWrapPoint;   // Random Direction Map
-   
-   cullDefined = true;
-   cullMode = GFXCullNone;
-   
-   stencilDefined = true;
-   stencilEnable = true;
-   stencilFailOp = GFXStencilOpKeep;
-   stencilZFailOp = GFXStencilOpKeep;
-   stencilPassOp = GFXStencilOpKeep;
-   stencilFunc = GFXCmpLess;
-   stencilRef = 0;
-};
-
-// Vector Light Material
-new ShaderData( AL_VectorLightShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/farFrustumQuadV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/vectorLightP.hlsl";
-
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/farFrustumQuadV.glsl";
-   OGLPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/gl/vectorLightP.glsl";
-   
-   samplerNames[0] = "$deferredBuffer";
-   samplerNames[1] = "$shadowMap";
-   samplerNames[2] = "$dynamicShadowMap";
-   samplerNames[3] = "$ssaoMask";
-   samplerNames[4] = "$gTapRotationTex";
-   samplerNames[5] = "$lightBuffer";
-   samplerNames[6] = "$colorBuffer";
-   samplerNames[7] = "$matInfoBuffer";  
-   
-   pixVersion = 3.0;
-};
-
-new CustomMaterial( AL_VectorLightMaterial )
-{
-   shader = AL_VectorLightShader;
-   stateBlock = AL_VectorLightState;
-   
-   sampler["deferredBuffer"] = "#deferred";
-   sampler["shadowMap"] = "$dynamiclight";
-   sampler["dynamicShadowMap"] = "$dynamicShadowMap";
-   sampler["ssaoMask"] = "#ssaoMask";  
-   sampler["lightBuffer"] = "#lightinfo";
-   sampler["colorBuffer"] = "#color";
-   sampler["matInfoBuffer"] = "#matinfo";
-   
-   target = "lightinfo";
-   
-   pixVersion = 3.0;
-};
-
-//------------------------------------------------------------------------------
-
-// Convex-geometry light states
-new GFXStateBlockData( AL_ConvexLightState )
-{
-   blendDefined = true;
-   blendEnable = true;
-   blendSrc = GFXBlendOne;
-   blendDest = GFXBlendOne;
-   blendOp = GFXBlendOpAdd;
-   
-   zDefined = true;
-   zEnable = true;
-   zWriteEnable = false;
-   zFunc = GFXCmpGreaterEqual;
-
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;  // G-buffer
-   mSamplerNames[0] = "deferredBuffer";
-   samplerStates[1] = SamplerClampPoint;  // Shadow Map (Do not use linear, these are perspective projections)
-   mSamplerNames[1] = "shadowMap";
-   samplerStates[2] = SamplerClampPoint;  // Shadow Map (Do not use linear, these are perspective projections)
-   mSamplerNames[2] = "dynamicShadowMap";
-   samplerStates[3] = SamplerClampLinear; // Cookie Map   
-   samplerStates[4] = SamplerWrapPoint;   // Random Direction Map
-   
-   cullDefined = true;
-   cullMode = GFXCullCW;
-   
-   stencilDefined = true;
-   stencilEnable = true;
-   stencilFailOp = GFXStencilOpKeep;
-   stencilZFailOp = GFXStencilOpKeep;
-   stencilPassOp = GFXStencilOpKeep;
-   stencilFunc = GFXCmpLess;
-   stencilRef = 0;
-};
-
-// Point Light Material
-new ShaderData( AL_PointLightShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/convexGeometryV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/pointLightP.hlsl";
-
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl";
-   OGLPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/gl/pointLightP.glsl";
-
-   samplerNames[0] = "$deferredBuffer";
-   samplerNames[1] = "$shadowMap";
-   samplerNames[2] = "$dynamicShadowMap";
-   samplerNames[3] = "$cookieMap";
-   samplerNames[4] = "$gTapRotationTex";
-   samplerNames[5] = "$lightBuffer";
-   samplerNames[6] = "$colorBuffer";
-   samplerNames[7] = "$matInfoBuffer";
-   
-   pixVersion = 3.0;
-};
-
-new CustomMaterial( AL_PointLightMaterial )
-{
-   shader = AL_PointLightShader;
-   stateBlock = AL_ConvexLightState;
-   
-   sampler["deferredBuffer"] = "#deferred";
-   sampler["shadowMap"] = "$dynamiclight";
-   sampler["dynamicShadowMap"] = "$dynamicShadowMap";
-   sampler["cookieMap"] = "$dynamiclightmask";
-   sampler["lightBuffer"] = "#lightinfo";
-   sampler["colorBuffer"] = "#color";
-   sampler["matInfoBuffer"] = "#matinfo";
-   
-   target = "lightinfo";
-   
-   pixVersion = 3.0;
-};
-
-// Spot Light Material
-new ShaderData( AL_SpotLightShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/convexGeometryV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/spotLightP.hlsl";
-
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl";
-   OGLPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/gl/spotLightP.glsl";
-   
-   samplerNames[0] = "$deferredBuffer";
-   samplerNames[1] = "$shadowMap";
-   samplerNames[2] = "$dynamicShadowMap";
-   samplerNames[3] = "$cookieMap";
-   samplerNames[4] = "$gTapRotationTex";
-   samplerNames[5] = "$lightBuffer";
-   samplerNames[6] = "$colorBuffer";
-   samplerNames[7] = "$matInfoBuffer";
-
-   pixVersion = 3.0;
-};
-
-new CustomMaterial( AL_SpotLightMaterial )
-{
-   shader = AL_SpotLightShader;
-   stateBlock = AL_ConvexLightState;
-   
-   sampler["deferredBuffer"] = "#deferred";
-   sampler["shadowMap"] = "$dynamiclight";
-   sampler["dynamicShadowMap"] = "$dynamicShadowMap";
-   sampler["cookieMap"] = "$dynamiclightmask";
-   sampler["lightBuffer"] = "#lightinfo";
-   sampler["colorBuffer"] = "#color";
-   sampler["matInfoBuffer"] = "#matinfo";
-   
-   target = "lightinfo";
-   
-   pixVersion = 3.0;
-};
-
-/// This material is used for generating deferred 
-/// materials for objects that do not have materials.
-new Material( AL_DefaultDeferredMaterial )
-{
-   // We need something in the first pass else it 
-   // won't create a proper material instance.  
-   //
-   // We use color here because some objects may not
-   // have texture coords in their vertex format... 
-   // for example like terrain.
-   //
-   diffuseColor[0] = "1 1 1 1";
-};
-
-/// This material is used for generating shadow 
-/// materials for objects that do not have materials.
-new Material( AL_DefaultShadowMaterial )
-{
-   // We need something in the first pass else it 
-   // won't create a proper material instance.  
-   //
-   // We use color here because some objects may not
-   // have texture coords in their vertex format... 
-   // for example like terrain.
-   //
-   diffuseColor[0] = "1 1 1 1";
-               
-   // This is here mostly for terrain which uses
-   // this material to create its shadow material.
-   //
-   // At sunset/sunrise the sun is looking thru 
-   // backsides of the terrain which often are not
-   // closed.  By changing the material to be double
-   // sided we avoid holes in the shadowed geometry.
-   //
-   doubleSided = true;
-};
-
-// Particle System Point Light Material
-new ShaderData( AL_ParticlePointLightShader )
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/particlePointLightV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/particlePointLightP.hlsl";
-
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl";
-   OGLPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/advanced/gl/pointLightP.glsl";
-   
-   samplerNames[0] = "$deferredBuffer";   
-      
-   pixVersion = 3.0;
-};
-
-new CustomMaterial( AL_ParticlePointLightMaterial )
-{
-   shader = AL_ParticlePointLightShader;
-   stateBlock = AL_ConvexLightState;
-   
-   sampler["deferredBuffer"] = "#deferred";
-   target = "lightinfo";
-   
-   pixVersion = 3.0;
-};

+ 0 - 92
Templates/BaseGame/game/core/lighting/basic/init.cs

@@ -1,92 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-exec( "./shadowFilter.cs" );
-
-singleton GFXStateBlockData( BL_ProjectedShadowSBData )
-{
-   blendDefined = true;
-   blendEnable = true;
-   blendSrc = GFXBlendDestColor;
-   blendDest = GFXBlendZero;
-         
-   zDefined = true;
-   zEnable = true;
-   zWriteEnable = false;
-               
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;   
-   vertexColorEnable = true;
-};
-
-singleton ShaderData( BL_ProjectedShadowShaderData )
-{
-   DXVertexShaderFile     = $Core::CommonShaderPath @ "/projectedShadowV.hlsl";
-   DXPixelShaderFile      = $Core::CommonShaderPath @ "/projectedShadowP.hlsl";   
-   
-   OGLVertexShaderFile     = $Core::CommonShaderPath @ "/gl/projectedShadowV.glsl";
-   OGLPixelShaderFile      = $Core::CommonShaderPath @ "/gl/projectedShadowP.glsl";   
-      
-   samplerNames[0] = "inputTex";
-   
-   pixVersion = 2.0;
-};
-
-singleton CustomMaterial( BL_ProjectedShadowMaterial )
-{
-   sampler["inputTex"] = "$miscbuff";
- 
-   shader = BL_ProjectedShadowShaderData;
-   stateBlock = BL_ProjectedShadowSBData;
-   version = 2.0;
-   forwardLit = true;
-};
-
-function onActivateBasicLM()
-{
-   // If HDR is enabled... enable the special format token.
-   if ( $platform !$= "macos" && HDRPostFx.isEnabled )
-      AL_FormatToken.enable();
-      
-   // Create render pass for projected shadow.
-   new RenderPassManager( BL_ProjectedShadowRPM );
-
-   // Create the mesh bin and add it to the manager.
-   %meshBin = new RenderMeshMgr();
-   BL_ProjectedShadowRPM.addManager( %meshBin );
-   
-   // Add both to the root group so that it doesn't
-   // end up in the MissionCleanup instant group.
-   RootGroup.add( BL_ProjectedShadowRPM );
-   RootGroup.add( %meshBin );      
-}
-
-function onDeactivateBasicLM()
-{
-   // Delete the pass manager which also deletes the bin.
-   BL_ProjectedShadowRPM.delete();
-}
-
-function setBasicLighting()
-{
-   setLightManager( "Basic Lighting" );   
-}

+ 0 - 76
Templates/BaseGame/game/core/lighting/basic/shadowFilter.cs

@@ -1,76 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-singleton ShaderData( BL_ShadowFilterShaderV )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/lighting/basic/shadowFilterV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/lighting/basic/shadowFilterP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/lighting/basic/gl/shadowFilterV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/lighting/basic/gl/shadowFilterP.glsl";
-
-   samplerNames[0] = "$diffuseMap";
-
-   defines = "BLUR_DIR=float2(1.0,0.0)";
-
-   pixVersion = 2.0;     
-};
-
-singleton ShaderData( BL_ShadowFilterShaderH : BL_ShadowFilterShaderV )
-{
-    defines = "BLUR_DIR=float2(0.0,1.0)";
-};
-
-
-singleton GFXStateBlockData( BL_ShadowFilterSB : PFX_DefaultStateBlock )
-{
-   colorWriteDefined=true;
-   colorWriteRed=false;
-   colorWriteGreen=false;
-   colorWriteBlue=false;
-   blendDefined = true;
-   blendEnable = true;
-};
-
-// NOTE: This is ONLY used in Basic Lighting, and 
-// only directly by the ProjectedShadow.  It is not 
-// meant to be manually enabled like other PostEffects.
-singleton PostEffect( BL_ShadowFilterPostFx )
-{
-    // Blur vertically
-   shader = BL_ShadowFilterShaderV;
-   stateBlock = PFX_DefaultStateBlock;
-   targetClear = "PFXTargetClear_OnDraw";
-   targetClearColor = "0 0 0 0";
-   texture[0] = "$inTex";
-   target = "$outTex";   
-
-   // Blur horizontal
-   new PostEffect()
-   {
-      shader = BL_ShadowFilterShaderH;
-      stateBlock = PFX_DefaultStateBlock;
-      texture[0] = "$inTex";
-      target = "$outTex";
-   };
-};

+ 0 - 32
Templates/BaseGame/game/core/lighting/shadowMaps/init.cs

@@ -1,32 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-new ShaderData(BlurDepthShader)
-{
-   DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/shadowMap/boxFilterV.hlsl";
-   DXPixelShaderFile  = $Core::CommonShaderPath @ "/lighting/shadowMap/boxFilterP.hlsl";
-   
-   OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/shadowMap/gl/boxFilterV.glsl";
-   OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/shadowMap/gl/boxFilterP.glsl";
-   pixVersion = 2.0;
-};

+ 0 - 99
Templates/BaseGame/game/core/main.cs

@@ -1,99 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// Initialize core sub system functionality such as audio, the Canvas, PostFX,
-// rendermanager, light managers, etc.
-//
-// Note that not all of these need to be initialized before the client, although
-// the audio should and the canvas definitely needs to be.  I've put things here
-// to distinguish between the purpose and functionality of the various client
-// scripts.  Game specific script isn't needed until we reach the shell menus
-// and start a game or connect to a server. We get the various subsystems ready
-// to go, and then use initClient() to handle the rest of the startup sequence.
-//
-// If this is too convoluted we can reduce this complexity after futher testing
-// to find exactly which subsystems should be readied before kicking things off. 
-// ----------------------------------------------------------------------------
-
-//We need to hook the missing/warn material stuff early, so do it here
-$Core::MissingTexturePath = "core/images/missingTexture";
-$Core::UnAvailableTexturePath = "core/images/unavailable";
-$Core::WarningTexturePath = "core/images/warnMat";
-$Core::CommonShaderPath = "core/shaders";
-
-ModuleDatabase.setModuleExtension("module");
-
-//Core components
-ModuleDatabase.scanModules( "core", false );
-ModuleDatabase.LoadExplicit( "CoreComponentsModule" );
-
-exec("./helperFunctions.cs");
-
-// We need some of the default GUI profiles in order to get the canvas and
-// other aspects of the GUI system ready.
-exec("./profiles.cs");
-
-//This is a bit of a shortcut, but we'll load the client's default settings to ensure all the prefs get initialized correctly
-%prefPath = getPrefpath();
-if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
-   exec( %prefPath @ "/clientPrefs.cs" );
-else
-   exec("data/defaults.cs");
-   
-%der = $pref::Video::displayDevice;
-
-// Initialization of the various subsystems requires some of the preferences
-// to be loaded... so do that first.
-exec("./globals.cs");
-
-exec("./canvas.cs");
-exec("./cursor.cs");
-
-exec("./renderManager.cs");
-exec("./lighting.cs");
-
-exec("./audio.cs");
-exec("./sfx/audioAmbience.cs");
-exec("./sfx/audioData.cs");
-exec("./sfx/audioDescriptions.cs");
-exec("./sfx/audioEnvironments.cs");
-exec("./sfx/audioStates.cs");
-
-exec("./parseArgs.cs");
-
-// Materials and Shaders for rendering various object types
-exec("./gfxData/commonMaterialData.cs");
-exec("./gfxData/shaders.cs");
-exec("./gfxData/terrainBlock.cs");
-exec("./gfxData/water.cs");
-exec("./gfxData/scatterSky.cs");
-exec("./gfxData/clouds.cs");
-
-// Initialize all core post effects.   
-exec("./postFx.cs");
-
-//VR stuff
-exec("./oculusVR.cs");
-
-// Seed the random number generator.
-setRandomSeed();

+ 0 - 248
Templates/BaseGame/game/core/oculusVR.cs

@@ -1,248 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// Only load these functions if an Oculus VR device is present
-if(!isFunction(isOculusVRDeviceActive))
-   return;
-
-function setupOculusActionMaps()
-{
-   if (isObject(OculusWarningMap))
-      return;
-
-   new ActionMap(OculusWarningMap);
-   new ActionMap(OculusCanvasMap);
-
-   OculusWarningMap.bind(keyboard, space, dismissOculusVRWarnings);
-
-   OculusCanvasMap.bind( mouse, xaxis, oculusYaw );
-   OculusCanvasMap.bind( mouse, yaxis, oculusPitch );
-   OculusCanvasMap.bind( mouse, button0, oculusClick );
-}
-
-function oculusYaw(%val)
-{
-   OculusCanvas.cursorNudge(%val * 0.10, 0);
-}
-
-function oculusPitch(%val)
-{
-   OculusCanvas.cursorNudge(0, %val * 0.10);
-}
-
-function oculusClick(%active)
-{
-   OculusCanvas.cursorClick(0, %active);  
-}
-
-function GuiOffscreenCanvas::checkCursor(%this)
-{
-   %count = %this.getCount();
-   for(%i = 0; %i < %count; %i++)
-   {
-      %control = %this.getObject(%i);
-      if ((%control.noCursor $= "") || !%control.noCursor)
-      {
-         %this.cursorOn();
-         return true;
-      }
-   }
-   // If we get here, every control requested a hidden cursor, so we oblige.
-
-   %this.cursorOff();
-   return false;
-}
-
-function GuiOffscreenCanvas::pushDialog(%this, %ctrl, %layer, %center)
-{
-   Parent::pushDialog(%this, %ctrl, %layer, %center);
-   %cursorVisible = %this.checkCursor();
-
-   if (%cursorVisible)
-   {
-      echo("OffscreenCanvas visible");
-      OculusCanvasMap.pop();
-      OculusCanvasMap.push();
-   }
-   else
-   {
-      echo("OffscreenCanvas not visible");
-      OculusCanvasMap.pop();
-   }
-}
-
-function GuiOffscreenCanvas::popDialog(%this, %ctrl)
-{
-   Parent::popDialog(%this, %ctrl);
-   %cursorVisible = %this.checkCursor();
-
-   if (%cursorVisible)
-   {
-      echo("OffscreenCanvas visible");
-      OculusCanvasMap.pop();
-      OculusCanvasMap.push();
-   }
-   else
-   {
-      echo("OffscreenCanvas not visible");
-      OculusCanvasMap.pop();
-   }
-}
-
-
-//-----------------------------------------------------------------------------
-
-function oculusSensorMetricsCallback()
-{
-   return ovrDumpMetrics(0);
-}
-
-
-//-----------------------------------------------------------------------------
-function onOculusStatusUpdate(%status)
-{
-   $LastOculusTrackingState = %status;
-}
-
-//-----------------------------------------------------------------------------
-
-// Call this function from createCanvas() to have the Canvas attach itself
-// to the Rift's display.  The Canvas' window will still open on the primary
-// display if that is different from the Rift, but it will move to the Rift
-// when it goes full screen.  If the Rift is not connected then nothing
-// will happen.
-function pointCanvasToOculusVRDisplay()
-{
-   $pref::Video::displayOutputDevice = getOVRHMDDisplayDeviceName(0);
-}
-
-//-----------------------------------------------------------------------------
-
-// Call this function from GameConnection::initialControlSet() just before
-// your "Canvas.setContent(PlayGui);" call, or at any time you wish to switch
-// to a side-by-side rendering and the appropriate barrel distortion.  This
-// will turn on side-by-side rendering and tell the GameConnection to use the
-// Rift as its display device.
-// Parameters:
-// %gameConnection - The client GameConnection instance
-// %trueStereoRendering - If true will enable stereo rendering with an eye
-// offset for each viewport.  This will render each frame twice.  If false
-// then a pseudo stereo rendering is done with only a single render per frame.
-function enableOculusVRDisplay(%gameConnection, %trueStereoRendering)
-{
-   setOVRHMDAsGameConnectionDisplayDevice(%gameConnection);
-   PlayGui.renderStyle = "stereo side by side";
-   setOptimalOVRCanvasSize(Canvas);
-
-   if (!isObject(OculusCanvas))
-   {
-      new GuiOffscreenCanvas(OculusCanvas) {
-         targetSize = "512 512";
-         targetName = "oculusCanvas";
-         dynamicTarget = true;
-      };
-   }
-
-   if (!isObject(OculusVROverlay))
-   {
-      exec("./oculusVROverlay.gui");
-   }
-
-   OculusCanvas.setContent(OculusVROverlay);
-   OculusCanvas.setCursor(DefaultCursor);
-   PlayGui.setStereoGui(OculusCanvas);
-   OculusCanvas.setCursorPos("128 128");
-   OculusCanvas.cursorOff();
-   $GameCanvas = OculusCanvas;
-
-   %ext = Canvas.getExtent();
-   $OculusMouseScaleX = 512.0 / 1920.0;
-   $OculusMouseScaleY = 512.0 / 1060.0;
-   
-   //$gfx::wireframe = true;
-   // Reset all sensors
-   ovrResetAllSensors();
-}
-
-// Call this function when ever you wish to turn off the stereo rendering
-// and barrel distortion for the Rift.
-function disableOculusVRDisplay(%gameConnection)
-{
-   OculusCanvas.popDialog();
-   OculusWarningMap.pop();
-   $GameCanvas = Canvas;
-
-   if (isObject(gameConnection))
-   {
-      %gameConnection.clearDisplayDevice();
-   }
-   PlayGui.renderStyle = "standard";
-}
-
-// Helper function to set the standard Rift control scheme.  You could place
-// this function in GameConnection::initialControlSet() at the same time
-// you call enableOculusVRDisplay().
-function setStandardOculusVRControlScheme(%gameConnection)
-{
-   if($OculusVR::SimulateInput)
-   {
-      // We are simulating a HMD so allow the mouse and gamepad to control
-      // both yaw and pitch.
-      %gameConnection.setControlSchemeParameters(true, true, true);
-   }
-   else
-   {
-      // A HMD is connected so have the mouse and gamepad only add to yaw
-      %gameConnection.setControlSchemeParameters(true, true, false);
-   }
-}
-
-//-----------------------------------------------------------------------------
-
-// Helper function to set the resolution for the Rift.
-// Parameters:
-// %fullscreen - If true then the display will be forced to full screen.  If
-// pointCanvasToOculusVRDisplay() was called before the Canvas was created, then
-// the full screen display will appear on the Rift.
-function setVideoModeForOculusVRDisplay(%fullscreen)
-{
-   %res = getOVRHMDResolution(0);
-   Canvas.setVideoMode(%res.x, %res.y, %fullscreen, 32, 4);
-}
-
-//-----------------------------------------------------------------------------
-
-// Reset all Oculus Rift sensors.  This will make the Rift's current heading
-// be considered the origin.
-function resetOculusVRSensors()
-{
-   ovrResetAllSensors();
-}
-
-function dismissOculusVRWarnings(%value)
-{
-   //if (%value)
-   //{
-      ovrDismissWarnings();
-      OculusWarningMap.pop();
-   //}
-}

+ 0 - 19
Templates/BaseGame/game/core/oculusVROverlay.gui

@@ -1,19 +0,0 @@
-//--- OBJECT WRITE BEGIN ---
-%guiContent = singleton GuiControl(OculusVROverlay) {
-   canSaveDynamicFields = "0";
-   Enabled = "1";
-   isContainer = "1";
-   Profile = "GuiContentProfile";
-   HorizSizing = "width";
-   VertSizing = "height";
-   Position = "0 0";
-   Extent = "512 512";
-   MinExtent = "8 8";
-   canSave = "1";
-   Visible = "1";
-   tooltipprofile = "GuiToolTipProfile";
-   hovertime = "1000";
-   useVariable = "0";
-   tile = "0";
-};
-//--- OBJECT WRITE END ---

+ 0 - 392
Templates/BaseGame/game/core/parseArgs.cs

@@ -1,392 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Support functions used to manage the directory list
-function pushFront(%list, %token, %delim)
-{
-   if (%list !$= "")
-      return %token @ %delim @ %list;
-   return %token;
-}
-
-function pushBack(%list, %token, %delim)
-{
-   if (%list !$= "")
-      return %list @ %delim @ %token;
-   return %token;
-}
-
-function popFront(%list, %delim)
-{
-   return nextToken(%list, unused, %delim);
-}
-
-function parseArgs()
-{
-   for ($i = 1; $i < $Game::argc ; $i++)
-   {
-      $arg = $Game::argv[$i];
-      $nextArg = $Game::argv[$i+1];
-      $hasNextArg = $Game::argc - $i > 1;
-      $logModeSpecified = false;
-
-      // Check for dedicated run
-      /*if( stricmp($arg,"-dedicated") == 0  )
-      {
-         $userDirs = $defaultGame;
-         $dirCount = 1;
-         $isDedicated = true;
-      }*/
-
-      switch$ ($arg)
-      {
-         //--------------------
-         case "-dedicated":
-            $userDirs = $defaultGame;
-            $dirCount = 1;
-            $isDedicated = true;
-            $Server::Dedicated = true;
-            enableWinConsole(true);
-            $argUsed[%i]++;
-            
-                  //--------------------
-         case "-mission":
-            $argUsed[%i]++;
-            if ($hasNextArg) 
-            {
-               $missionArg = $nextArg;
-               $argUsed[%i+1]++;
-               %i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -mission <filename>");
-
-         //--------------------
-         case "-connect":
-            $argUsed[%i]++;
-            if ($hasNextArg) 
-            {
-               $JoinGameAddress = $nextArg;
-               $argUsed[%i+1]++;
-               %i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -connect <ip_address>");
-
-            
-         //--------------------
-         case "-log":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               // Turn on console logging
-               if ($nextArg != 0)
-               {
-                  // Dump existing console to logfile first.
-                  $nextArg += 4;
-               }
-               setLogMode($nextArg);
-               $logModeSpecified = true;
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -log <Mode: 0,1,2>");
-
-         //--------------------
-         case "-dir":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               // Append the mod to the end of the current list
-               $userDirs = strreplace($userDirs, $nextArg, "");
-               $userDirs = pushFront($userDirs, $nextArg, ";");
-               $argUsed[$i+1]++;
-               $i++;
-               $dirCount++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -dir <dir_name>");
-
-         //--------------------
-         // changed the default behavior of this command line arg. It now
-         // defaults to ONLY loading the game, not tools 
-         // default auto-run already loads in tools --SRZ 11/29/07
-         case "-game":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               // Set the selected dir --NOTE: we no longer allow tools with this argument
-               /* 
-               if( $isDedicated )
-               {
-                  $userDirs = $nextArg;
-                  $dirCount = 1;
-               }
-               else
-               {
-                  $userDirs = "tools;" @ $nextArg;
-                  $dirCount = 2;
-               }
-               */
-               $userDirs = $nextArg;
-               $dirCount = 1;
-               $argUsed[$i+1]++;
-               $i++;
-               error($userDirs);
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -game <game_name>");
-
-         //--------------------
-         case "-console":
-            enableWinConsole(true);
-            $argUsed[$i]++;
-
-         //--------------------
-         case "-jSave":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               echo("Saving event log to journal: " @ $nextArg);
-               saveJournal($nextArg);
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -jSave <journal_name>");
-
-         //--------------------
-         case "-jPlay":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               playJournal($nextArg);
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -jPlay <journal_name>");
-               
-         //--------------------
-         case "-jPlayToVideo":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               $VideoCapture::journalName = $nextArg;
-               $VideoCapture::captureFromJournal = true;
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -jPlayToVideo <journal_name>");
-               
-         //--------------------
-         case "-vidCapFile":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               $VideoCapture::fileName = $nextArg;
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -vidCapFile <ouput_video_name>");
-               
-         //--------------------
-         case "-vidCapFPS":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               $VideoCapture::fps = $nextArg;
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -vidCapFPS <ouput_video_framerate>");
-               
-         //--------------------
-         case "-vidCapEncoder":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               $VideoCapture::encoder = $nextArg;
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -vidCapEncoder <ouput_video_encoder>");
-               
-         //--------------------
-         case "-vidCapWidth":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               $videoCapture::width = $nextArg;
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -vidCapWidth <ouput_video_width>");
-               
-         //--------------------
-         case "-vidCapHeight":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               $videoCapture::height = $nextArg;
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -vidCapHeight <ouput_video_height>");
-
-         //--------------------
-         case "-level":
-            $argUsed[$i]++;
-            if ($hasNextArg)
-            {
-               %hasExt = strpos($nextArg, ".mis");
-               if(%hasExt == -1)
-               {
-                  $levelToLoad = $nextArg @ " ";
-                  
-                  for(%i = $i + 2; %i < $Game::argc; %i++)
-                  {
-                     $arg = $Game::argv[%i];
-                     %hasExt = strpos($arg, ".mis");
-                     
-                     if(%hasExt == -1)
-                     {
-                        $levelToLoad = $levelToLoad @ $arg @ " ";
-                     } else
-                     {
-                        $levelToLoad = $levelToLoad @ $arg;
-                        break;
-                     }
-                  }
-               } 
-               else
-               {
-                  $levelToLoad = $nextArg;
-               }
-               
-               $argUsed[$i+1]++;
-               $i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -level <level file name (no path), with or without extension>");
-
-         //-------------------
-         case "-worldeditor":
-            $startWorldEditor = true;
-            $argUsed[$i]++;
-
-         //-------------------
-         case "-guieditor":
-            $startGUIEditor = true;
-            $argUsed[$i]++;
-
-         //-------------------
-         case "-help":
-            $displayHelp = true;
-            $argUsed[$i]++;
-
-         //-------------------
-         case "-compileAll":
-            $compileAll = true;
-            $argUsed[$i]++;
-            
-         //-------------------
-         case "-compileTools":
-            $compileTools = true;
-            $argUsed[$i]++;
-
-         //-------------------
-         case "-genScript":
-            $genScript = true;
-            $argUsed[$i]++;
-            
-         case "-fullscreen":
-            $cliFullscreen = true;
-            $argUsed[%i]++;
-
-         case "-windowed":
-            $cliFullscreen = false;
-            $argUsed[%i]++;
-
-         case "-openGL":
-            $pref::Video::displayDevice = "OpenGL";
-            $argUsed[%i]++;
-
-         case "-directX":
-            $pref::Video::displayDevice = "D3D";
-            $argUsed[%i]++;
-
-         case "-autoVideo":
-            $pref::Video::displayDevice = "";
-            $argUsed[%i]++;
-
-         case "-prefs":
-            $argUsed[%i]++;
-            if ($hasNextArg) {
-               exec($nextArg, true, true);
-               $argUsed[%i+1]++;
-               %i++;
-            }
-            else
-               error("Error: Missing Command Line argument. Usage: -prefs <path/script.cs>");
-
-            
-         //-------------------
-         default:
-            $argUsed[$i]++;
-            if($userDirs $= "")
-               $userDirs = $arg;
-      }
-   }
-   
-   //-----------------------------------------------
-   // Play journal to video file?
-   if ($VideoCapture::captureFromJournal && $VideoCapture::journalName !$= "")
-   {         
-      if ($VideoCapture::fileName $= "")
-         $VideoCapture::fileName = $VideoCapture::journalName;     
-      
-      if ($VideoCapture::encoder $= "")
-         $VideoCapture::encoder = "THEORA";
-            
-      if ($VideoCapture::fps $= "")
-         $VideoCapture::fps = 30;
-               
-      if ($videoCapture::width $= "")
-         $videoCapture::width = 0;
-         
-      if ($videoCapture::height $= "")
-         $videoCapture::height = 0;
-         
-      playJournalToVideo(  $VideoCapture::journalName, $VideoCapture::fileName, 
-                           $VideoCapture::encoder, $VideoCapture::fps, 
-                           $videoCapture::width SPC $videoCapture::height );
-   }
-}

+ 0 - 73
Templates/BaseGame/game/core/postFX/GammaPostFX.cs

@@ -1,73 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( GammaShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/gammaP.hlsl";
-
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/gammaP.glsl";
-   
-   samplerNames[0] = "$backBuffer";
-   samplerNames[1] = "$colorCorrectionTex";
-
-   pixVersion = 2.0;   
-};
-
-singleton GFXStateBlockData( GammaStateBlock : PFX_DefaultStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampLinear; 
-};
-
-singleton PostEffect( GammaPostFX )
-{
-   isEnabled = true;
-   allowReflectPass = true;
-   
-   renderTime = "PFXBeforeBin";
-   renderBin = "EditorBin";
-   renderPriority = 9998;
-      
-   shader = GammaShader;
-   stateBlock = GammaStateBlock;
-   
-   texture[0] = "$backBuffer";  
-   texture[1] = $HDRPostFX::colorCorrectionRamp;  
-   textureSRGB[1] = true;
-};
-
-function GammaPostFX::preProcess( %this )
-{
-   if ( %this.texture[1] !$= $HDRPostFX::colorCorrectionRamp )
-      %this.setTexture( 1, $HDRPostFX::colorCorrectionRamp );         
-}
-
-function GammaPostFX::setShaderConsts( %this )
-{
-   %clampedGamma  = mClamp( $pref::Video::Gamma, 2.0, 2.5);
-   %this.setShaderConst( "$OneOverGamma", 1 / %clampedGamma );
-   %this.setShaderConst( "$Brightness", $pref::Video::Brightness );
-   %this.setShaderConst( "$Contrast", $pref::Video::Contrast );
-}

+ 0 - 186
Templates/BaseGame/game/core/postFX/MLAA.cs

@@ -1,186 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// An implementation of "Practical Morphological Anti-Aliasing" from 
-// GPU Pro 2 by Jorge Jimenez, Belen Masia, Jose I. Echevarria, 
-// Fernando Navarro, and Diego Gutierrez.
-//
-// http://www.iryoku.com/mlaa/
-
-// NOTE: This is currently disabled in favor of FXAA.  See 
-// core\scripts\client\canvas.cs if you want to re-enable it.
-
-singleton GFXStateBlockData( MLAA_EdgeDetectStateBlock : PFX_DefaultStateBlock )
-{   
-   // Mark the edge pixels in stencil.
-   stencilDefined = true;
-   stencilEnable = true;
-   stencilPassOp = GFXStencilOpReplace;
-   stencilFunc = GFXCmpAlways;
-   stencilRef = 1;
-
-   samplersDefined = true;   
-   samplerStates[0] = SamplerClampLinear;
-};
-
-singleton ShaderData( MLAA_EdgeDetectionShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/mlaa/offsetV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/mlaa/edgeDetectionP.hlsl";
-
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/mlaa/gl/offsetV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/mlaa/gl/edgeDetectionP.glsl";
-
-   samplerNames[0] = "$colorMapG";
-   samplerNames[1] = "$deferredMap";
-
-   pixVersion = 3.0;
-};
-
-singleton GFXStateBlockData( MLAA_BlendWeightCalculationStateBlock : PFX_DefaultStateBlock )
-{   
-   // Here we want to process only marked pixels.
-   stencilDefined = true;
-   stencilEnable = true;
-   stencilPassOp = GFXStencilOpKeep;
-   stencilFunc = GFXCmpEqual;
-   stencilRef = 1;
-
-   samplersDefined = true;   
-   samplerStates[0] = SamplerClampPoint;
-   samplerStates[1] = SamplerClampLinear;
-   samplerStates[2] = SamplerClampPoint;
-};
-
-singleton ShaderData( MLAA_BlendWeightCalculationShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/mlaa/passthruV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/mlaa/blendWeightCalculationP.hlsl";
-
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/mlaa/gl/passthruV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/mlaa/gl/blendWeightCalculationP.glsl";
-
-   samplerNames[0] = "$edgesMap";
-   samplerNames[1] = "$edgesMapL";
-   samplerNames[2] = "$areaMap";
-
-   pixVersion = 3.0;
-};
-
-singleton GFXStateBlockData( MLAA_NeighborhoodBlendingStateBlock : PFX_DefaultStateBlock )
-{   
-   // Here we want to process only marked pixels too.
-   stencilDefined = true;
-   stencilEnable = true;
-   stencilPassOp = GFXStencilOpKeep;
-   stencilFunc = GFXCmpEqual;
-   stencilRef = 1;
-
-   samplersDefined = true;   
-   samplerStates[0] = SamplerClampPoint;
-   samplerStates[1] = SamplerClampLinear;
-   samplerStates[2] = SamplerClampPoint;
-};
-
-singleton ShaderData( MLAA_NeighborhoodBlendingShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/mlaa/offsetV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/mlaa/neighborhoodBlendingP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/mlaa/gl/offsetV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/mlaa/gl/neighborhoodBlendingP.glsl";
-
-   samplerNames[0] = "$blendMap";
-   samplerNames[1] = "$colorMapL";
-   samplerNames[2] = "$colorMap";
-
-   pixVersion = 3.0;
-};
-
-
-singleton PostEffect( MLAAFx )
-{
-   isEnabled = false;
-   
-   allowReflectPass = false;
-   renderTime = "PFXAfterDiffuse";
-
-   texture[0] = "$backBuffer"; //colorMapG      
-   texture[1] = "#deferred"; // Used for depth detection
-
-   target = "$outTex";
-   targetClear = PFXTargetClear_OnDraw;
-   targetClearColor = "0 0 0 0";
-
-   stateBlock = MLAA_EdgeDetectStateBlock;
-   shader = MLAA_EdgeDetectionShader;
-
-   // The luma calculation weights which can be user adjustable
-   // per-scene if nessasary.  The default value of...
-   //
-   //    0.2126 0.7152 0.0722 
-   //
-   // ... is the HDTV ITU-R Recommendation BT. 709.
-   lumaCoefficients = "0.2126 0.7152 0.0722";
-
-   // The tweakable color threshold used to select
-   // the range of edge pixels to blend.
-   threshold = 0.1;
-
-   // The depth delta threshold used to select
-   // the range of edge pixels to blend.
-   depthThreshold = 0.01;
-
-   new PostEffect()
-   {
-      internalName = "blendingWeightsCalculation";
-
-      target = "$outTex";
-      targetClear = PFXTargetClear_OnDraw;
-
-      shader = MLAA_BlendWeightCalculationShader;
-      stateBlock = MLAA_BlendWeightCalculationStateBlock;
-
-      texture[0] = "$inTex"; // Edges mask    
-      texture[1] = "$inTex"; // Edges mask 
-      texture[2] = "core/images/AreaMap33.dds";
-   };
-
-   new PostEffect()
-   {
-      internalName = "neighborhoodBlending";
-
-      shader = MLAA_NeighborhoodBlendingShader;
-      stateBlock = MLAA_NeighborhoodBlendingStateBlock;
-
-      texture[0] = "$inTex"; // Blend weights
-      texture[1] = "$backBuffer";      
-      texture[2] = "$backBuffer";      
-   };
-};
-
-function MLAAFx::setShaderConsts(%this)
-{
-   %this.setShaderConst("$lumaCoefficients", %this.lumaCoefficients);
-   %this.setShaderConst("$threshold", %this.threshold);
-   %this.setShaderConst("$depthThreshold", %this.depthThreshold);
-}

+ 0 - 53
Templates/BaseGame/game/core/postFX/MotionBlurFx.cs

@@ -1,53 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( PFX_MotionBlurShader )  
-{     
-   DXVertexShaderFile   = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";  //we use the bare-bones postFxV.hlsl
-   DXPixelShaderFile    = $Core::CommonShaderPath @ "/postFX/motionBlurP.hlsl";  //new pixel shader
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile    = $Core::CommonShaderPath @ "/postFX/gl/motionBlurP.glsl";
-   
-   samplerNames[0] = "$backBuffer";
-   samplerNames[1] = "$deferredTex";
-   
-   pixVersion = 3.0;  
-};  
-
-singleton PostEffect(MotionBlurFX)  
-{
-   isEnabled = false;
-
-   renderTime = "PFXAfterDiffuse";  
-
-   shader = PFX_MotionBlurShader;  
-   stateBlock = PFX_DefaultStateBlock;  
-   texture[0] = "$backbuffer";
-   texture[1] = "#deferred";
-   target = "$backBuffer";
-};
-
-function MotionBlurFX::setShaderConsts(%this)
-{
-   %this.setShaderConst( "$velocityMultiplier", 3000 );
-}

+ 0 - 64
Templates/BaseGame/game/core/postFX/caustics.cs

@@ -1,64 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-singleton GFXStateBlockData( PFX_CausticsStateBlock : PFX_DefaultStateBlock )
-{
-   blendDefined = true;
-   blendEnable = true; 
-   blendSrc = GFXBlendOne;
-   blendDest = GFXBlendOne;
-   
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerWrapLinear;
-   samplerStates[2] = SamplerWrapLinear;
-};
-
-singleton ShaderData( PFX_CausticsShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/caustics/causticsP.hlsl";
-         
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/caustics/gl/causticsP.glsl";
-      
-   samplerNames[0] = "$deferredTex";
-   samplerNames[1] = "$causticsTex0";
-   samplerNames[2] = "$causticsTex1";
-   
-   pixVersion = 3.0;
-};
-
-singleton PostEffect( CausticsPFX )
-{
-   isEnabled = false;
-   renderTime = "PFXAfterDiffuse";
-   renderBin = "ObjTranslucentBin";      
-   //renderPriority = 0.1;
-      
-   shader = PFX_CausticsShader;
-   stateBlock = PFX_CausticsStateBlock;
-   texture[0] = "#deferred";
-   texture[1] = "core/images/caustics_1";
-   texture[2] = "core/images/caustics_2";
-   target = "$backBuffer";
-};

+ 0 - 77
Templates/BaseGame/game/core/postFX/chromaticLens.cs

@@ -1,77 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-/// 
-$CAPostFx::enabled = false;
-
-/// The lens distortion coefficient.
-$CAPostFx::distCoeffecient =  -0.05;
-
-/// The cubic distortion value.
-$CAPostFx::cubeDistortionFactor =  -0.1;
-
-/// The amount and direction of the maxium shift for
-/// the red, green, and blue channels.
-$CAPostFx::colorDistortionFactor = "0.005 -0.005 0.01";
-
-
-singleton GFXStateBlockData( PFX_DefaultChromaticLensStateBlock )
-{
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;   
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;
-};
-
-singleton ShaderData( PFX_ChromaticLensShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/chromaticLens.hlsl"; 
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/chromaticLens.glsl";
-   
-   samplerNames[0] = "$backBuffer";
-   
-   pixVersion = 3.0;
-};
-
-singleton PostEffect( ChromaticLensPostFX )
-{
-   renderTime = "PFXAfterDiffuse";
-   renderPriority = 0.2;
-   isEnabled = false;
-   allowReflectPass = false;
-
-   shader = PFX_ChromaticLensShader;
-   stateBlock = PFX_DefaultChromaticLensStateBlock;
-   texture[0] = "$backBuffer";
-   target = "$backBuffer";
-};
-
-function ChromaticLensPostFX::setShaderConsts( %this )
-{
-   %this.setShaderConst( "$distCoeff", $CAPostFx::distCoeffecient );   
-   %this.setShaderConst( "$cubeDistort", $CAPostFx::cubeDistortionFactor );    
-   %this.setShaderConst( "$colorDistort", $CAPostFx::colorDistortionFactor );   
-}

+ 0 - 72
Templates/BaseGame/game/core/postFX/default.postfxpreset.cs

@@ -1,72 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-$PostFXManager::Settings::EnableVignette = "1";
-$PostFXManager::Settings::EnableDOF = "1";
-$PostFXManager::Settings::EnabledSSAO = "1";
-$PostFXManager::Settings::EnableHDR = "1";
-$PostFXManager::Settings::EnableLightRays = "1";
-$PostFXManager::Settings::EnablePostFX = "1";
-$PostFXManager::Settings::Vignette::VMax = "0.6";
-$PostFXManager::Settings::DOF::BlurCurveFar = "";
-$PostFXManager::Settings::DOF::BlurCurveNear = "";
-$PostFXManager::Settings::DOF::BlurMax = "";
-$PostFXManager::Settings::DOF::BlurMin = "";
-$PostFXManager::Settings::DOF::EnableAutoFocus = "";
-$PostFXManager::Settings::DOF::EnableDOF = "";
-$PostFXManager::Settings::DOF::FocusRangeMax = "";
-$PostFXManager::Settings::DOF::FocusRangeMin = "";
-$PostFXManager::Settings::HDR::adaptRate = "2";
-$PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27";
-$PostFXManager::Settings::HDR::brightPassThreshold = "1";
-$PostFXManager::Settings::HDR::enableBloom = "1";
-$PostFXManager::Settings::HDR::enableBlueShift = "0";
-$PostFXManager::Settings::HDR::enableToneMapping = "0.5";
-$PostFXManager::Settings::HDR::gaussMean = "0";
-$PostFXManager::Settings::HDR::gaussMultiplier = "0.3";
-$PostFXManager::Settings::HDR::gaussStdDev = "0.8";
-$PostFXManager::Settings::HDR::keyValue = "0.18";
-$PostFXManager::Settings::HDR::minLuminace = "0.001";
-$PostFXManager::Settings::HDR::whiteCutoff = "1";
-$PostFXManager::Settings::LightRays::brightScalar = "0.75";
-$PostFXManager::Settings::LightRays::decay = "1.0";
-$PostFXManager::Settings::LightRays::density = "0.94";
-$PostFXManager::Settings::LightRays::numSamples = "40";
-$PostFXManager::Settings::LightRays::weight = "5.65";
-$PostFXManager::Settings::SSAO::blurDepthTol = "0.001";
-$PostFXManager::Settings::SSAO::blurNormalTol = "0.95";
-$PostFXManager::Settings::SSAO::lDepthMax = "2";
-$PostFXManager::Settings::SSAO::lDepthMin = "0.2";
-$PostFXManager::Settings::SSAO::lDepthPow = "0.2";
-$PostFXManager::Settings::SSAO::lNormalPow = "2";
-$PostFXManager::Settings::SSAO::lNormalTol = "-0.5";
-$PostFXManager::Settings::SSAO::lRadius = "1";
-$PostFXManager::Settings::SSAO::lStrength = "10";
-$PostFXManager::Settings::SSAO::overallStrength = "2";
-$PostFXManager::Settings::SSAO::quality = "0";
-$PostFXManager::Settings::SSAO::sDepthMax = "1";
-$PostFXManager::Settings::SSAO::sDepthMin = "0.1";
-$PostFXManager::Settings::SSAO::sDepthPow = "1";
-$PostFXManager::Settings::SSAO::sNormalPow = "1";
-$PostFXManager::Settings::SSAO::sNormalTol = "0";
-$PostFXManager::Settings::SSAO::sRadius = "0.1";
-$PostFXManager::Settings::SSAO::sStrength = "6";
-$PostFXManager::Settings::ColorCorrectionRamp = "core/images/null_color_ramp.png";

+ 0 - 599
Templates/BaseGame/game/core/postFX/dof.cs

@@ -1,599 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-/*
-
-================================================================================
- The DOFPostEffect API
-================================================================================
-
-DOFPostEffect::setFocalDist( %dist )
-
-@summary
-This method is for manually controlling the focus distance. It will have no 
-effect if auto focus is currently enabled. Makes use of the parameters set by 
-setFocusParams.
-
-@param dist 
-float distance in meters
-
---------------------------------------------------------------------------------
-
-DOFPostEffect::setAutoFocus( %enabled )
-
-@summary
-This method sets auto focus enabled or disabled. Makes use of the parameters set 
-by setFocusParams. When auto focus is enabled it determines the focal depth
-by performing a raycast at the screen-center.
-
-@param enabled
-bool
-
---------------------------------------------------------------------------------
-
-DOFPostEffect::setFocusParams( %nearBlurMax, %farBlurMax, %minRange, %maxRange, %nearSlope, %farSlope )
-
-Set the parameters that control how the near and far equations are calculated
-from the focal distance. If you are not using auto focus you will need to call
-setFocusParams PRIOR to calling setFocalDist.
-
-@param nearBlurMax   
-float between 0.0 and 1.0
-The max allowed value of near blur.
-
-@param farBlurMax    
-float between 0.0 and 1.0
-The max allowed value of far blur.
-
-@param minRange/maxRange 
-float in meters
-The distance range around the focal distance that remains in focus is a lerp 
-between the min/maxRange using the normalized focal distance as the parameter. 
-The point is to allow the focal range to expand as you focus farther away since this is 
-visually appealing.
-
-Note: since min/maxRange are lerped by the "normalized" focal distance it is
-dependant on the visible distance set in your level.
-
-@param nearSlope
-float less than zero
-The slope of the near equation. A small number causes bluriness to increase gradually
-at distances closer than the focal distance. A large number causes bluriness to 
-increase quickly.
-
-@param farSlope
-float greater than zero
-The slope of the far equation. A small number causes bluriness to increase gradually
-at distances farther than the focal distance. A large number causes bluriness to
-increase quickly.
-
-Note: To rephrase, the min/maxRange parameters control how much area around the
-focal distance is completely in focus where the near/farSlope parameters control
-how quickly or slowly bluriness increases at distances outside of that range.
-
-================================================================================
- Examples
-================================================================================
-
-Example1: Turn on DOF while zoomed in with a weapon.
-
-NOTE: These are not real callbacks! Hook these up to your code where appropriate!
-
-function onSniperZoom()
-{
-   // Parameterize how you want DOF to look.
-   DOFPostEffect.setFocusParams( 0.3, 0.3, 50, 500, -5, 5 );
-   
-   // Turn on auto focus
-   DOFPostEffect.setAutoFocus( true );
-   
-   // Turn on the PostEffect
-   DOFPostEffect.enable();
-}
-
-function onSniperUnzoom()
-{
-   // Turn off the PostEffect
-   DOFPostEffect.disable();
-}
-
-Example2: Manually control DOF with the mouse wheel.
-
-// Somewhere on startup...
-
-// Parameterize how you want DOF to look.
-DOFPostEffect.setFocusParams( 0.3, 0.3, 50, 500, -5, 5 );
-
-// Turn off auto focus
-DOFPostEffect.setAutoFocus( false );
-
-// Turn on the PostEffect
-DOFPostEffect.enable();
-
-
-NOTE: These are not real callbacks! Hook these up to your code where appropriate!
-
-function onMouseWheelUp()
-{
-   // Since setFocalDist is really just a wrapper to assign to the focalDist
-   // dynamic field we can shortcut and increment it directly.
-   DOFPostEffect.focalDist += 8;
-}
-
-function onMouseWheelDown()
-{
-   DOFPostEffect.focalDist -= 8;
-}
-*/
-
-/// This method is for manually controlling the focal distance. It will have no 
-/// effect if auto focus is currently enabled. Makes use of the parameters set by 
-/// setFocusParams.
-function DOFPostEffect::setFocalDist( %this, %dist )
-{    
-   %this.focalDist = %dist;
-}
-
-/// This method sets auto focus enabled or disabled. Makes use of the parameters set 
-/// by setFocusParams. When auto focus is enabled it determine the focal depth
-/// by performing a raycast at the screen-center.
-function DOFPostEffect::setAutoFocus( %this, %enabled )
-{
-   %this.autoFocusEnabled = %enabled;
-}
-
-/// Set the parameters that control how the near and far equations are calculated
-/// from the focal distance. If you are not using auto focus you will need to call
-/// setFocusParams PRIOR to calling setFocalDist.
-function DOFPostEffect::setFocusParams( %this, %nearBlurMax, %farBlurMax, %minRange, %maxRange, %nearSlope, %farSlope )
-{
-   %this.nearBlurMax = %nearBlurMax;
-   %this.farBlurMax = %farBlurMax;
-   %this.minRange = %minRange;
-   %this.maxRange = %maxRange;
-   %this.nearSlope = %nearSlope;
-   %this.farSlope = %farSlope;
-}
-
-/*
-
-More information...
-
-This DOF technique is based on this paper:
-http://http.developer.nvidia.com/GPUGems3/gpugems3_ch28.html
-
-================================================================================
-1. Overview of how we represent "Depth of Field"
-================================================================================
-
-DOF is expressed as an amount of bluriness per pixel according to its depth.
-We represented this by a piecewise linear curve depicted below.
-
-Note: we also refer to "bluriness" as CoC ( circle of confusion ) which is the term
-used in the basis paper and in photography.
-   
-
-X-axis (depth) 
-x = 0.0----------------------------------------------x = 1.0       
-
-Y-axis (bluriness)
-y = 1.0   
-  |
-  |   ____(x1,y1)                         (x4,y4)____
-  |       (ns,nb)\  <--Line1  line2--->  /(fe,fb)
-  |               \                     /
-  |                \(x2,y2)     (x3,y3)/
-  |                 (ne,0)------(fs,0)  
-y = 0.0
-                 
-
-I have labeled the "corners" of this graph with (Xn,Yn) to illustrate that
-this is in fact a collection of line segments where the x/y of each point
-corresponds to the key below.
-
-key:
-ns - (n)ear blur (s)tart distance
-nb - (n)ear (b)lur amount (max value)
-ne - (n)ear blur (e)nd distance
-fs - (f)ar blur (s)tart distance
-fe - (f)ar blur (e)nd distance
-fb - (f)ar (b)lur amount (max value)
-
-Of greatest importance in this graph is Line1 and Line2. Where...
-L1 { (x1,y1), (x2,y2) }
-L2 { (x3,y3), (x4,y4) }
-
-Line one represents the amount of "near" blur given a pixels depth and line two
-represents the amount of "far" blur at that depth.
-
-Both these equations are evaluated for each pixel and then the larger of the two
-is kept. Also the output blur (for each equation) is clamped between 0 and its
-maximum allowable value.
-
-Therefore, to specify a DOF "qualify" you need to specify the near-blur-line, 
-far-blur-line, and maximum near and far blur value.
-
-================================================================================
-2. Abstracting a "focal depth"
-================================================================================
-
-Although the shader(s) work in terms of a near and far equation it is more
-useful to express DOF as an adjustable focal depth and derive the other parameters
-"under the hood".
-
-Given a maximum near/far blur amount and a near/far slope we can calculate the
-near/far equations for any focal depth. We extend this to also support a range
-of depth around the focal depth that is also in focus and for that range to
-shrink or grow as the focal depth moves closer or farther.
-
-Keep in mind this is only one implementation and depending on the effect you
-desire you may which to express the relationship between focal depth and 
-the shader paramaters different. 
-
-*/
-
-//-----------------------------------------------------------------------------
-// GFXStateBlockData / ShaderData
-//-----------------------------------------------------------------------------
-
-singleton GFXStateBlockData( PFX_DefaultDOFStateBlock )
-{
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-      
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;
-   samplerStates[1] = SamplerClampPoint;
-};
-
-singleton GFXStateBlockData( PFX_DOFCalcCoCStateBlock )
-{
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-      
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampLinear;
-};
-
-singleton GFXStateBlockData( PFX_DOFDownSampleStateBlock )
-{
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-      
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampPoint;
-};
-
-singleton GFXStateBlockData( PFX_DOFBlurStateBlock )
-{
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-      
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;   
-};
-
-singleton GFXStateBlockData( PFX_DOFFinalStateBlock )
-{
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-      
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampLinear;
-   samplerStates[2] = SamplerClampLinear;
-   samplerStates[3] = SamplerClampPoint;
-   
-   blendDefined = true;
-   blendEnable = true;
-   blendDest = GFXBlendInvSrcAlpha;
-   blendSrc = GFXBlendOne;
-};
-
-singleton ShaderData( PFX_DOFDownSampleShader )
-{      
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_DownSample_V.hlsl";   
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_DownSample_P.hlsl";            
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_DownSample_V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_DownSample_P.glsl";
-   
-   samplerNames[0] = "$colorSampler";
-   samplerNames[1] = "$depthSampler";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( PFX_DOFBlurYShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_Gausian_V.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_Gausian_P.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Gausian_V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Gausian_P.glsl";
-   
-   samplerNames[0] = "$diffuseMap";
-   
-   pixVersion = 2.0;      
-   defines = "BLUR_DIR=float2(0.0,1.0)";         
-};
-
-singleton ShaderData( PFX_DOFBlurXShader : PFX_DOFBlurYShader )
-{
-   defines = "BLUR_DIR=float2(1.0,0.0)";
-};
-
-singleton ShaderData( PFX_DOFCalcCoCShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_CalcCoC_V.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_CalcCoC_P.hlsl";         
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_CalcCoC_V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_CalcCoC_P.glsl"; 
-
-   samplerNames[0] = "$shrunkSampler";
-   samplerNames[1] = "$blurredSampler";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( PFX_DOFSmallBlurShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_SmallBlur_V.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_SmallBlur_P.hlsl";            
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_SmallBlur_V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_SmallBlur_P.glsl";
-
-   samplerNames[0] = "$colorSampler";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( PFX_DOFFinalShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_Final_V.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/dof/DOF_Final_P.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Final_V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Final_P.glsl";
-   
-   samplerNames[0] = "$colorSampler";
-   samplerNames[1] = "$smallBlurSampler";
-   samplerNames[2] = "$largeBlurSampler";
-   samplerNames[3] = "$depthSampler";
-   
-   pixVersion = 3.0;
-};
-
-//-----------------------------------------------------------------------------
-// PostEffects
-//-----------------------------------------------------------------------------
-
-function DOFPostEffect::onAdd( %this )
-{
-   // The weighted distribution of CoC value to the three blur textures
-   // in the order small, medium, large. Most likely you will not need to
-   // change this value.
-   %this.setLerpDist( 0.2, 0.3, 0.5 );
-   
-   // Fill out some default values but DOF really should not be turned on
-   // without actually specifying your own parameters!
-   %this.autoFocusEnabled = false;
-   %this.focalDist = 0.0;
-   %this.nearBlurMax = 0.5;
-   %this.farBlurMax = 0.5;
-   %this.minRange = 50;
-   %this.maxRange = 500;
-   %this.nearSlope = -5.0;
-   %this.farSlope = 5.0;
-}
-
-function DOFPostEffect::setLerpDist( %this, %d0, %d1, %d2 )
-{
-   %this.lerpScale = -1.0 / %d0 SPC -1.0 / %d1 SPC -1.0 / %d2 SPC 1.0 / %d2;
-   %this.lerpBias = 1.0 SPC ( 1.0 - %d2 ) / %d1 SPC 1.0 / %d2 SPC ( %d2 - 1.0 ) / %d2;
-}
-
-singleton PostEffect( DOFPostEffect )
-{
-   renderTime = "PFXAfterBin";
-   renderBin = "GlowBin";      
-   renderPriority = 0.1;
-      
-   shader = PFX_DOFDownSampleShader;
-   stateBlock = PFX_DOFDownSampleStateBlock;
-   texture[0] = "$backBuffer";
-   texture[1] = "#deferred";
-   target = "#shrunk";
-   targetScale = "0.25 0.25";   
-   
-   isEnabled = false;
-};
-
-singleton PostEffect( DOFBlurY )
-{
-   shader = PFX_DOFBlurYShader;
-   stateBlock = PFX_DOFBlurStateBlock;
-   texture[0] = "#shrunk";
-   target = "$outTex";
-};
-
-DOFPostEffect.add( DOFBlurY );
-
-singleton PostEffect( DOFBlurX )
-{
-   shader = PFX_DOFBlurXShader;
-   stateBlock = PFX_DOFBlurStateBlock;
-   texture[0] = "$inTex";  
-   target = "#largeBlur";
-};
-
-DOFPostEffect.add( DOFBlurX );
-
-singleton PostEffect( DOFCalcCoC )
-{
-   shader = PFX_DOFCalcCoCShader;
-   stateBlock = PFX_DOFCalcCoCStateBlock;
-   texture[0] = "#shrunk";
-   texture[1] = "#largeBlur";
-   target = "$outTex";
-};
-
-DOFPostEffect.add( DOFCalcCoc );
-  
-singleton PostEffect( DOFSmallBlur )
-{
-   shader = PFX_DOFSmallBlurShader;
-   stateBlock = PFX_DefaultDOFStateBlock;
-   texture[0] = "$inTex";
-   target = "$outTex";
-};
-
-DOFPostEffect.add( DOFSmallBlur );
-   
-singleton PostEffect( DOFFinalPFX )
-{
-   shader = PFX_DOFFinalShader;
-   stateBlock = PFX_DOFFinalStateBlock;
-   texture[0] = "$backBuffer";
-   texture[1] = "$inTex";
-   texture[2] = "#largeBlur";   
-   texture[3] = "#deferred";   
-   target = "$backBuffer";
-};
-
-DOFPostEffect.add( DOFFinalPFX );
-
-
-//-----------------------------------------------------------------------------
-// Scripts
-//-----------------------------------------------------------------------------
-
-function DOFPostEffect::setShaderConsts( %this )
-{
-   if ( %this.autoFocusEnabled )
-      %this.autoFocus();
-   
-   %fd = %this.focalDist / $Param::FarDist;
-      
-   %range = mLerp( %this.minRange, %this.maxRange, %fd ) / $Param::FarDist * 0.5;  
-   
-   // We work in "depth" space rather than real-world units for the
-   // rest of this method...
-   
-   // Given the focal distance and the range around it we want in focus
-   // we can determine the near-end-distance and far-start-distance
-      
-   %ned = getMax( %fd - %range, 0.0 );   
-   %fsd = getMin( %fd + %range, 1.0 );         
-   
-   // near slope
-   %nsl = %this.nearSlope;
-   
-   // Given slope of near blur equation and the near end dist and amount (x2,y2)
-   // solve for the y-intercept
-   // y = mx + b
-   // so...
-   // y - mx = b
-   
-   %b = 0.0 - %nsl * %ned;
-   
-   %eqNear = %nsl SPC %b SPC 0.0;
-   
-   // Do the same for the far blur equation...
-   
-   %fsl = %this.farSlope;
-   
-   %b = 0.0 - %fsl * %fsd;
-   
-   %eqFar = %fsl SPC %b SPC 1.0;
-   
-   %this.setShaderConst( "$dofEqWorld", %eqNear );           
-   DOFFinalPFX.setShaderConst( "$dofEqFar", %eqFar );
-      
-   %this.setShaderConst( "$maxWorldCoC", %this.nearBlurMax );
-   DOFFinalPFX.setShaderConst( "$maxFarCoC", %this.farBlurMax );      
-
-   DOFFinalPFX.setShaderConst( "$dofLerpScale", %this.lerpScale );
-   DOFFinalPFX.setShaderConst( "$dofLerpBias", %this.lerpBias );  
-}
-
-function DOFPostEffect::autoFocus( %this )
-{      
-   if ( !isObject( ServerConnection ) ||   
-        !isObject( ServerConnection.getCameraObject() ) )
-   {      
-      return;
-   }
-   
-   %mask = $TypeMasks::StaticObjectType | $TypeMasks::TerrainObjectType;               
-   %control = ServerConnection.getCameraObject();
-
-   %fvec = %control.getEyeVector();      
-   %start = %control.getEyePoint();
-      
-   %end = VectorAdd( %start, VectorScale( %fvec, $Param::FarDist ) );
-      
-   // Use the client container for this ray cast.
-   %result = containerRayCast( %start, %end, %mask, %control, true );
-   
-   %hitPos = getWords( %result, 1, 3 );
-   
-   if ( %hitPos $= "" )
-      %focDist = $Param::FarDist;
-   else
-      %focDist = VectorDist( %hitPos, %start );  
-      
-   // For debuging   
-   //$DOF::debug_dist = %focDist;
-   //$DOF::debug_depth = %focDist / $Param::FarDist;      
-   //echo( "F: " @ %focDist SPC "D: " @ %delta );
-     
-   %this.focalDist = %focDist;
-}
-
-
-// For debugging
-/*
-function reloadDOF()
-{
-   exec( "./dof.cs" );
-   DOFPostEffect.reload();  
-   DOFPostEffect.disable();
-   DOFPostEffect.enable();
-}
-
-function dofMetricsCallback()
-{
-   return "  | DOF |" @
-          "  Dist: " @ $DOF::debug_dist @
-          "  Depth: " @ $DOF::debug_depth;               
-}
-*/

+ 0 - 113
Templates/BaseGame/game/core/postFX/edgeAA.cs

@@ -1,113 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-singleton GFXStateBlockData( PFX_DefaultEdgeAAStateBlock )
-{
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-      
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;
-   //samplerStates[1] = SamplerWrapPoint;
-};
-
-singleton ShaderData( PFX_EdgeAADetectShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/edgeaa/edgeDetectP.hlsl";
-         
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/edgeDetectP.glsl";
-      
-   samplerNames[0] = "$deferredBuffer";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( PFX_EdgeAAShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/edgeaa/edgeAAV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/edgeaa/edgeAAP.hlsl";
-         
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/edgeAAV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/edgeAAP.glsl";
-      
-   samplerNames[0] = "$edgeBuffer";
-   samplerNames[1] = "$backBuffer";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( PFX_EdgeAADebugShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/edgeaa/dbgEdgeDisplayP.hlsl";
-         
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/dbgEdgeDisplayP.glsl";
-      
-   samplerNames[0] = "$edgeBuffer";
-   
-   pixVersion = 3.0;
-};
-
-singleton PostEffect( EdgeDetectPostEffect )
-{
-   renderTime = "PFXBeforeBin";
-   renderBin = "ObjTranslucentBin";      
-   //renderPriority = 0.1;
-   targetScale = "0.5 0.5";
-      
-   shader = PFX_EdgeAADetectShader;
-   stateBlock = PFX_DefaultEdgeAAStateBlock;
-   texture[0] = "#deferred";
-   target = "#edge";
-   
-   isEnabled = true;
-};
-
-singleton PostEffect( EdgeAAPostEffect )
-{
-   renderTime = "PFXAfterDiffuse";
-   //renderBin = "ObjTranslucentBin";      
-   //renderPriority = 0.1;
-   
-   shader = PFX_EdgeAAShader;
-   stateBlock = PFX_DefaultEdgeAAStateBlock;
-   texture[0] = "#edge"; 
-   texture[1] = "$backBuffer";
-   target = "$backBuffer";
-};
-   
-singleton PostEffect( Debug_EdgeAAPostEffect )
-{
-   renderTime = "PFXAfterDiffuse";
-   //renderBin = "ObjTranslucentBin";      
-   //renderPriority = 0.1;
-      
-   shader = PFX_EdgeAADebugShader;
-   stateBlock = PFX_DefaultEdgeAAStateBlock;
-   texture[0] = "#edge"; 
-   target = "$backBuffer";
-};

+ 0 - 63
Templates/BaseGame/game/core/postFX/flash.cs

@@ -1,63 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( PFX_FlashShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/flashP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/flashP.glsl";
-   
-   samplerNames[0] = "$backBuffer";
-
-   defines = "WHITE_COLOR=float4(1.0,1.0,1.0,0.0);MUL_COLOR=float4(1.0,0.25,0.25,0.0)";
-
-   pixVersion = 2.0;
-};
- 
-singleton PostEffect( FlashFx )
-{
-   isEnabled = false;    
-   allowReflectPass = false;  
-
-   renderTime = "PFXAfterDiffuse";  
-
-   shader = PFX_FlashShader;   
-   texture[0] = "$backBuffer";  
-   renderPriority = 10;
-   stateBlock = PFX_DefaultStateBlock;  
-};
-
-function FlashFx::setShaderConsts( %this )
-{
-   if ( isObject( ServerConnection ) )
-   {
-      %this.setShaderConst( "$damageFlash", ServerConnection.getDamageFlash() );
-      %this.setShaderConst( "$whiteOut", ServerConnection.getWhiteOut() );
-   }
-   else
-   {
-      %this.setShaderConst( "$damageFlash", 0 );
-      %this.setShaderConst( "$whiteOut", 0 );
-   }
-}

+ 0 - 135
Templates/BaseGame/game/core/postFX/fog.cs

@@ -1,135 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-//------------------------------------------------------------------------------
-// Fog
-//------------------------------------------------------------------------------
-
-singleton ShaderData( FogPassShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/fogP.hlsl";
-         
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/fogP.glsl";
-            
-   samplerNames[0] = "$deferredTex";
-   
-   pixVersion = 2.0;
-};
-
-
-singleton GFXStateBlockData( FogPassStateBlock : PFX_DefaultStateBlock )
-{   
-   blendDefined = true;
-   blendEnable = true; 
-   blendSrc = GFXBlendSrcAlpha;
-   blendDest = GFXBlendInvSrcAlpha;
-};
-
-
-singleton PostEffect( FogPostFx )
-{   
-   // We forward render the reflection pass
-   // so it does its own fogging.
-   allowReflectPass = false;
-      
-   renderTime = "PFXBeforeBin";
-   renderBin = "ObjTranslucentBin";   
-   
-   shader = FogPassShader;
-   stateBlock = FogPassStateBlock;
-   texture[0] = "#deferred";
-   
-   renderPriority = 5;
-   
-   targetFormat = getBestHDRFormat();
-   isEnabled = true;
-};
-
-
-//------------------------------------------------------------------------------
-// UnderwaterFog
-//------------------------------------------------------------------------------
-
-singleton ShaderData( UnderwaterFogPassShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/underwaterFogP.hlsl";
-         
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/underwaterFogP.glsl";
-            
-   samplerNames[0] = "$deferredTex";
-   samplerNames[1] = "$backbuffer";
-   samplerNames[2] = "$waterDepthGradMap";
-   
-   pixVersion = 2.0;      
-};
-
-
-singleton GFXStateBlockData( UnderwaterFogPassStateBlock : PFX_DefaultStateBlock )
-{   
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;
-   samplerStates[1] = SamplerClampPoint;   
-   samplerStates[2] = SamplerClampLinear;
-};
-
-
-singleton PostEffect( UnderwaterFogPostFx )
-{
-   oneFrameOnly = true;
-   onThisFrame = false;
-   
-   // Let the fog effect render during the 
-   // reflection pass.
-   allowReflectPass = true;
-      
-   renderTime = "PFXBeforeBin";
-   renderBin = "ObjTranslucentBin";   
-  
-   shader = UnderwaterFogPassShader;
-   stateBlock = UnderwaterFogPassStateBlock;
-   texture[0] = "#deferred";
-   texture[1] = "$backBuffer";
-   texture[2] = "#waterDepthGradMap";
-   
-   // Needs to happen after the FogPostFx
-   renderPriority = 4;
-   
-   isEnabled = true;
-};
-
-function UnderwaterFogPostFx::onEnabled( %this )
-{
-   TurbulenceFx.enable();
-   CausticsPFX.enable();
-   return true;
-}
-
-function UnderwaterFogPostFx::onDisabled( %this )
-{
-   TurbulenceFx.disable();
-   CausticsPFX.disable();
-   return false;
-}

+ 0 - 64
Templates/BaseGame/game/core/postFX/fxaa.cs

@@ -1,64 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// An implementation of "NVIDIA FXAA 3.11" by TIMOTHY LOTTES
-//
-// http://timothylottes.blogspot.com/
-//
-// The shader is tuned for the defaul quality and good performance.
-// See shaders\common\postFx\fxaa\fxaaP.hlsl to tweak the internal
-// quality and performance settings.
-
-singleton GFXStateBlockData( FXAA_StateBlock : PFX_DefaultStateBlock )
-{   
-   samplersDefined = true;   
-   samplerStates[0] = SamplerClampLinear;
-};
-
-singleton ShaderData( FXAA_ShaderData )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/fxaa/fxaaV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/fxaa/fxaaP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/fxaa/gl/fxaaV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/fxaa/gl/fxaaP.glsl";
-   
-   samplerNames[0] = "$colorTex";
-
-   pixVersion = 3.0;
-};
-
-singleton PostEffect( FXAA_PostEffect )
-{
-   isEnabled = false;
-   
-   allowReflectPass = false;
-   renderTime = "PFXAfterDiffuse";
-
-   texture[0] = "$backBuffer";      
-
-   target = "$backBuffer";
-
-   stateBlock = FXAA_StateBlock;
-   shader = FXAA_ShaderData;
-};
-

+ 0 - 184
Templates/BaseGame/game/core/postFX/glow.cs

@@ -1,184 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-singleton ShaderData( PFX_GlowBlurVertShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/glowBlurV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/glowBlurP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/glowBlurV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/gl/glowBlurP.glsl";
-      
-   defines = "BLUR_DIR=float2(0.0,1.0)";
-
-   samplerNames[0] = "$diffuseMap";
-         
-   pixVersion = 2.0;
-};
-
-
-singleton ShaderData( PFX_GlowBlurHorzShader : PFX_GlowBlurVertShader )
-{
-   defines = "BLUR_DIR=float2(1.0,0.0)";
-};
-
-
-singleton GFXStateBlockData( PFX_GlowCombineStateBlock : PFX_DefaultStateBlock )
-{
-   // Use alpha test to save some fillrate 
-   // on the non-glowing areas of the scene.
-   alphaDefined = true;
-   alphaTestEnable = true;
-   alphaTestRef = 1;
-   alphaTestFunc = GFXCmpGreaterEqual;
-         
-   // Do a one to one blend.
-   blendDefined = true;
-   blendEnable = true;
-   blendSrc = GFXBlendOne;
-   blendDest = GFXBlendOne;   
-};
-
-
-singleton PostEffect( GlowPostFx )
-{  
-   // Do not allow the glow effect to work in reflection 
-   // passes by default so we don't do the extra drawing.
-   allowReflectPass = false;
-                  
-   renderTime = "PFXAfterBin";
-   renderBin = "GlowBin";
-   renderPriority = 1;
-                    
-   // First we down sample the glow buffer.   
-   shader = PFX_PassthruShader;
-   stateBlock = PFX_DefaultStateBlock;
-   texture[0] = "#glowbuffer";
-   target = "$outTex";
-   targetScale = "0.5 0.5";
-   
-   isEnabled = true;
-               
-   // Blur vertically
-   new PostEffect()
-   {
-      shader = PFX_GlowBlurVertShader;
-      stateBlock = PFX_DefaultStateBlock;
-      texture[0] = "$inTex";
-      target = "$outTex";
-   };
-   
-   // Blur horizontally
-   new PostEffect()
-   {
-      shader = PFX_GlowBlurHorzShader;
-      stateBlock = PFX_DefaultStateBlock;
-      texture[0] = "$inTex";
-      target = "$outTex";
-   };
-            
-   // Upsample and combine with the back buffer.
-   new PostEffect()
-   {      
-      shader = PFX_PassthruShader;
-      stateBlock = PFX_GlowCombineStateBlock;
-      texture[0] = "$inTex";
-      target = "$backBuffer";
-   };
-};
-
-singleton ShaderData( PFX_VolFogGlowBlurVertShader )
-{
-	DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/glowBlurV.hlsl";
-	DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/VolFogGlowP.hlsl";
-	
-	OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/glowBlurV.glsl";
-	OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/VolFogGlowP.glsl";	
-	
-	defines = "BLUR_DIR=float2(0.0,1.0)";
-	samplerNames[0] = "$diffuseMap";
-	pixVersion = 2.0;
-};
-singleton ShaderData( PFX_VolFogGlowBlurHorzShader : PFX_VolFogGlowBlurVertShader )
-{
-	DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/glowBlurV.hlsl";
-	DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/VolFogGlowP.hlsl";
-	
-	OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/glowBlurV.glsl";
-	OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/VolFogGlowP.glsl";
-	
-	defines = "BLUR_DIR=float2(1.0,0.0)";
-};
-
-$VolFogGlowPostFx::glowStrength = 0.3;
-
-singleton PostEffect( VolFogGlowPostFx )
-{
-	// Do not allow the glow effect to work in reflection
-	// passes by default so we don't do the extra drawing.
-	allowReflectPass = false;
-	renderTime = "PFXAfterBin";
-	renderBin = "FogBin";
-	renderPriority = 1;
-	// First we down sample the glow buffer.
-	shader = PFX_PassthruShader;
-	stateBlock = PFX_DefaultStateBlock;
-	texture[0] = "$backbuffer";
-	target = "$outTex";
-	targetScale = "0.5 0.5";
-	isEnabled = true;
-	// Blur vertically
-	new PostEffect()
-	{
-		shader = PFX_VolFogGlowBlurVertShader;
-		stateBlock = PFX_DefaultStateBlock;
-		internalName = "vert";
-		texture[0] = "$inTex";
-		target = "$outTex";
-	};
-	// Blur horizontally
-	new PostEffect()
-	{
-		shader = PFX_VolFogGlowBlurHorzShader;
-		stateBlock = PFX_DefaultStateBlock;
-		internalName = "hor";
-		texture[0] = "$inTex";
-		target = "$outTex";
-	};
-	// Upsample and combine with the back buffer.
-	new PostEffect()
-	{
-		shader = PFX_PassthruShader;
-		stateBlock = PFX_GlowCombineStateBlock;
-		texture[0] = "$inTex";
-		target = "$backBuffer";
-	};
-};
-
-function VolFogGlowPostFx::setShaderConsts( %this )
-{
-	%vp=%this-->vert;
-	%vp.setShaderConst( "$strength", $VolFogGlowPostFx::glowStrength );
-	%vp=%this-->hor;
-	%vp.setShaderConst( "$strength", $VolFogGlowPostFx::glowStrength );
-}

+ 0 - 529
Templates/BaseGame/game/core/postFX/hdr.cs

@@ -1,529 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-/// Blends between the scene and the tone mapped scene.
-$HDRPostFX::enableToneMapping = 0.5;
-
-/// The tone mapping middle grey or exposure value used
-/// to adjust the overall "balance" of the image.
-///
-/// 0.18 is fairly common value.
-///
-$HDRPostFX::keyValue = 0.18;
-
-/// The minimum luninace value to allow when tone mapping 
-/// the scene.  Is particularly useful if your scene very 
-/// dark or has a black ambient color in places.
-$HDRPostFX::minLuminace = 0.001;
-
-/// The lowest luminance value which is mapped to white.  This
-/// is usually set to the highest visible luminance in your 
-/// scene.  By setting this to smaller values you get a contrast
-/// enhancement.
-$HDRPostFX::whiteCutoff = 1.0;
-
-/// The rate of adaptation from the previous and new 
-/// average scene luminance. 
-$HDRPostFX::adaptRate = 2.0;
-
-/// Blends between the scene and the blue shifted version
-/// of the scene for a cinematic desaturated night effect.
-$HDRPostFX::enableBlueShift = 0.0;
-
-/// The blue shift color value.
-$HDRPostFX::blueShiftColor = "1.05 0.97 1.27";
-
-
-/// Blends between the scene and the bloomed scene.
-$HDRPostFX::enableBloom = 1.0;
-
-/// The threshold luminace value for pixels which are
-/// considered "bright" and need to be bloomed.
-$HDRPostFX::brightPassThreshold = 1.0;
-
-/// These are used in the gaussian blur of the
-/// bright pass for the bloom effect.
-$HDRPostFX::gaussMultiplier = 0.3;
-$HDRPostFX::gaussMean = 0.0;
-$HDRPostFX::gaussStdDev = 0.8;
-
-/// The 1x255 color correction ramp texture used
-/// by both the HDR shader and the GammaPostFx shader
-/// for doing full screen color correction. 
-$HDRPostFX::colorCorrectionRamp = "core/images/null_color_ramp.png";
-
-
-singleton ShaderData( HDR_BrightPassShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/brightPassFilterP.hlsl";   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/brightPassFilterP.glsl";
-   
-   samplerNames[0] = "$inputTex";
-   samplerNames[1] = "$luminanceTex";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( HDR_DownScale4x4Shader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/downScale4x4V.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/downScale4x4P.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/hdr/gl/downScale4x4V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/downScale4x4P.glsl";
-   
-   samplerNames[0] = "$inputTex";
-   
-   pixVersion = 2.0;
-};
-
-singleton ShaderData( HDR_BloomGaussBlurHShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/bloomGaussBlurHP.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/bloomGaussBlurHP.glsl";
-   
-   samplerNames[0] = "$inputTex";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( HDR_BloomGaussBlurVShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/bloomGaussBlurVP.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/bloomGaussBlurVP.glsl";
-   
-   samplerNames[0] = "$inputTex";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( HDR_SampleLumShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/sampleLumInitialP.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/sampleLumInitialP.glsl";
-   
-   samplerNames[0] = "$inputTex";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( HDR_DownSampleLumShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/sampleLumIterativeP.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/sampleLumIterativeP.glsl";
-   
-   samplerNames[0] = "$inputTex";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( HDR_CalcAdaptedLumShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/calculateAdaptedLumP.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/calculateAdaptedLumP.glsl";
-   
-   samplerNames[0] = "$currLum";
-   samplerNames[1] = "$lastAdaptedLum";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( HDR_CombineShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/finalPassCombineP.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/finalPassCombineP.glsl";
-   
-   samplerNames[0] = "$sceneTex";
-   samplerNames[1] = "$luminanceTex";
-   samplerNames[2] = "$bloomTex";
-   samplerNames[3] = "$colorCorrectionTex";
-   samplerNames[4] = "deferredTex";
-   
-   pixVersion = 3.0;
-};
-
-
-singleton GFXStateBlockData( HDR_SampleStateBlock : PFX_DefaultStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;
-   samplerStates[1] = SamplerClampPoint;
-};
-
-singleton GFXStateBlockData( HDR_DownSampleStateBlock : PFX_DefaultStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampLinear;
-};
-
-singleton GFXStateBlockData( HDR_CombineStateBlock : PFX_DefaultStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;
-   samplerStates[1] = SamplerClampLinear;
-   samplerStates[2] = SamplerClampLinear;
-   samplerStates[3] = SamplerClampLinear;
-};
-
-singleton GFXStateBlockData( HDRStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampLinear;
-   samplerStates[2] = SamplerClampLinear;
-   samplerStates[3] = SamplerClampLinear;
-   
-   blendDefined = true;
-   blendDest = GFXBlendOne;
-   blendSrc = GFXBlendZero;
-   
-   zDefined = true;
-   zEnable = false;
-   zWriteEnable = false;
-   
-   cullDefined = true;
-   cullMode = GFXCullNone;
-};
-
-
-function HDRPostFX::setShaderConsts( %this )
-{
-   %this.setShaderConst( "$brightPassThreshold", $HDRPostFX::brightPassThreshold );
-   %this.setShaderConst( "$g_fMiddleGray", $HDRPostFX::keyValue );   
-         
-   %bloomH = %this-->bloomH;
-   %bloomH.setShaderConst( "$gaussMultiplier", $HDRPostFX::gaussMultiplier );
-   %bloomH.setShaderConst( "$gaussMean", $HDRPostFX::gaussMean );
-   %bloomH.setShaderConst( "$gaussStdDev", $HDRPostFX::gaussStdDev );   
-
-   %bloomV = %this-->bloomV;
-   %bloomV.setShaderConst( "$gaussMultiplier", $HDRPostFX::gaussMultiplier );
-   %bloomV.setShaderConst( "$gaussMean", $HDRPostFX::gaussMean );
-   %bloomV.setShaderConst( "$gaussStdDev", $HDRPostFX::gaussStdDev );   
-
-   %minLuminace = $HDRPostFX::minLuminace;
-   if ( %minLuminace <= 0.0 )
-   {
-      // The min should never be pure zero else the
-      // log() in the shader will generate INFs.      
-      %minLuminace = 0.00001;
-   }
-   %this-->adaptLum.setShaderConst( "$g_fMinLuminace", %minLuminace );
-        
-   %this-->finalLum.setShaderConst( "$adaptRate", $HDRPostFX::adaptRate );
-   
-   %combinePass = %this-->combinePass;   
-   %combinePass.setShaderConst( "$g_fEnableToneMapping", $HDRPostFX::enableToneMapping );
-   %combinePass.setShaderConst( "$g_fMiddleGray", $HDRPostFX::keyValue );
-   %combinePass.setShaderConst( "$g_fBloomScale", $HDRPostFX::enableBloom );      
-   %combinePass.setShaderConst( "$g_fEnableBlueShift", $HDRPostFX::enableBlueShift );   
-   %combinePass.setShaderConst( "$g_fBlueShiftColor", $HDRPostFX::blueShiftColor );   
-   
-   %clampedGamma  = mClamp( $pref::Video::Gamma, 2.0, 2.5);
-   %combinePass.setShaderConst( "$g_fOneOverGamma",  1 / %clampedGamma );       
-   %combinePass.setShaderConst( "$Brightness", $pref::Video::Brightness );
-   %combinePass.setShaderConst( "$Contrast", $pref::Video::Contrast );
-
-   %whiteCutoff = ( $HDRPostFX::whiteCutoff * $HDRPostFX::whiteCutoff ) *
-                  ( $HDRPostFX::whiteCutoff * $HDRPostFX::whiteCutoff );                  
-   %combinePass.setShaderConst( "$g_fWhiteCutoff", %whiteCutoff );
-}
-
-function HDRPostFX::preProcess( %this )
-{
-   %combinePass = %this-->combinePass;
-   
-   if ( %combinePass.texture[3] !$= $HDRPostFX::colorCorrectionRamp )
-      %combinePass.setTexture( 3, $HDRPostFX::colorCorrectionRamp );         
-}
-
-function HDRPostFX::onEnabled( %this )
-{
-   // See what HDR format would be best.
-   %format = getBestHDRFormat();
-   if ( %format $= "" || %format $= "GFXFormatR8G8B8A8" )
-   {
-      // We didn't get a valid HDR format... so fail.
-      return false;
-   }
-   
-   // HDR does it's own gamma calculation so 
-   // disable this postFx.
-   GammaPostFX.disable();
-   
-   // Set the right global shader define for HDR.
-   if ( %format $= "GFXFormatR10G10B10A2" )
-      addGlobalShaderMacro( "TORQUE_HDR_RGB10" );
-   else if ( %format $= "GFXFormatR16G16B16A16" )
-      addGlobalShaderMacro( "TORQUE_HDR_RGB16" );
-                        
-   echo( "HDR FORMAT: " @ %format );
-   
-   // Change the format of the offscreen surface
-   // to an HDR compatible format.
-   AL_FormatToken.format = %format;
-   setReflectFormat( %format );
-   
-   // Reset the light manager which will ensure the new
-   // hdr encoding takes effect in all the shaders and
-   // that the offscreen surface is enabled.
-   resetLightManager();
-         
-   return true;
-}
-
-function HDRPostFX::onDisabled( %this )
-{
-   // Enable a special GammaCorrection PostFX when this is disabled.
-   GammaPostFX.enable();
-   
-   // Restore the non-HDR offscreen surface format.
-   %format = getBestHDRFormat();
-   AL_FormatToken.format = %format;
-   setReflectFormat( %format );
-   
-   removeGlobalShaderMacro( "TORQUE_HDR_RGB10" );
-   removeGlobalShaderMacro( "TORQUE_HDR_RGB16" );
-            
-   // Reset the light manager which will ensure the new
-   // hdr encoding takes effect in all the shaders.
-   resetLightManager();
-}
-
-singleton PostEffect( HDRPostFX )
-{
-   isEnabled = false;
-   allowReflectPass = false;
-
-   // Resolve the HDR before we render any editor stuff
-   // and before we resolve the scene to the backbuffer.
-   renderTime = "PFXBeforeBin";
-   renderBin = "EditorBin";
-   renderPriority = 9999;
-      
-   // The bright pass generates a bloomed version of 
-   // the scene for pixels which are brighter than a 
-   // fixed threshold value.
-   //
-   // This is then used in the final HDR combine pass
-   // at the end of this post effect chain.
-   //
-                                
-      shader = HDR_BrightPassShader;
-      stateBlock = HDR_DownSampleStateBlock;
-      texture[0] = "$backBuffer";
-      texture[1] = "#adaptedLum";
-      target = "$outTex";
-      targetFormat = "GFXFormatR16G16B16A16F"; 
-      targetScale = "0.5 0.5";
-      
-      new PostEffect()
-      {
-         allowReflectPass = false;
-         shader = HDR_DownScale4x4Shader;
-         stateBlock = HDR_DownSampleStateBlock;
-         texture[0] = "$inTex";
-         target = "$outTex";
-         targetFormat = "GFXFormatR16G16B16A16F";
-         targetScale = "0.25 0.25";
-      };
-      
-      new PostEffect()
-      {
-         allowReflectPass = false;
-         internalName = "bloomH";
-         
-         shader = HDR_BloomGaussBlurHShader;
-         stateBlock = HDR_DownSampleStateBlock;
-         texture[0] = "$inTex";
-         target = "$outTex";
-         targetFormat = "GFXFormatR16G16B16A16F";   
-      };
-
-      new PostEffect()
-      {
-         allowReflectPass = false;
-         internalName = "bloomV";
-                  
-         shader = HDR_BloomGaussBlurVShader;
-         stateBlock = HDR_DownSampleStateBlock;
-         texture[0] = "$inTex";
-         target = "#bloomFinal";
-         targetFormat = "GFXFormatR16G16B16A16F";    
-      };
-
-   // BrightPass End
-   
-   // Now calculate the adapted luminance.
-   new PostEffect()
-   {
-      allowReflectPass = false;
-      internalName = "adaptLum";
-      
-      shader = HDR_SampleLumShader;
-      stateBlock = HDR_DownSampleStateBlock;
-      texture[0] = "$backBuffer";
-      target = "$outTex";
-      targetScale = "0.0625 0.0625"; // 1/16th
-      targetFormat = "GFXFormatR16F";
-      
-      new PostEffect()
-      {
-         allowReflectPass = false;
-         shader = HDR_DownSampleLumShader;
-         stateBlock = HDR_DownSampleStateBlock;
-         texture[0] = "$inTex";
-         target = "$outTex";
-         targetScale = "0.25 0.25"; // 1/4
-         targetFormat = "GFXFormatR16F";
-      };
-      
-      new PostEffect()
-      {
-         allowReflectPass = false;
-         shader = HDR_DownSampleLumShader;
-         stateBlock = HDR_DownSampleStateBlock;
-         texture[0] = "$inTex";
-         target = "$outTex";
-         targetScale = "0.25 0.25"; // 1/4
-         targetFormat = "GFXFormatR16F";
-      };
-      
-      new PostEffect()
-      {
-         allowReflectPass = false;
-         shader = HDR_DownSampleLumShader;
-         stateBlock = HDR_DownSampleStateBlock;
-         texture[0] = "$inTex";
-         target = "$outTex";
-         targetScale = "0.25 0.25"; // At this point the target should be 1x1.
-         targetFormat = "GFXFormatR16F";
-      };
-
-      // Note that we're reading the adapted luminance
-      // from the previous frame when generating this new
-      // one... PostEffect takes care to manage that.
-      new PostEffect()
-      {
-         allowReflectPass = false;
-         internalName = "finalLum";
-         shader = HDR_CalcAdaptedLumShader;
-         stateBlock = HDR_DownSampleStateBlock;
-         texture[0] = "$inTex";
-         texture[1] = "#adaptedLum";
-         target = "#adaptedLum";
-         targetFormat = "GFXFormatR16F";
-         targetClear = "PFXTargetClear_OnCreate";
-         targetClearColor = "1 1 1 1";
-      };
-   };
-   
-   // Output the combined bloom and toned mapped
-   // version of the scene.
-   new PostEffect()
-   {
-      allowReflectPass = false;
-      internalName = "combinePass";
-      
-      shader = HDR_CombineShader;
-      stateBlock = HDR_CombineStateBlock;
-      texture[0] = "$backBuffer";
-      texture[1] = "#adaptedLum";            
-      texture[2] = "#bloomFinal";
-      texture[3] = $HDRPostFX::colorCorrectionRamp;
-      target = "$backBuffer";
-   };
-};
-
-singleton ShaderData( LuminanceVisShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/hdr/luminanceVisP.hlsl";
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/hdr/gl/luminanceVisP.glsl";
-   
-   samplerNames[0] = "$inputTex";
-   
-   pixVersion = 3.0;
-};
-
-singleton GFXStateBlockData( LuminanceVisStateBlock : PFX_DefaultStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;   
-};
-
-function LuminanceVisPostFX::setShaderConsts( %this )
-{
-   %this.setShaderConst( "$brightPassThreshold", $HDRPostFX::brightPassThreshold );
-}
-
-singleton PostEffect( LuminanceVisPostFX )
-{
-   isEnabled = false;
-   allowReflectPass = false;
-      
-   // Render before we do any editor rendering.  
-   renderTime = "PFXBeforeBin";
-   renderBin = "EditorBin";
-   renderPriority = 9999;
-   
-   shader = LuminanceVisShader;
-   stateBlock = LuminanceVisStateBlock;
-   texture[0] = "$backBuffer";
-   target = "$backBuffer";
-   //targetScale = "0.0625 0.0625"; // 1/16th
-   //targetFormat = "GFXFormatR16F";
-};
-
-function LuminanceVisPostFX::onEnabled( %this )
-{
-   if ( !HDRPostFX.isEnabled() )
-   {
-      HDRPostFX.enable();
-   }
-   
-   HDRPostFX.skip = true;
-   
-   return true;
-}
-
-function LuminanceVisPostFX::onDisabled( %this )
-{      
-   HDRPostFX.skip = false; 
-}
-

+ 0 - 110
Templates/BaseGame/game/core/postFX/lightRay.cs

@@ -1,110 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-$LightRayPostFX::brightScalar = 0.75;
-$LightRayPostFX::numSamples = 40;
-$LightRayPostFX::density = 0.94;
-$LightRayPostFX::weight = 5.65;
-$LightRayPostFX::decay = 1.0;
-$LightRayPostFX::exposure = 0.0005;
-$LightRayPostFX::resolutionScale = 1.0;
-
-
-singleton ShaderData( LightRayOccludeShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/lightRay/lightRayOccludeP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/lightRay/gl/lightRayOccludeP.glsl";
-   
-   samplerNames[0] = "$backBuffer";
-   samplerNames[1] = "$deferredTex";
-
-   pixVersion = 3.0;   
-};
-
-singleton ShaderData( LightRayShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/lightRay/lightRayP.hlsl";
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/lightRay/gl/lightRayP.glsl";
-   
-   samplerNames[0] = "$frameSampler";
-   samplerNames[1] = "$backBuffer";
-
-   pixVersion = 3.0;   
-};
-
-singleton GFXStateBlockData( LightRayStateBlock : PFX_DefaultStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampLinear;     
-};
-
-singleton PostEffect( LightRayPostFX )
-{
-   isEnabled = false;
-   allowReflectPass = false;
-        
-   renderTime = "PFXBeforeBin";
-   renderBin = "EditorBin";
-   renderPriority = 10;
-      
-   shader = LightRayOccludeShader;
-   stateBlock = LightRayStateBlock;
-   texture[0] = "$backBuffer";
-   texture[1] = "#deferred";
-   target = "$outTex";
-   targetFormat = "GFXFormatR16G16B16A16F";
-      
-   new PostEffect()
-   {
-      shader = LightRayShader;
-      stateBlock = LightRayStateBlock;
-      internalName = "final";
-      texture[0] = "$inTex";
-      texture[1] = "$backBuffer";
-      target = "$backBuffer";
-   };
-};
-
-function LightRayPostFX::preProcess( %this )
-{   
-   %this.targetScale = $LightRayPostFX::resolutionScale SPC $LightRayPostFX::resolutionScale;
-}
-
-function LightRayPostFX::setShaderConsts( %this )
-{
-   %this.setShaderConst( "$brightScalar", $LightRayPostFX::brightScalar );
-   
-   %pfx = %this-->final;
-   %pfx.setShaderConst( "$numSamples", $LightRayPostFX::numSamples );
-   %pfx.setShaderConst( "$density", $LightRayPostFX::density );
-   %pfx.setShaderConst( "$weight", $LightRayPostFX::weight );
-   %pfx.setShaderConst( "$decay", $LightRayPostFX::decay );
-   %pfx.setShaderConst( "$exposure", $LightRayPostFX::exposure );
-}

+ 0 - 167
Templates/BaseGame/game/core/postFX/ovrBarrelDistortion.cs

@@ -1,167 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-// Only load these shaders if an Oculus VR device is present
-if(!isFunction(isOculusVRDeviceActive))
-   return;
-
-//-----------------------------------------------------------------------------
-// Shader data
-//-----------------------------------------------------------------------------
-
-singleton ShaderData( OVRMonoToStereoShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/oculusvr/monoToStereoP.hlsl";
-   
-   //OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.hlsl";
-   //OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/oculusvr/gl/monoToStereoP.glsl";
-   
-   samplerNames[0] = "$backBuffer";
-
-   pixVersion = 2.0;   
-};
-
-singleton ShaderData( OVRBarrelDistortionShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/oculusvr/barrelDistortionP.hlsl";
-   
-   //OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   //OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/oculusvr/gl/barrelDistortionP.glsl";
-   
-   samplerNames[0] = "$backBuffer";
-
-   pixVersion = 2.0;   
-};
-
-singleton ShaderData( OVRBarrelDistortionChromaShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/oculusvr/barrelDistortionChromaP.hlsl";
-
-   pixVersion = 2.0;   
-};
-
-//-----------------------------------------------------------------------------
-// GFX state blocks
-//-----------------------------------------------------------------------------
-
-singleton GFXStateBlockData( OVRBarrelDistortionStateBlock : PFX_DefaultStateBlock )
-{
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-};
-
-//-----------------------------------------------------------------------------
-// Barrel Distortion PostFx
-//
-// To be used with the Oculus Rift.
-// Expects a stereo pair to exist on the back buffer and then applies the
-// appropriate barrel distortion.
-//-----------------------------------------------------------------------------
-singleton BarrelDistortionPostEffect( OVRBarrelDistortionPostFX )
-{
-   isEnabled = false;
-   allowReflectPass = false;
-   
-   renderTime = "PFXAfterDiffuse";
-   renderPriority = 100;
-
-   // The barrel distortion   
-   shader = OVRBarrelDistortionShader;
-   stateBlock = OVRBarrelDistortionStateBlock;
-   
-   texture[0] = "$backBuffer";
-   
-   scaleOutput = 1.25;
-};
-
-//-----------------------------------------------------------------------------
-// Barrel Distortion with Chromatic Aberration Correction PostFx
-//
-// To be used with the Oculus Rift.
-// Expects a stereo pair to exist on the back buffer and then applies the
-// appropriate barrel distortion.
-// This version applies a chromatic aberration correction during the
-// barrel distortion.
-//-----------------------------------------------------------------------------
-singleton BarrelDistortionPostEffect( OVRBarrelDistortionChromaPostFX )
-{
-   isEnabled = false;
-   allowReflectPass = false;
-   
-   renderTime = "PFXAfterDiffuse";
-   renderPriority = 100;
-
-   // The barrel distortion   
-   shader = OVRBarrelDistortionChromaShader;
-   stateBlock = OVRBarrelDistortionStateBlock;
-   
-   texture[0] = "$backBuffer";
-   
-   scaleOutput = 1.25;
-};
-
-//-----------------------------------------------------------------------------
-// Barrel Distortion Mono PostFx
-//
-// To be used with the Oculus Rift.
-// Takes a non-stereo image and turns it into a stereo pair with barrel
-// distortion applied.  Only a vertical slice around the center of the back
-// buffer is used to generate the pseudo stereo pair.
-//-----------------------------------------------------------------------------
-singleton PostEffect( OVRBarrelDistortionMonoPostFX )
-{
-   isEnabled = false;
-   allowReflectPass = false;
-   
-   renderTime = "PFXAfterDiffuse";
-   renderPriority = 100;
-
-   // Converts the mono display to a stereo one   
-   shader = OVRMonoToStereoShader;
-   stateBlock = OVRBarrelDistortionStateBlock;
-   
-   texture[0] = "$backBuffer";
-   target = "$outTex";
-
-   // The actual barrel distortion   
-   new BarrelDistortionPostEffect(OVRBarrelDistortionMonoStage2PostFX)
-   {
-      shader = OVRBarrelDistortionShader;
-      stateBlock = OVRBarrelDistortionStateBlock;
-      texture[0] = "$inTex";
-      target = "$backBuffer";
-      
-      scaleOutput = 1.25;
-   };
-
-};
-
-function OVRBarrelDistortionMonoPostFX::setShaderConsts( %this )
-{
-   %HMDIndex = 0;
-   
-   %xOffsets = getOVRHMDEyeXOffsets(%HMDIndex);
-   %this.setShaderConst( "$LensXOffsets", %xOffsets );
-}

+ 0 - 2755
Templates/BaseGame/game/core/postFX/postFxManager.gui

@@ -1,2755 +0,0 @@
-//--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(PostFXManager) {
-   position = "0 0";
-   extent = "1024 768";
-   minExtent = "8 8";
-   horizSizing = "width";
-   vertSizing = "height";
-   profile = "GuiModelessDialogProfile";
-   visible = "1";
-   active = "1";
-   tooltipProfile = "GuiToolTipProfile";
-   hovertime = "1000";
-   isContainer = "1";
-   canSave = "1";
-   canSaveDynamicFields = "1";
-
-   new DbgFileView() {
-      position = "0 0";
-      extent = "8 2";
-      minExtent = "8 2";
-      horizSizing = "right";
-      vertSizing = "bottom";
-      profile = "GuiDefaultProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-   };
-   new GuiWindowCtrl(ppOptionsWindow) {
-      text = "PostFX Manager";
-      resizeWidth = "0";
-      resizeHeight = "0";
-      canMove = "1";
-      canClose = "1";
-      canMinimize = "0";
-      canMaximize = "0";
-      canCollapse = "0";
-      closeCommand = "Canvas.popDialog(PostFXManager);";
-      edgeSnap = "0";
-      margin = "0 0 0 0";
-      padding = "0 0 0 0";
-      anchorTop = "1";
-      anchorBottom = "0";
-      anchorLeft = "1";
-      anchorRight = "0";
-      position = "306 216";
-      extent = "411 336";
-      minExtent = "8 8";
-      horizSizing = "center";
-      vertSizing = "center";
-      profile = "GuiWindowProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-
-      new GuiBitmapBorderCtrl() {
-         position = "11 77";
-         extent = "390 216";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiTabBorderProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiTabBookCtrl(ppOptionsTabBook) {
-         tabPosition = "Top";
-         tabMargin = "7";
-         minTabWidth = "32";
-         tabHeight = "20";
-         allowReorder = "0";
-         defaultPage = "-1";
-         selectedPage = "1";
-         frontTabPadding = "0";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "11 58";
-         extent = "394 233";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiTabBookProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiTabPageCtrl(ppOptionsSSAOTab) {
-            fitBook = "0";
-            text = "SSAO";
-            maxLength = "1024";
-            docking = "Client";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "1";
-            anchorLeft = "1";
-            anchorRight = "1";
-            position = "0 20";
-            extent = "394 213";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTabPageProfile";
-            visible = "0";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            tooltip = "Options for the Screen Space Ambient Occlusion postFX";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiBitmapBorderCtrl() {
-               position = "12 30";
-               extent = "365 170";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTabBorderProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "1";
-            };
-            new GuiTabBookCtrl(ppOptionsSSAOOptions) {
-               tabPosition = "Top";
-               tabMargin = "7";
-               minTabWidth = "64";
-               tabHeight = "20";
-               allowReorder = "0";
-               defaultPage = "-1";
-               selectedPage = "2";
-               frontTabPadding = "0";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "12 11";
-               extent = "362 185";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTabBookProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-
-               new GuiTabPageCtrl(ppOptionsSSAOGeneralTab) {
-                  fitBook = "0";
-                  text = "General";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "362 165";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "0";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains general overall settings for the SSAO postFX";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  new GuiTextCtrl(ppOptionsSSAOOverallStrengthLabel) {
-                     text = "Overall Strength";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "31 57";
-                     extent = "77 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the overall strength of the Ambient Occlusion effect.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAOBlurDepthLabel) {
-                     text = "Blur (Softness)";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "38 85";
-                     extent = "73 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the amount of softness in the SSAO, overall.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAOBlurNormalLabel) {
-                     text = "Blur (Normal Maps)";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "19 112";
-                     extent = "92 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the amount of softness in the SSAO, in the normal maps.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiPopUpMenuCtrl(ppOptionsSSAOQuality) {
-                     maxPopupHeight = "200";
-                     sbUsesNAColor = "0";
-                     reverseTextList = "0";
-                     bitmapBounds = "16 16";
-                     text = "Low";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "120 28";
-                     extent = "211 20";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiPopUpMenuProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAOQualityLabel) {
-                     text = "Quality";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "76 29";
-                     extent = "32 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOOverallStrength) {
-                     range = "0 50";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "2";
-                     position = "120 56";
-                     extent = "211 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOBlurDepth) {
-                     range = "0 0.3";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.001";
-                     position = "120 86";
-                     extent = "211 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOBlurNormal) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.95";
-                     position = "119 113";
-                     extent = "212 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-               new GuiTabPageCtrl(ppOptionsSSAONearTab) {
-                  fitBook = "0";
-                  text = "Near";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "362 165";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "0";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains settings for the near range ambient occlusion aspect of the SSAO postFX";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  new GuiSliderCtrl(ppOptionsSSAONearRadius) {
-                     range = "0.001 5";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.1";
-                     position = "122 17";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAONearDepthMin) {
-                     range = "0 5";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.1";
-                     position = "122 62";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAONearStrength) {
-                     range = "0 20";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "6";
-                     position = "122 39";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAONearRadiusLabel) {
-                     text = "Radius";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "80 16";
-                     extent = "34 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the near/small radius SSAO reach.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAONearStrengthLabel) {
-                     text = "Strength";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "73 38";
-                     extent = "41 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the near/small radius SSAO strength.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAONearDepthMinLabel) {
-                     text = "Depth Min";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "66 61";
-                     extent = "48 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the near/small radius SSAO minimum depth value.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAONearDepthMaxLabel) {
-                     text = "Depth Max";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "62 85";
-                     extent = "52 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the near/small radius SSAO maximum depth value.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAONearDepthMax) {
-                     range = "0 50";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "1";
-                     position = "122 86";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAONearToleranceNormal) {
-                     range = "0 2";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0";
-                     position = "122 133";
-                     extent = "103 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAONearTolerancePower) {
-                     range = "0 2";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "1";
-                     position = "246 133";
-                     extent = "97 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAONearToleranceLabel2) {
-                     text = "Tolerance / Power";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "24 132";
-                     extent = "92 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAONearToleranceLabel1) {
-                     text = "Normal Maps : ";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "19 113";
-                     extent = "71 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-               new GuiTabPageCtrl(ppOptionsSSAOFarTab) {
-                  fitBook = "0";
-                  text = "Far";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "362 165";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains settings for the far range ambient occlusion aspect of the SSAO postFX";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  new GuiTextCtrl(ppOptionsSSAOFarRadiusLabel) {
-                     text = "Radius";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "80 16";
-                     extent = "34 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the far/large radius SSAO reach.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOFarRadius) {
-                     range = "0.001 5";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "1";
-                     position = "122 17";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAOFarStrengthLabel) {
-                     text = "Strength";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "73 38";
-                     extent = "41 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the far/large radius SSAO strength.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOFarStrength) {
-                     range = "0 20";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "10";
-                     position = "122 39";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAOFarDepthMinLabel) {
-                     text = "Depth Min";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "66 61";
-                     extent = "48 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the far/large radius SSAO minimum depth.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOFarDepthMin) {
-                     range = "0 5";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.2";
-                     position = "122 62";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAOFarDepthMaxLabel) {
-                     text = "Depth Max";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "62 85";
-                     extent = "52 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Controls the far/large radius SSAO maximum.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOFarDepthMax) {
-                     range = "0 5";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "2";
-                     position = "122 86";
-                     extent = "221 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsSSAOFarToleranceLabel1) {
-                     text = "Normal Maps :";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "6 113";
-                     extent = "72 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl() {
-                     text = "Tolerance / Power";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "24 132";
-                     extent = "90 18";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOFarToleranceNormal) {
-                     range = "0 2";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0";
-                     position = "122 133";
-                     extent = "100 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsSSAOFarTolerancePower) {
-                     range = "0 2";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "2";
-                     position = "239 133";
-                     extent = "104 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-            };
-            new GuiCheckBoxCtrl(ppOptionsEnableSSAO) {
-               useInactiveState = "0";
-               text = "Enable";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "329 7";
-               extent = "53 20";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Enable/Disable the SSAO postFX";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiTabPageCtrl(ppOptionsHDRTab) {
-            fitBook = "0";
-            text = "HDR";
-            maxLength = "1024";
-            docking = "Client";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "1";
-            anchorLeft = "1";
-            anchorRight = "1";
-            position = "0 20";
-            extent = "394 213";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTabPageProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            tooltip = "Options for the High Definition Range Lighting postFX";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiBitmapBorderCtrl() {
-               position = "12 30";
-               extent = "363 172";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTabBorderProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "1";
-            };
-            new GuiTabBookCtrl(ppOptionsHDROptions) {
-               tabPosition = "Top";
-               tabMargin = "7";
-               minTabWidth = "64";
-               tabHeight = "20";
-               allowReorder = "0";
-               defaultPage = "-1";
-               selectedPage = "0";
-               frontTabPadding = "0";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "12 11";
-               extent = "365 195";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTabBookProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-
-               new GuiTabPageCtrl(ppOptionsHDRBrightnessTab) {
-                  fitBook = "0";
-                  text = "Brightness";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "365 175";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains settings related to the brightness of the HDR postFX";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  new GuiSliderCtrl(ppOptionsHDRMinLuminance) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0";
-                     position = "132 77";
-                     extent = "206 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Value : 0";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsHDRKeyValue) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.0459184";
-                     position = "132 50";
-                     extent = "206 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Value : 0.0459184";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRKeyValueLabel) {
-                     text = "Key Value";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "69 50";
-                     extent = "52 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The tone mapping middle grey or exposure value used to adjust the overall \"balance\" of the image.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRMinLuminanceLabel) {
-                     text = "Minimum Luminance";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "25 77";
-                     extent = "96 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The minimum luminance value to allow when tone mapping the scene. This is particularly useful if your scene is very dark or has a black ambient color in places.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRWhiteCutoffLabel) {
-                     text = "White Cutoff";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "56 104";
-                     extent = "65 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The cutoff level for the white levels in the brightness.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsHDRWhiteCutoff) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.52551";
-                     position = "132 104";
-                     extent = "206 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Value : 0.52551";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsHDRBrightnessAdaptRate) {
-                     range = "0.1 10";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "2";
-                     position = "132 132";
-                     extent = "205 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRBrightnessAdaptRateLabel) {
-                     text = "Brightness Adapt Rate";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "12 132";
-                     extent = "109 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The speed at which the view adjusts to the new lighting in the environment.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRKeyValueLabel1) {
-                     text = "Tone Mapping Contrast";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "10 24";
-                     extent = "111 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Tone mapping contrast is the amount of scene to blend, with the tone mapped HDR scene. Lower values are recommended but higher values give a strong contrasted darker shadowed look.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsHDRToneMappingAmount) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.265306";
-                     position = "132 24";
-                     extent = "206 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "value : 0.265306";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-               new GuiTabPageCtrl(ppOptionsHDRBloomTab) {
-                  fitBook = "0";
-                  text = "Bloom";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "365 175";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "0";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains settings related to the blooming aspect of the HDR postFX";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  new GuiSliderCtrl(ppOptionsHDRBloomBlurMultiplier) {
-                     range = "0 5";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.502645";
-                     position = "132 70";
-                     extent = "199 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Value : 0.502645";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsHDRBloomBlurMean) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.510526";
-                     position = "132 97";
-                     extent = "200 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Value : 0.510526";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsHDRBloomBlurStdDev) {
-                     range = "0 3";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "1.4127";
-                     position = "132 123";
-                     extent = "199 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Value : 1.4127";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRBlurMultiplierLabel) {
-                     text = "Blur Multiplier";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "59 70";
-                     extent = "63 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The amount of blur to apply to the bloomed areas in the HDR.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRBlurMeanLabel) {
-                     text = "Blur \"mean\" value";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "38 97";
-                     extent = "84 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRBlurStandardDevianceLabel) {
-                     text = "Blur \"Std Dev\" value";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "23 123";
-                     extent = "99 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsHDRBloomBrightPassThresholdLabel) {
-                     text = "Bright pass threshold";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "19 43";
-                     extent = "103 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The bright pass threshold controls how bright the brightest areas of the scene are in the HDR.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsHDRBloomBlurBrightPassThreshold) {
-                     range = "0 5";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "1.60526";
-                     position = "132 43";
-                     extent = "200 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Value : 1.60526";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiCheckBoxCtrl(ppOptionsHDRBloom) {
-                     useInactiveState = "0";
-                     text = " Enable Bloom";
-                     groupNum = "-1";
-                     buttonType = "ToggleButton";
-                     useMouseEvents = "0";
-                     position = "250 9";
-                     extent = "85 24";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiCheckBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Enables or disables the bloom (glowing effect) of the HDR PostFX.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-               new GuiTabPageCtrl(ppOptionsHDRBloomEffectsTab) {
-                  fitBook = "0";
-                  text = "Effects";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "365 175";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "0";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains settings related to the effects the HDR postFX can offer";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  new GuiCheckBoxCtrl(ppOptionsHDREffectsBlueShift) {
-                     useInactiveState = "0";
-                     text = " Enable Color Shift";
-                     groupNum = "-1";
-                     buttonType = "ToggleButton";
-                     useMouseEvents = "0";
-                     position = "11 4";
-                     extent = "117 24";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiCheckBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Enables a scene tinting/Blue shift based on the color selected below.";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiColorPickerCtrl(ppOptionsHDREffectsBlueShiftColorBlend) {
-                     baseColor = "1 0 0.0235294 1";
-                     pickColor = "0 0 0 1";
-                     selectorGap = "1";
-                     displayMode = "BlendColor";
-                     actionOnMove = "1";
-                     showReticle = "1";
-                     position = "10 29";
-                     extent = "344 110";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiDefaultProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Select a color";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiColorPickerCtrl(ppOptionsHDREffectsBlueShiftColorBaseColor) {
-                     baseColor = "1 0 0.0235294 1";
-                     pickColor = "0 0 0 1";
-                     selectorGap = "1";
-                     displayMode = "HorizColor";
-                     actionOnMove = "1";
-                     showReticle = "1";
-                     position = "10 142";
-                     extent = "343 21";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiDefaultProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "Select a color";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-            };
-            new GuiCheckBoxCtrl(ppOptionsHDRToneMapping) {
-               useInactiveState = "0";
-               text = " Enable Tone Mapping";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "18 8";
-               extent = "120 24";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "0";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Enables or disabled tone mapping on the HDR. The tone mapping balanced the brightness levels during the HDR process. Recommended";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiCheckBoxCtrl(ppOptionsEnableHDR) {
-               useInactiveState = "0";
-               text = "Enable";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "329 7";
-               extent = "53 20";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Enable/Disable the HDR postFX (takes some time to initialise, be patient)";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiCheckBoxCtrl(ppOptionsEnableHDRDebug) {
-               useInactiveState = "0";
-               text = "Debug";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "262 7";
-               extent = "53 20";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiTabPageCtrl(ppOptionsLightRaysTab) {
-            fitBook = "0";
-            text = "Light Rays";
-            maxLength = "1024";
-            docking = "Client";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "1";
-            anchorLeft = "1";
-            anchorRight = "1";
-            position = "0 20";
-            extent = "394 213";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTabPageProfile";
-            visible = "0";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            tooltip = "Options for the Light Rays postFX";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-           new GuiSliderCtrl(ppOptionsLightRaysBrightScalar) {
-               range = "0 5";
-               ticks = "1000";
-               snap = "0";
-               value = "0.75";
-               position = "96 46";
-               extent = "264 17";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };			
-            new GuiTextCtrl(ppOptionsLightRaysBrightnessScalarLabel) {
-               text = "Brightness";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "26 48";
-               extent = "87 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Controls how bright the rays and the object casting them are in the scene.";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-		    new GuiSliderCtrl(ppOptionsLightRaysSampleScalar) {
-               range = "20 512";
-               ticks = "512";
-               snap = "0";
-               value = "40";
-               position = "96 75";
-               extent = "264 17";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-			new GuiTextCtrl(ppOptionsLightRaysSampleScalarLabel) {
-               text = "Samples";
-               maxLength = "512";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "26 76";
-               extent = "87 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Controls the number of samples for the shader.";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-			new GuiSliderCtrl(ppOptionsLightRaysDensityScalar) {
-               range = "0.01 1";
-               ticks = "1000";
-               snap = "0";
-               value = "0.94";
-               position = "96 105";
-               extent = "264 17";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-			new GuiTextCtrl(ppOptionsLightRaysDensityScalarLabel) {
-               text = "Density";
-               maxLength = "1000";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "26 106";
-               extent = "87 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Controls the density of the rays.";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-			new GuiSliderCtrl(ppOptionsLightRaysWeightScalar) {
-               range = "0.1 10";
-               ticks = "1000";
-               snap = "0";
-               value = "5.65";
-               position = "96 135";
-               extent = "264 17";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-			new GuiTextCtrl(ppOptionsLightRaysWeightScalarLabel) {
-               text = "Weight";
-               maxLength = "1000";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "26 136";
-               extent = "87 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Controls the weight of the rays.";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-			
-			new GuiSliderCtrl(ppOptionsLightRaysDecayScalar) {
-               range = "0.01 1";
-               ticks = "1000";
-               snap = "0";
-               value = "1.0";
-               position = "96 165";
-               extent = "264 17";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-			
-			new GuiTextCtrl(ppOptionsLightRaysDecayScalarLabel) {
-               text = "Decay";
-               maxLength = "1000";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "26 166";
-               extent = "87 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Controls the decay of the rays.";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiCheckBoxCtrl(ppOptionsEnableLightRays) {
-               useInactiveState = "0";
-               text = "Enable";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "329 7";
-               extent = "53 20";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Enable/Disable the light rays postFX";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiTabPageCtrl(ppOptionsDOFTab) {
-            fitBook = "0";
-            text = "DOF";
-            maxLength = "1024";
-            docking = "Client";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "1";
-            anchorLeft = "1";
-            anchorRight = "1";
-            position = "0 20";
-            extent = "394 213";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTabPageProfile";
-            visible = "0";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            tooltip = "Options for the Depth Of Field postFX";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiBitmapBorderCtrl() {
-               position = "14 28";
-               extent = "362 170";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTabBorderProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "1";
-            };
-            new GuiTabBookCtrl() {
-               tabPosition = "Top";
-               tabMargin = "7";
-               minTabWidth = "64";
-               tabHeight = "20";
-               allowReorder = "0";
-               defaultPage = "-1";
-               selectedPage = "1";
-               frontTabPadding = "0";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "14 9";
-               extent = "360 189";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTabBookProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-
-               new GuiTabPageCtrl(ppOptionsDOFGeneralTab) {
-                  fitBook = "0";
-                  text = "General";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "360 169";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "0";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains general settings related to the DOF system";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  //new GuiCheckBoxCtrl(ppOptionsDOFEnableDOF) {
-                     //useInactiveState = "0";
-                     //text = "Enable DOF";
-                     //groupNum = "-1";
-                     //buttonType = "ToggleButton";
-                     //useMouseEvents = "0";
-                     //position = "31 43";
-                     //extent = "140 30";
-                     //minExtent = "8 2";
-                     //horizSizing = "right";
-                     //vertSizing = "bottom";
-                     //profile = "GuiCheckBoxProfile";
-                     //visible = "1";
-                     //active = "1";
-                     //tooltipProfile = "GuiToolTipProfile";
-                     //hovertime = "1000";
-                     //isContainer = "0";
-                     //canSave = "1";
-                     //canSaveDynamicFields = "0";
-                  //};
-                  new GuiCheckBoxCtrl(ppOptionsDOFEnableAutoFocus) {
-                     useInactiveState = "0";
-                     text = "Enable Auto Focus";
-                     groupNum = "-1";
-                     buttonType = "ToggleButton";
-                     useMouseEvents = "0";
-                     position = "31 8";
-                     extent = "140 30";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiCheckBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-               new GuiTabPageCtrl(ppOptionsDOFAutoFocusTab) {
-                  fitBook = "0";
-                  text = "Auto Focus";
-                  maxLength = "1024";
-                  docking = "Client";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "1";
-                  anchorLeft = "1";
-                  anchorRight = "1";
-                  position = "0 20";
-                  extent = "360 169";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "GuiTabPageProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "GuiToolTipProfile";
-                  tooltip = "Contains settings related to the fine control of the auto focus system";
-                  hovertime = "1000";
-                  isContainer = "1";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-
-                  new GuiTextCtrl(ppOptionsDOFNearBlurMaxLabel) {
-                     text = "Near Blur Max";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "36 8";
-                     extent = "67 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The max allowed value of near blur";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsDOFFarBlurMinSlider) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0";
-                     position = "120 8";
-                     extent = "224 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsDOFFarBlurMaxLabel) {
-                     text = "Far Blur Max";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "43 34";
-                     extent = "60 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The max allowed value of far blur";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsDOFFarBlurMaxSlider) {
-                     range = "0 1";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0";
-                     position = "120 34";
-                     extent = "224 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsDOFFocusRangeMinLabel) {
-                     text = "Focus Range (Min)";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "13 61";
-                     extent = "90 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The distance range around the focal distance that remains in focus (in meters, minimum distance in focus) focal distance it is\r\ndependant on the visible distance set in your level";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsDOFFocusRangeMinSlider) {
-                     range = "0.01 1e+003";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.01";
-                     position = "120 61";
-                     extent = "224 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsDOFFocusRangeMaxLabel) {
-                     text = "Focus Range (Max)";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "9 88";
-                     extent = "95 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "The distance range around the focal distance that remains in focus (in meters, maximum distance in focus) focal distance it is\r\ndependant on the visible distance set in your level";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsDOFFocusRangeMaxSlider) {
-                     range = "0.01 1e+003";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0.01";
-                     position = "119 87";
-                     extent = "224 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsDOFBurCurveNearLabel) {
-                     text = "Blur Curve Near";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "27 114";
-                     extent = "77 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "A small number causes bluriness to increase gradually\r\nat distances closer than the focal distance. A large number causes bluriness to \r\nincrease quickly";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsDOFBlurCurveNearSlider) {
-                     range = "0 50";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0";
-                     position = "119 114";
-                     extent = "225 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiTextCtrl(ppOptionsDOFBlurCurveFarLabel) {
-                     text = "Blur Curve Far";
-                     maxLength = "1024";
-                     margin = "0 0 0 0";
-                     padding = "0 0 0 0";
-                     anchorTop = "1";
-                     anchorBottom = "0";
-                     anchorLeft = "1";
-                     anchorRight = "0";
-                     position = "33 139";
-                     extent = "70 16";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiTextProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     tooltip = "A small number causes bluriness to increase gradually\r\nat distances closer than the focal distance. A large number causes bluriness to \r\nincrease quickly";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-                  new GuiSliderCtrl(ppOptionsDOFBlurCurveFarSlider) {
-                     range = "0 50";
-                     ticks = "1000";
-                     snap = "0";
-                     value = "0";
-                     position = "119 141";
-                     extent = "224 17";
-                     minExtent = "8 2";
-                     horizSizing = "right";
-                     vertSizing = "bottom";
-                     profile = "GuiSliderBoxProfile";
-                     visible = "1";
-                     active = "1";
-                     tooltipProfile = "GuiToolTipProfile";
-                     hovertime = "1000";
-                     isContainer = "0";
-                     canSave = "1";
-                     canSaveDynamicFields = "0";
-                  };
-               };
-            };
-            new GuiCheckBoxCtrl(ppOptionsEnableDOF) {
-               useInactiveState = "0";
-               text = "Enable";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "329 7";
-               extent = "53 20";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Enable/Disable the Depth of field postFX";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiTabPageCtrl(ppOptionsVignetteTab) {
-            fitBook = "0";
-            text = "Vignette";
-            maxLength = "1024";
-            docking = "Client";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "1";
-            anchorLeft = "1";
-            anchorRight = "1";
-            position = "0 40";
-            extent = "394 193";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTabPageProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            tooltip = "Options for the Vignette postFX";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-            Enabled = "1";
-
-            new GuiCheckBoxCtrl(ppOptionsEnableVignette) {
-               text = "Enable";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "329 7";
-               extent = "53 20";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Enable/Disable the vignette postFX";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiSliderCtrl(ppOptionsVignetteVMax) {
-               range = "0.001 5";
-               ticks = "1000";
-               snap = "0";
-               value = "0.6";
-               position = "96 46";
-               extent = "221 17";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderBoxProfile";
-               visible = "1";
-               active = "1";
-               variable = "$VignettePostEffect::VMax";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextCtrl(ppOptionsVignetteVMaxLabel) {
-               text = "Radius";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "26 48";
-               extent = "41 18";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               tooltip = "Controls the maximum exposure of vignetting.";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiTabPageCtrl() {
-            fitBook = "0";
-            text = "Color Correction";
-            maxLength = "1024";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "8 27";
-            extent = "376 200";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTabPageProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            internalName = "ColorCorrectionTab";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiTextCtrl() {
-               text = "Color Correction Ramp";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "6 7";
-               extent = "118 13";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextEditCtrl() {
-               historySize = "0";
-               tabComplete = "0";
-               sinkAllKeyEvents = "0";
-               password = "0";
-               passwordMask = "*";
-               text = "core/images/null_color_ramp.png";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "6 29";
-               extent = "365 18";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextEditProfile";
-               visible = "1";
-               active = "1";
-               altCommand = "ppColorCorrection_selectFileHandler( $thisControl.getText() );";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               internalName = "ColorCorrectionFileName";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiButtonCtrl() {
-               text = "Select...";
-               groupNum = "-1";
-               buttonType = "PushButton";
-               useMouseEvents = "0";
-               position = "252 54";
-               extent = "56 22";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiButtonProfile";
-               visible = "1";
-               active = "1";
-               command = "ppColorCorrection_selectFile();";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "ColorCorrectionButton";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiButtonCtrl() {
-               text = "Reset";
-               groupNum = "-1";
-               buttonType = "PushButton";
-               useMouseEvents = "0";
-               position = "315 54";
-               extent = "56 22";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiButtonProfile";
-               visible = "1";
-               active = "1";
-               command = "ppColorCorrection_selectFileHandler( \"\" );";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "ColorCorrectionReset";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-      };
-      new GuiButtonCtrl(ppOptionsApply) {
-         text = "Apply";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "309 302";
-         extent = "93 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "PostFXManager.settingsApplyAll(); Canvas.popDialog(PostFXManager);";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Apply the settings and close this dialog";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl(ppOptionsSavePreset) {
-         text = "Save Preset...";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "111 302";
-         extent = "93 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "PostFXManager.savePresetFile();";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Save the preset to a file to disk for later use (use postfx::applyPreset)";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl(ppOptionsLoadPreset) {
-         text = "Load Preset...";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "12 302";
-         extent = "93 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "PostFXManager.loadPresetFile();";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Load a post FX preset file from disk";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiCheckBoxCtrl(ppOptionsEnable) {
-         useInactiveState = "0";
-         text = "Enable PostFX System";
-         groupNum = "-1";
-         buttonType = "ToggleButton";
-         useMouseEvents = "0";
-         position = "13 24";
-         extent = "127 30";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiCheckBoxProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Enable or Disable the postFX system";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiPopUpMenuCtrl(ppOptionsQuality) {
-         maxPopupHeight = "200";
-         sbUsesNAColor = "0";
-         reverseTextList = "0";
-         bitmapBounds = "16 16";
-         maxLength = "1024";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "278 30";
-         extent = "122 21";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiPopUpMenuProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Used to adjust the quality/performance settings of the PostFX system. Some PostFX may not adhere to the settings in this dialog.";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiTextCtrl(ppOptionsQualityLabel) {
-         text = "Quality";
-         maxLength = "1024";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "238 32";
-         extent = "39 12";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiTextProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Used to adjust the quality/performance settings of the PostFX system. Some PostFX may not adhere to the settings in this dialog.";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl(ppOptionsOk1) {
-         text = "Revert";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "210 302";
-         extent = "93 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "postProcessOptionsDlg.applySettings(); Canvas.popDialog(postProcessOptionsDlg);";
-         tooltipProfile = "GuiToolTipProfile";
-         tooltip = "Revert any changes made since opening the dialog";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-   };
-};
-//--- OBJECT WRITE END ---

+ 0 - 446
Templates/BaseGame/game/core/postFX/postFxManager.gui.cs

@@ -1,446 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-$PostFXManager::vebose = true;
-function postVerbose(%string)
-{
-   if($PostFXManager::vebose == true)
-   {
-      echo(%string);
-   }
-}
-
-function PostFXManager::onDialogPush( %this )
-{
-   //Apply the settings to the controls
-   postVerbose("% - PostFX Manager - Loading GUI.");
-   
-   %this.settingsRefreshAll();
-}
-
-// :: Controls for the overall postFX manager dialog
-function ppOptionsEnable::onAction(%this)
-{
-   //Disable / Enable all PostFX
-
-   if(ppOptionsEnable.getValue())
-   {
-      %toEnable = true;
-   }   
-   else
-   {
-      %toEnable = false;
-   }
-   
-   PostFXManager.settingsSetEnabled(%toEnable);
-   
-}
-
-function PostFXManager::getEnableResultFromControl(%this, %control)
-{
-   %toEnable = -1;
-   %bTest = %control.getValue();
-   if(%bTest == 1)
-   {
-      %toEnable = true;
-   }
-   else
-   {
-      %toEnable = false;
-   }
-   
-   return %toEnable;
-}
-
-function ppOptionsEnableSSAO::onAction(%this)
-{
-   %toEnable = PostFXManager.getEnableResultFromControl(%this);
-   PostFXManager.settingsEffectSetEnabled("SSAO", %toEnable);
-}
-
-function ppOptionsEnableHDR::onAction(%this)
-{
-   %toEnable = PostFXManager.getEnableResultFromControl(%this);
-   PostFXManager.settingsEffectSetEnabled("HDR", %toEnable);
-}
-
-function ppOptionsEnableLightRays::onAction(%this)
-{
-   %toEnable = PostFXManager.getEnableResultFromControl(%this);
-   PostFXManager.settingsEffectSetEnabled("LightRays", %toEnable);
-}
-
-function ppOptionsEnableDOF::onAction(%this)
-{ 
-   %toEnable = PostFXManager.getEnableResultFromControl(%this);
-   PostFXManager.settingsEffectSetEnabled("DOF", %toEnable);
-}
-
-function ppOptionsEnableVignette::onAction(%this)
-{ 
-   %toEnable = PostFXManager.getEnableResultFromControl(%this);
-   PostFXManager.settingsEffectSetEnabled("Vignette", %toEnable);
-}
-
-function ppOptionsSavePreset::onClick(%this)
-{
-   //Stores the current settings into a preset file for loading and use later on 
-}
-
-function ppOptionsLoadPreset::onClick(%this)
-{
-   //Loads and applies the settings from a postfxpreset file
-}
-
-
-//Other controls, Quality dropdown
-function ppOptionsSSAOQuality::onSelect( %this, %id, %text )
-{
-   if(%id > -1 && %id < 3)
-   {
-      $SSAOPostFx::quality = %id;
-   }
-}
-
-//SSAO Slider controls
-//General Tab
-function ppOptionsSSAOOverallStrength::onMouseDragged(%this)
-{
-   $SSAOPostFx::overallStrength = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsSSAOBlurDepth::onMouseDragged(%this)
-{
-   $SSAOPostFx::blurDepthTol = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsSSAOBlurNormal::onMouseDragged(%this)
-{
-   $SSAOPostFx::blurNormalTol = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-//Near Tab
-function ppOptionsSSAONearRadius::onMouseDragged(%this)
-{
-   $SSAOPostFx::sRadius = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsSSAONearStrength::onMouseDragged(%this)
-{
-   $SSAOPostFx::sStrength = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsSSAONearDepthMin::onMouseDragged(%this)
-{
-   $SSAOPostFx::sDepthMin = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsSSAONearDepthMax::onMouseDragged(%this)
-{
-   $SSAOPostFx::sDepthMax = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;   
-}
-
-function ppOptionsSSAONearToleranceNormal::onMouseDragged(%this)
-{
-   $SSAOPostFx::sNormalTol = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsSSAONearTolerancePower::onMouseDragged(%this)
-{
-   $SSAOPostFx::sNormalPow = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-//Far Tab
-function ppOptionsSSAOFarRadius::onMouseDragged(%this)
-{
-   $SSAOPostFx::lRadius = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-function ppOptionsSSAOFarStrength::onMouseDragged(%this)
-{
-   $SSAOPostFx::lStrength = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-function ppOptionsSSAOFarDepthMin::onMouseDragged(%this)
-{
-   $SSAOPostFx::lDepthMin = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-function ppOptionsSSAOFarDepthMax::onMouseDragged(%this)
-{
-   $SSAOPostFx::lDepthMax = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-function ppOptionsSSAOFarToleranceNormal::onMouseDragged(%this)
-{
-   $SSAOPostFx::lNormalTol = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-function ppOptionsSSAOFarTolerancePower::onMouseDragged(%this)
-{
-   $SSAOPostFx::lNormalPow = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-//HDR Slider Controls
-//Brighness tab
-
-function ppOptionsHDRToneMappingAmount::onMouseDragged(%this)
-{
-
-   $HDRPostFX::enableToneMapping = %this.value;
-   %this.ToolTip = "value : " @ %this.value;
-}
-
-function ppOptionsHDRKeyValue::onMouseDragged(%this)
-{
-   $HDRPostFX::keyValue = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsHDRMinLuminance::onMouseDragged(%this)
-{
-   $HDRPostFX::minLuminace = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsHDRWhiteCutoff::onMouseDragged(%this)
-{
-   $HDRPostFX::whiteCutoff = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsHDRBrightnessAdaptRate::onMouseDragged(%this)
-{
-   $HDRPostFX::adaptRate = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-//Blur tab
-function ppOptionsHDRBloomBlurBrightPassThreshold::onMouseDragged(%this)
-{
-   $HDRPostFX::brightPassThreshold = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsHDRBloomBlurMultiplier::onMouseDragged(%this)
-{
-   $HDRPostFX::gaussMultiplier = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsHDRBloomBlurMean::onMouseDragged(%this)
-{
-   $HDRPostFX::gaussMean = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsHDRBloomBlurStdDev::onMouseDragged(%this)
-{
-   $HDRPostFX::gaussStdDev = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-function ppOptionsHDRBloom::onAction(%this)
-{
-   $HDRPostFX::enableBloom =  %this.getValue();
-}
-
-function ppOptionsHDRToneMapping::onAction(%this)
-{
-   //$HDRPostFX::enableToneMapping =  %this.getValue();
-}
-
-function ppOptionsHDREffectsBlueShift::onAction(%this)
-{
-   $HDRPostFX::enableBlueShift = %this.getValue();
-}
-
-
-//Controls for color range in blue Shift dialog
-
-function ppOptionsHDREffectsBlueShiftColorBlend::onAction(%this)
-{
-   $HDRPostFX::blueShiftColor = %this.PickColor;
-   %this.ToolTip = "Color Values : " @ %this.PickColor;
-}
-
-function ppOptionsHDREffectsBlueShiftColorBaseColor::onAction(%this)
-{
-	//This one feeds the one above
-   	ppOptionsHDREffectsBlueShiftColorBlend.baseColor = %this.PickColor;
-	%this.ToolTip = "Color Values : " @ %this.PickColor;
-}
-
-
-//Light rays Brightness Slider Controls
-function ppOptionsLightRaysBrightScalar::onMouseDragged(%this)
-{
-   $LightRayPostFX::brightScalar = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-//Light rays Number of Samples Slider Control
-function ppOptionsLightRaysSampleScalar::onMouseDragged(%this)
-{
-   $LightRayPostFX::numSamples = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-//Light rays Density Slider Control
-function ppOptionsLightRaysDensityScalar::onMouseDragged(%this)
-{
-   $LightRayPostFX::density = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-//Light rays Weight Slider Control
-function ppOptionsLightRaysWeightScalar::onMouseDragged(%this)
-{
-   $LightRayPostFX::weight = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-//Light rays Decay Slider Control
-function ppOptionsLightRaysDecayScalar::onMouseDragged(%this)
-{
-   $LightRayPostFX::decay = %this.value;
-   %this.ToolTip = "Value : " @ %this.value;
-}
-
-
-function ppOptionsUpdateDOFSettings()
-{
-   DOFPostEffect.setFocusParams( $DOFPostFx::BlurMin, $DOFPostFx::BlurMax, $DOFPostFx::FocusRangeMin, $DOFPostFx::FocusRangeMax, -($DOFPostFx::BlurCurveNear), $DOFPostFx::BlurCurveFar );
-   
-   DOFPostEffect.setAutoFocus( $DOFPostFx::EnableAutoFocus );
-   DOFPostEffect.setFocalDist(0);
-   
-   if($PostFXManager::PostFX::EnableDOF)
-   {
-      DOFPostEffect.enable();
-   }
-   else
-   {
-      DOFPostEffect.disable();
-   }
-}
-
-//DOF General Tab
-//DOF Toggles
-function ppOptionsDOFEnableDOF::onAction(%this)
-{
-   $PostFXManager::PostFX::EnableDOF = %this.getValue();
-   ppOptionsUpdateDOFSettings();
-}
-
-
-function ppOptionsDOFEnableAutoFocus::onAction(%this)
-{
-   $DOFPostFx::EnableAutoFocus = %this.getValue();
-   DOFPostEffect.setAutoFocus( %this.getValue() );
-}
-
-//DOF AutoFocus Slider controls
-function ppOptionsDOFFarBlurMinSlider::onMouseDragged(%this)
-{
-   $DOFPostFx::BlurMin = %this.value;
-   ppOptionsUpdateDOFSettings();
-}
-
-function ppOptionsDOFFarBlurMaxSlider::onMouseDragged(%this)
-{
-   $DOFPostFx::BlurMax = %this.value;
-   ppOptionsUpdateDOFSettings();
-}
-
-function ppOptionsDOFFocusRangeMinSlider::onMouseDragged(%this)
-{
-   $DOFPostFx::FocusRangeMin = %this.value;
-   ppOptionsUpdateDOFSettings();   
-}
-
-function ppOptionsDOFFocusRangeMaxSlider::onMouseDragged(%this)
-{
-   $DOFPostFx::FocusRangeMax = %this.value;
-   ppOptionsUpdateDOFSettings();   
-}
-
-function ppOptionsDOFBlurCurveNearSlider::onMouseDragged(%this)
-{
-   $DOFPostFx::BlurCurveNear = %this.value;
-   ppOptionsUpdateDOFSettings();
-}
-
-function ppOptionsDOFBlurCurveFarSlider::onMouseDragged(%this)
-{
-   $DOFPostFx::BlurCurveFar = %this.value;
-   ppOptionsUpdateDOFSettings();   
-}
-
-function ppOptionsEnableHDRDebug::onAction(%this)
-{
-   if ( %this.getValue() )
-      LuminanceVisPostFX.enable();
-   else
-      LuminanceVisPostFX.disable();   
-}
-
-function ppOptionsUpdateVignetteSettings()
-{  
-   if($PostFXManager::PostFX::EnableVignette)
-   {
-      VignettePostEffect.enable();
-   }
-   else
-   {
-      VignettePostEffect.disable();
-   }
-}
-
-function ppOptionsVignetteEnableVignette::onAction(%this)
-{
-   $PostFXManager::PostFX::EnableVignette = %this.getValue();
-   ppOptionsUpdateVignetteSettings();
-}
-
-function ppColorCorrection_selectFile()
-{
-   %filter = "Image Files (*.png, *.jpg, *.dds, *.bmp, *.gif, *.jng. *.tga)|*.png;*.jpg;*.dds;*.bmp;*.gif;*.jng;*.tga|All Files (*.*)|*.*|";   
-   getLoadFilename( %filter, "ppColorCorrection_selectFileHandler");
-}
-
-function ppColorCorrection_selectFileHandler( %filename )
-{
-   if ( %filename $= "" || !isFile( %filename ) )
-      %filename = "core/images/null_color_ramp.png";
-   else
-      %filename = makeRelativePath( %filename, getMainDotCsDir() );
-            
-   $HDRPostFX::colorCorrectionRamp = %filename;
-   PostFXManager-->ColorCorrectionFileName.Text = %filename; 
-}

+ 0 - 439
Templates/BaseGame/game/core/postFX/postFxManager.gui.settings.cs

@@ -1,439 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-$PostFXManager::defaultPreset  = "core/postFX/default.postfxpreset.cs";
-
-function PostFXManager::settingsSetEnabled(%this, %bEnablePostFX)
-{
-   $PostFXManager::PostFX::Enabled = %bEnablePostFX;
-   
-   //if to enable the postFX, apply the ones that are enabled
-   if ( %bEnablePostFX )
-   {
-      //SSAO, HDR, LightRays, DOF
-      
-      if ( $PostFXManager::PostFX::EnableSSAO )      
-         SSAOPostFx.enable();      
-      else
-         SSAOPostFx.disable();
-      
-      if ( $PostFXManager::PostFX::EnableHDR )
-         HDRPostFX.enable();
-      else
-         HDRPostFX.disable();
-
-      if ( $PostFXManager::PostFX::EnableLightRays )
-         LightRayPostFX.enable();
-      else
-         LightRayPostFX.disable();
-      
-      if ( $PostFXManager::PostFX::EnableDOF )
-         DOFPostEffect.enable();
-      else
-         DOFPostEffect.disable();
-		 
-      if ( $PostFXManager::PostFX::EnableVignette )
-         VignettePostEffect.enable();
-      else
-         VignettePostEffect.disable();
-     
-      postVerbose("% - PostFX Manager - PostFX enabled");      
-   }
-   else
-   {
-      //Disable all postFX
-      
-      SSAOPostFx.disable();
-      HDRPostFX.disable();
-      LightRayPostFX.disable();
-      DOFPostEffect.disable();
-	  VignettePostEffect.disable();
-      
-      postVerbose("% - PostFX Manager - PostFX disabled");
-   }
-
-   VolFogGlowPostFx.disable();
-}
-
-function PostFXManager::settingsEffectSetEnabled(%this, %sName, %bEnable)
-{
-   %postEffect = 0;
-   
-   //Determine the postFX to enable, and apply the boolean
-   if(%sName $= "SSAO")
-   {
-      %postEffect = SSAOPostFx;
-      $PostFXManager::PostFX::EnableSSAO = %bEnable;
-      //$pref::PostFX::SSAO::Enabled = %bEnable;
-   }
-   else if(%sName $= "HDR")
-   {
-      %postEffect = HDRPostFX;
-      $PostFXManager::PostFX::EnableHDR = %bEnable;
-      //$pref::PostFX::HDR::Enabled = %bEnable;
-   }
-   else if(%sName $= "LightRays")
-   {
-      %postEffect = LightRayPostFX;
-      $PostFXManager::PostFX::EnableLightRays = %bEnable;
-      //$pref::PostFX::LightRays::Enabled = %bEnable;      
-   }
-   else if(%sName $= "DOF")
-   {
-      %postEffect = DOFPostEffect;
-      $PostFXManager::PostFX::EnableDOF = %bEnable;
-      //$pref::PostFX::DOF::Enabled = %bEnable;
-   }
-   else if(%sName $= "Vignette")
-   {
-      %postEffect = VignettePostEffect;
-      $PostFXManager::PostFX::EnableVignette = %bEnable;
-      //$pref::PostFX::Vignette::Enabled = %bEnable;
-   }
-   
-   // Apply the change
-   if ( %bEnable == true )
-   {
-      %postEffect.enable();
-      postVerbose("% - PostFX Manager - " @ %sName @ " enabled");
-   }
-   else
-   {
-      %postEffect.disable();
-      postVerbose("% - PostFX Manager - " @ %sName @ " disabled");
-   }
-}
-
-function PostFXManager::settingsRefreshSSAO(%this)
-{
-   //Apply the enabled flag 
-   ppOptionsEnableSSAO.setValue($PostFXManager::PostFX::EnableSSAO);   
-   
-   //Add the items we need to display
-   ppOptionsSSAOQuality.clear();
-   ppOptionsSSAOQuality.add("Low", 0);
-   ppOptionsSSAOQuality.add("Medium", 1);
-   ppOptionsSSAOQuality.add("High", 2);
-   
-   //Set the selected, after adding the items!
-   ppOptionsSSAOQuality.setSelected($SSAOPostFx::quality);
-   
-   //SSAO - Set the values of the sliders, General Tab
-   ppOptionsSSAOOverallStrength.setValue($SSAOPostFx::overallStrength);
-   ppOptionsSSAOBlurDepth.setValue($SSAOPostFx::blurDepthTol);
-   ppOptionsSSAOBlurNormal.setValue($SSAOPostFx::blurNormalTol);
-      
-   //SSAO - Set the values for the near tab
-   ppOptionsSSAONearDepthMax.setValue($SSAOPostFx::sDepthMax);
-   ppOptionsSSAONearDepthMin.setValue($SSAOPostFx::sDepthMin);
-   ppOptionsSSAONearRadius.setValue($SSAOPostFx::sRadius);
-   ppOptionsSSAONearStrength.setValue($SSAOPostFx::sStrength);
-   ppOptionsSSAONearToleranceNormal.setValue($SSAOPostFx::sNormalTol);
-   ppOptionsSSAONearTolerancePower.setValue($SSAOPostFx::sNormalPow);
-   
-   //SSAO - Set the values for the far tab
-   ppOptionsSSAOFarDepthMax.setValue($SSAOPostFx::lDepthMax);
-   ppOptionsSSAOFarDepthMin.setValue($SSAOPostFx::lDepthMin);
-   ppOptionsSSAOFarRadius.setValue($SSAOPostFx::lRadius);
-   ppOptionsSSAOFarStrength.setValue($SSAOPostFx::lStrength);
-   ppOptionsSSAOFarToleranceNormal.setValue($SSAOPostFx::lNormalTol);
-   ppOptionsSSAOFarTolerancePower.setValue($SSAOPostFx::lNormalPow);
-}
-
-function PostFXManager::settingsRefreshHDR(%this)
-{
-  //Apply the enabled flag 
-   ppOptionsEnableHDR.setValue($PostFXManager::PostFX::EnableHDR);   
-    
-   ppOptionsHDRBloom.setValue($HDRPostFX::enableBloom);
-   ppOptionsHDRBloomBlurBrightPassThreshold.setValue($HDRPostFX::brightPassThreshold);
-   ppOptionsHDRBloomBlurMean.setValue($HDRPostFX::gaussMean);
-   ppOptionsHDRBloomBlurMultiplier.setValue($HDRPostFX::gaussMultiplier);
-   ppOptionsHDRBloomBlurStdDev.setValue($HDRPostFX::gaussStdDev);
-   ppOptionsHDRBrightnessAdaptRate.setValue($HDRPostFX::adaptRate);
-   ppOptionsHDREffectsBlueShift.setValue($HDRPostFX::enableBlueShift);
-   ppOptionsHDREffectsBlueShiftColor.BaseColor = $HDRPostFX::blueShiftColor;
-   ppOptionsHDREffectsBlueShiftColor.PickColor = $HDRPostFX::blueShiftColor;
-   ppOptionsHDRKeyValue.setValue($HDRPostFX::keyValue);
-   ppOptionsHDRMinLuminance.setValue($HDRPostFX::minLuminace);
-   ppOptionsHDRToneMapping.setValue($HDRPostFX::enableToneMapping);
-   ppOptionsHDRToneMappingAmount.setValue($HDRPostFX::enableToneMapping);
-   ppOptionsHDRWhiteCutoff.setValue($HDRPostFX::whiteCutoff);
-   
-   %this-->ColorCorrectionFileName.Text = $HDRPostFX::colorCorrectionRamp;    
-}
-
-function PostFXManager::settingsRefreshLightrays(%this)
-{
-  //Apply the enabled flag 
-   ppOptionsEnableLightRays.setValue($PostFXManager::PostFX::EnableLightRays);   
-    
-   ppOptionsLightRaysBrightScalar.setValue($LightRayPostFX::brightScalar);
-   
-   ppOptionsLightRaysSampleScalar.setValue($LightRayPostFX::numSamples);
-   ppOptionsLightRaysDensityScalar.setValue($LightRayPostFX::density);
-   ppOptionsLightRaysWeightScalar.setValue($LightRayPostFX::weight);
-   ppOptionsLightRaysDecayScalar.setValue($LightRayPostFX::decay);
-}
-
-function PostFXManager::settingsRefreshDOF(%this)
-{
-  //Apply the enabled flag 
-   ppOptionsEnableDOF.setValue($PostFXManager::PostFX::EnableDOF);   
-
-
-   //ppOptionsDOFEnableDOF.setValue($PostFXManager::PostFX::EnableDOF);
-   ppOptionsDOFEnableAutoFocus.setValue($DOFPostFx::EnableAutoFocus);
-   
-   ppOptionsDOFFarBlurMinSlider.setValue($DOFPostFx::BlurMin);
-   ppOptionsDOFFarBlurMaxSlider.setValue($DOFPostFx::BlurMax);
-   
-   ppOptionsDOFFocusRangeMinSlider.setValue($DOFPostFx::FocusRangeMin);
-   ppOptionsDOFFocusRangeMaxSlider.setValue($DOFPostFx::FocusRangeMax);
-   
-   ppOptionsDOFBlurCurveNearSlider.setValue($DOFPostFx::BlurCurveNear);
-   ppOptionsDOFBlurCurveFarSlider.setValue($DOFPostFx::BlurCurveFar);
-
-}
-
-function PostFXManager::settingsRefreshVignette(%this)
-{
-  //Apply the enabled flag 
-   ppOptionsEnableVignette.setValue($PostFXManager::PostFX::EnableVignette);   
-
-}
-
-function PostFXManager::settingsRefreshAll(%this)
-{    
-   $PostFXManager::PostFX::Enabled           = $pref::enablePostEffects;
-   $PostFXManager::PostFX::EnableSSAO        = SSAOPostFx.isEnabled();
-   $PostFXManager::PostFX::EnableHDR         = HDRPostFX.isEnabled();
-   $PostFXManager::PostFX::EnableLightRays   = LightRayPostFX.isEnabled();
-   $PostFXManager::PostFX::EnableDOF         = DOFPostEffect.isEnabled();
-   $PostFXManager::PostFX::EnableVignette    = VignettePostEffect.isEnabled();
-   
-   //For all the postFX here, apply the active settings in the system
-   //to the gui controls.
-   
-   %this.settingsRefreshSSAO();
-   %this.settingsRefreshHDR();
-   %this.settingsRefreshLightrays();
-   %this.settingsRefreshDOF();
-   %this.settingsRefreshVignette();
-   
-   ppOptionsEnable.setValue($PostFXManager::PostFX::Enabled);
-
-   postVerbose("% - PostFX Manager - GUI values updated.");
-}
-
-function PostFXManager::settingsApplyFromPreset(%this)
-{
-   postVerbose("% - PostFX Manager - Applying from preset");
-
-   //SSAO Settings
-   $SSAOPostFx::blurDepthTol           = $PostFXManager::Settings::SSAO::blurDepthTol;
-   $SSAOPostFx::blurNormalTol          = $PostFXManager::Settings::SSAO::blurNormalTol;
-   $SSAOPostFx::lDepthMax              = $PostFXManager::Settings::SSAO::lDepthMax;
-   $SSAOPostFx::lDepthMin              = $PostFXManager::Settings::SSAO::lDepthMin;
-   $SSAOPostFx::lDepthPow              = $PostFXManager::Settings::SSAO::lDepthPow;
-   $SSAOPostFx::lNormalPow             = $PostFXManager::Settings::SSAO::lNormalPow;
-   $SSAOPostFx::lNormalTol             = $PostFXManager::Settings::SSAO::lNormalTol;
-   $SSAOPostFx::lRadius                = $PostFXManager::Settings::SSAO::lRadius;
-   $SSAOPostFx::lStrength              = $PostFXManager::Settings::SSAO::lStrength;
-   $SSAOPostFx::overallStrength        = $PostFXManager::Settings::SSAO::overallStrength;
-   $SSAOPostFx::quality                = $PostFXManager::Settings::SSAO::quality;
-   $SSAOPostFx::sDepthMax              = $PostFXManager::Settings::SSAO::sDepthMax;
-   $SSAOPostFx::sDepthMin              = $PostFXManager::Settings::SSAO::sDepthMin;
-   $SSAOPostFx::sDepthPow              = $PostFXManager::Settings::SSAO::sDepthPow;
-   $SSAOPostFx::sNormalPow             = $PostFXManager::Settings::SSAO::sNormalPow;
-   $SSAOPostFx::sNormalTol             = $PostFXManager::Settings::SSAO::sNormalTol;
-   $SSAOPostFx::sRadius                = $PostFXManager::Settings::SSAO::sRadius;
-   $SSAOPostFx::sStrength              = $PostFXManager::Settings::SSAO::sStrength;
-   
-   //HDR settings
-   $HDRPostFX::adaptRate               = $PostFXManager::Settings::HDR::adaptRate;
-   $HDRPostFX::blueShiftColor          = $PostFXManager::Settings::HDR::blueShiftColor;
-   $HDRPostFX::brightPassThreshold     = $PostFXManager::Settings::HDR::brightPassThreshold; 
-   $HDRPostFX::enableBloom             = $PostFXManager::Settings::HDR::enableBloom;
-   $HDRPostFX::enableBlueShift         = $PostFXManager::Settings::HDR::enableBlueShift;
-   $HDRPostFX::enableToneMapping       = $PostFXManager::Settings::HDR::enableToneMapping;
-   $HDRPostFX::gaussMean               = $PostFXManager::Settings::HDR::gaussMean;
-   $HDRPostFX::gaussMultiplier         = $PostFXManager::Settings::HDR::gaussMultiplier;
-   $HDRPostFX::gaussStdDev             = $PostFXManager::Settings::HDR::gaussStdDev;
-   $HDRPostFX::keyValue                = $PostFXManager::Settings::HDR::keyValue;
-   $HDRPostFX::minLuminace             = $PostFXManager::Settings::HDR::minLuminace;
-   $HDRPostFX::whiteCutoff             = $PostFXManager::Settings::HDR::whiteCutoff;
-   $HDRPostFX::colorCorrectionRamp     = $PostFXManager::Settings::ColorCorrectionRamp;
-   
-   //Light rays settings
-   $LightRayPostFX::brightScalar       = $PostFXManager::Settings::LightRays::brightScalar;
-   
-   $LightRayPostFX::numSamples         = $PostFXManager::Settings::LightRays::numSamples;
-   $LightRayPostFX::density            = $PostFXManager::Settings::LightRays::density;
-   $LightRayPostFX::weight             = $PostFXManager::Settings::LightRays::weight;
-   $LightRayPostFX::decay              = $PostFXManager::Settings::LightRays::decay;
-   
-   //DOF settings   
-   $DOFPostFx::EnableAutoFocus         = $PostFXManager::Settings::DOF::EnableAutoFocus;
-   $DOFPostFx::BlurMin                 = $PostFXManager::Settings::DOF::BlurMin;
-   $DOFPostFx::BlurMax                 = $PostFXManager::Settings::DOF::BlurMax;
-   $DOFPostFx::FocusRangeMin           = $PostFXManager::Settings::DOF::FocusRangeMin;
-   $DOFPostFx::FocusRangeMax           = $PostFXManager::Settings::DOF::FocusRangeMax;
-   $DOFPostFx::BlurCurveNear           = $PostFXManager::Settings::DOF::BlurCurveNear;
-   $DOFPostFx::BlurCurveFar            = $PostFXManager::Settings::DOF::BlurCurveFar;
-
-   //Vignette settings   
-   $VignettePostEffect::VMax           = $PostFXManager::Settings::Vignette::VMax;
-   $VignettePostEffect::VMin           = $PostFXManager::Settings::Vignette::VMin;
-  
-   if ( $PostFXManager::forceEnableFromPresets )
-   {
-      $PostFXManager::PostFX::Enabled           = $PostFXManager::Settings::EnablePostFX;
-      $PostFXManager::PostFX::EnableDOF         = $pref::PostFX::EnableDOF ? $PostFXManager::Settings::EnableDOF : false;
-      $PostFXManager::PostFX::EnableVignette    = $pref::PostFX::EnableVignette ? $PostFXManager::Settings::EnableVignette : false;
-      $PostFXManager::PostFX::EnableLightRays   = $pref::PostFX::EnableLightRays ? $PostFXManager::Settings::EnableLightRays : false;
-      $PostFXManager::PostFX::EnableHDR         = $pref::PostFX::EnableHDR ? $PostFXManager::Settings::EnableHDR : false;
-      $PostFXManager::PostFX::EnableSSAO        = $pref::PostFX::EnabledSSAO ? $PostFXManager::Settings::EnableSSAO : false;
-
-      %this.settingsSetEnabled( true );
-   }
-   
-   //make sure we apply the correct settings to the DOF
-   ppOptionsUpdateDOFSettings();
-   
-   // Update the actual GUI controls if its awake ( otherwise it will when opened ).
-   if ( PostFXManager.isAwake() )
-      %this.settingsRefreshAll();      
-}
-
-function PostFXManager::settingsApplySSAO(%this)
-{   
-   $PostFXManager::Settings::SSAO::blurDepthTol             = $SSAOPostFx::blurDepthTol;
-   $PostFXManager::Settings::SSAO::blurNormalTol            = $SSAOPostFx::blurNormalTol;
-   $PostFXManager::Settings::SSAO::lDepthMax                = $SSAOPostFx::lDepthMax;
-   $PostFXManager::Settings::SSAO::lDepthMin                = $SSAOPostFx::lDepthMin;
-   $PostFXManager::Settings::SSAO::lDepthPow                = $SSAOPostFx::lDepthPow;
-   $PostFXManager::Settings::SSAO::lNormalPow               = $SSAOPostFx::lNormalPow;
-   $PostFXManager::Settings::SSAO::lNormalTol               = $SSAOPostFx::lNormalTol;
-   $PostFXManager::Settings::SSAO::lRadius                  = $SSAOPostFx::lRadius;
-   $PostFXManager::Settings::SSAO::lStrength                = $SSAOPostFx::lStrength;
-   $PostFXManager::Settings::SSAO::overallStrength          = $SSAOPostFx::overallStrength;
-   $PostFXManager::Settings::SSAO::quality                  = $SSAOPostFx::quality;
-   $PostFXManager::Settings::SSAO::sDepthMax                = $SSAOPostFx::sDepthMax;
-   $PostFXManager::Settings::SSAO::sDepthMin                = $SSAOPostFx::sDepthMin;
-   $PostFXManager::Settings::SSAO::sDepthPow                = $SSAOPostFx::sDepthPow;
-   $PostFXManager::Settings::SSAO::sNormalPow               = $SSAOPostFx::sNormalPow;
-   $PostFXManager::Settings::SSAO::sNormalTol               = $SSAOPostFx::sNormalTol;
-   $PostFXManager::Settings::SSAO::sRadius                  = $SSAOPostFx::sRadius;
-   $PostFXManager::Settings::SSAO::sStrength                = $SSAOPostFx::sStrength;
-
-   postVerbose("% - PostFX Manager - Settings Saved - SSAO");    
-   
-}
-
-function PostFXManager::settingsApplyHDR(%this)
-{   
-   $PostFXManager::Settings::HDR::adaptRate                 = $HDRPostFX::adaptRate;
-   $PostFXManager::Settings::HDR::blueShiftColor            = $HDRPostFX::blueShiftColor;
-   $PostFXManager::Settings::HDR::brightPassThreshold       = $HDRPostFX::brightPassThreshold;
-   $PostFXManager::Settings::HDR::enableBloom               = $HDRPostFX::enableBloom;
-   $PostFXManager::Settings::HDR::enableBlueShift           = $HDRPostFX::enableBlueShift;
-   $PostFXManager::Settings::HDR::enableToneMapping         = $HDRPostFX::enableToneMapping;
-   $PostFXManager::Settings::HDR::gaussMean                 = $HDRPostFX::gaussMean;
-   $PostFXManager::Settings::HDR::gaussMultiplier           = $HDRPostFX::gaussMultiplier;
-   $PostFXManager::Settings::HDR::gaussStdDev               = $HDRPostFX::gaussStdDev;
-   $PostFXManager::Settings::HDR::keyValue                  = $HDRPostFX::keyValue;
-   $PostFXManager::Settings::HDR::minLuminace               = $HDRPostFX::minLuminace;
-   $PostFXManager::Settings::HDR::whiteCutoff               = $HDRPostFX::whiteCutoff;
-   $PostFXManager::Settings::ColorCorrectionRamp            = $HDRPostFX::colorCorrectionRamp;
-   
-   postVerbose("% - PostFX Manager - Settings Saved - HDR");      
-}
-
-function PostFXManager::settingsApplyLightRays(%this)
-{   
-   $PostFXManager::Settings::LightRays::brightScalar        = $LightRayPostFX::brightScalar;
-   
-   $PostFXManager::Settings::LightRays::numSamples          = $LightRayPostFX::numSamples;
-   $PostFXManager::Settings::LightRays::density             = $LightRayPostFX::density;
-   $PostFXManager::Settings::LightRays::weight              = $LightRayPostFX::weight;
-   $PostFXManager::Settings::LightRays::decay               = $LightRayPostFX::decay;
-   
-   postVerbose("% - PostFX Manager - Settings Saved - Light Rays");   
-   
-}
-
-function PostFXManager::settingsApplyDOF(%this)
-{
-   $PostFXManager::Settings::DOF::EnableAutoFocus           = $DOFPostFx::EnableAutoFocus;   
-   $PostFXManager::Settings::DOF::BlurMin                   = $DOFPostFx::BlurMin;
-   $PostFXManager::Settings::DOF::BlurMax                   = $DOFPostFx::BlurMax;
-   $PostFXManager::Settings::DOF::FocusRangeMin             = $DOFPostFx::FocusRangeMin;
-   $PostFXManager::Settings::DOF::FocusRangeMax             = $DOFPostFx::FocusRangeMax;
-   $PostFXManager::Settings::DOF::BlurCurveNear             = $DOFPostFx::BlurCurveNear;
-   $PostFXManager::Settings::DOF::BlurCurveFar              = $DOFPostFx::BlurCurveFar;
-   
-   postVerbose("% - PostFX Manager - Settings Saved - DOF");   
-   
-}
-
-function PostFXManager::settingsApplyVignette(%this)
-{
-   $PostFXManager::Settings::Vignette::VMax                 = $VignettePostEffect::VMax;
-   $PostFXManager::Settings::Vignette::VMin                 = $VignettePostEffect::VMin;
-
-   postVerbose("% - PostFX Manager - Settings Saved - Vignette");   
-   
-}
-
-function PostFXManager::settingsApplyAll(%this, %sFrom)
-{
-   // Apply settings which control if effects are on/off altogether.
-   $PostFXManager::Settings::EnablePostFX        = $PostFXManager::PostFX::Enabled;  
-   $PostFXManager::Settings::EnableDOF           = $PostFXManager::PostFX::EnableDOF;
-   $PostFXManager::Settings::EnableVignette      = $PostFXManager::PostFX::EnableVignette;
-   $PostFXManager::Settings::EnableLightRays     = $PostFXManager::PostFX::EnableLightRays;
-   $PostFXManager::Settings::EnableHDR           = $PostFXManager::PostFX::EnableHDR;
-   $PostFXManager::Settings::EnableSSAO          = $PostFXManager::PostFX::EnableSSAO;
-      
-   // Apply settings should save the values in the system to the 
-   // the preset structure ($PostFXManager::Settings::*)
-
-   // SSAO Settings
-   %this.settingsApplySSAO();
-   // HDR settings
-   %this.settingsApplyHDR();
-   // Light rays settings
-   %this.settingsApplyLightRays();
-   // DOF
-   %this.settingsApplyDOF();
-   // Vignette
-   %this.settingsApplyVignette();
-   
-   postVerbose("% - PostFX Manager - All Settings applied to $PostFXManager::Settings");
-}
-
-function PostFXManager::settingsApplyDefaultPreset(%this)
-{
-   PostFXManager::loadPresetHandler($PostFXManager::defaultPreset);
-}
-

+ 0 - 79
Templates/BaseGame/game/core/postFX/postFxManager.persistance.cs

@@ -1,79 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-// Used to name the saved files.
-$PostFXManager::fileExtension = ".postfxpreset.cs";
-
-// The filter string for file open/save dialogs.
-$PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset.cs";
-
-// Enable / disable PostFX when loading presets or just apply the settings?
-$PostFXManager::forceEnableFromPresets = true;
-
-//Load a preset file from the disk, and apply the settings to the
-//controls. If bApplySettings is true - the actual values in the engine
-//will be changed to reflect the settings from the file.
-function PostFXManager::loadPresetFile()
-{
-   //Show the dialog and set the flag
-   getLoadFilename($PostFXManager::fileFilter, "PostFXManager::loadPresetHandler");
-}
-
-function PostFXManager::loadPresetHandler( %filename )
-{
-   //Check the validity of the file
-   if ( isScriptFile( %filename ) )
-   {
-      %filename = expandFilename(%filename);
-      postVerbose("% - PostFX Manager - Executing " @ %filename);
-      exec(%filename);
-
-      PostFXManager.settingsApplyFromPreset();      
-   }
-}
-
-//Save a preset file to the specified file. The extension used
-//is specified by $PostFXManager::fileExtension for on the fly
-//name changes to the extension used. 
-
-function PostFXManager::savePresetFile(%this)
-{
-   %defaultFile = filePath($Client::MissionFile) @ "/" @ fileBase($Client::MissionFile);
-   getSaveFilename($PostFXManager::fileFilter, "PostFXManager::savePresetHandler", %defaultFile);
-}
-
-//Called from the PostFXManager::savePresetFile() function
-function PostFXManager::savePresetHandler( %filename )
-{
-   %filename = makeRelativePath( %filename, getMainDotCsDir() );
-   if(strStr(%filename, ".") == -1)
-      %filename = %filename @ $PostFXManager::fileExtension;
-               
-   //Apply the current settings to the preset
-   PostFXManager.settingsApplyAll();
-   
-   export("$PostFXManager::Settings::*", %filename, false);
-
-   postVerbose("% - PostFX Manager - Save complete. Preset saved at : " @ %filename);
-}
-

+ 0 - 302
Templates/BaseGame/game/core/postFX/ssao.cs

@@ -1,302 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2012 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-
-///
-$SSAOPostFx::overallStrength = 2.0;
-
-// TODO: Add small/large param docs.
-
-// The small radius SSAO settings.
-$SSAOPostFx::sRadius = 0.1;
-$SSAOPostFx::sStrength = 6.0;
-$SSAOPostFx::sDepthMin = 0.1;
-$SSAOPostFx::sDepthMax = 1.0;
-$SSAOPostFx::sDepthPow = 1.0;
-$SSAOPostFx::sNormalTol = 0.0;
-$SSAOPostFx::sNormalPow = 1.0;
-
-// The large radius SSAO settings.
-$SSAOPostFx::lRadius = 1.0;
-$SSAOPostFx::lStrength = 10.0;
-$SSAOPostFx::lDepthMin = 0.2;
-$SSAOPostFx::lDepthMax = 2.0;
-$SSAOPostFx::lDepthPow = 0.2;
-$SSAOPostFx::lNormalTol = -0.5;
-$SSAOPostFx::lNormalPow = 2.0;
-
-/// Valid values: 0, 1, 2
-$SSAOPostFx::quality = 0;
-
-///
-$SSAOPostFx::blurDepthTol = 0.001;
-
-/// 
-$SSAOPostFx::blurNormalTol = 0.95;
-
-///
-$SSAOPostFx::targetScale = "0.5 0.5";
-
-
-function SSAOPostFx::onAdd( %this )
-{  
-   %this.wasVis = "Uninitialized";
-   %this.quality = "Uninitialized";
-}
-
-function SSAOPostFx::preProcess( %this )
-{   
-   if ( $SSAOPostFx::quality !$= %this.quality )
-   {
-      %this.quality = mClamp( mRound( $SSAOPostFx::quality ), 0, 2 );
-      
-      %this.setShaderMacro( "QUALITY", %this.quality );      
-   }      
-   
-   %this.targetScale = $SSAOPostFx::targetScale;
-}
-
-function SSAOPostFx::setShaderConsts( %this )
-{      
-   %this.setShaderConst( "$overallStrength", $SSAOPostFx::overallStrength );
-
-   // Abbreviate is s-small l-large.   
-   
-   %this.setShaderConst( "$sRadius",      $SSAOPostFx::sRadius );
-   %this.setShaderConst( "$sStrength",    $SSAOPostFx::sStrength );
-   %this.setShaderConst( "$sDepthMin",    $SSAOPostFx::sDepthMin );
-   %this.setShaderConst( "$sDepthMax",    $SSAOPostFx::sDepthMax );
-   %this.setShaderConst( "$sDepthPow",    $SSAOPostFx::sDepthPow );
-   %this.setShaderConst( "$sNormalTol",   $SSAOPostFx::sNormalTol );
-   %this.setShaderConst( "$sNormalPow",   $SSAOPostFx::sNormalPow );
-   
-   %this.setShaderConst( "$lRadius",      $SSAOPostFx::lRadius );
-   %this.setShaderConst( "$lStrength",    $SSAOPostFx::lStrength );
-   %this.setShaderConst( "$lDepthMin",    $SSAOPostFx::lDepthMin );
-   %this.setShaderConst( "$lDepthMax",    $SSAOPostFx::lDepthMax );
-   %this.setShaderConst( "$lDepthPow",    $SSAOPostFx::lDepthPow );
-   %this.setShaderConst( "$lNormalTol",   $SSAOPostFx::lNormalTol );
-   %this.setShaderConst( "$lNormalPow",   $SSAOPostFx::lNormalPow );
-   
-   %blur = %this->blurY;
-   %blur.setShaderConst( "$blurDepthTol", $SSAOPostFx::blurDepthTol );
-   %blur.setShaderConst( "$blurNormalTol", $SSAOPostFx::blurNormalTol );   
-   
-   %blur = %this->blurX;
-   %blur.setShaderConst( "$blurDepthTol", $SSAOPostFx::blurDepthTol );
-   %blur.setShaderConst( "$blurNormalTol", $SSAOPostFx::blurNormalTol );   
-   
-   %blur = %this->blurY2;
-   %blur.setShaderConst( "$blurDepthTol", $SSAOPostFx::blurDepthTol );
-   %blur.setShaderConst( "$blurNormalTol", $SSAOPostFx::blurNormalTol );
-      
-   %blur = %this->blurX2;
-   %blur.setShaderConst( "$blurDepthTol", $SSAOPostFx::blurDepthTol );
-   %blur.setShaderConst( "$blurNormalTol", $SSAOPostFx::blurNormalTol );         
-}
-
-function SSAOPostFx::onEnabled( %this )
-{
-   // This tells the AL shaders to reload and sample
-   // from our #ssaoMask texture target. 
-   $AL::UseSSAOMask = true;
-   
-   return true;
-}
-
-function SSAOPostFx::onDisabled( %this )
-{
-  $AL::UseSSAOMask = false;
-}
-
-
-//-----------------------------------------------------------------------------
-// GFXStateBlockData / ShaderData
-//-----------------------------------------------------------------------------
-
-singleton GFXStateBlockData( SSAOStateBlock : PFX_DefaultStateBlock )
-{   
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;
-   samplerStates[1] = SamplerWrapLinear;
-   samplerStates[2] = SamplerClampPoint;
-};
-
-singleton GFXStateBlockData( SSAOBlurStateBlock : PFX_DefaultStateBlock )
-{   
-   samplersDefined = true;
-   samplerStates[0] = SamplerClampLinear;
-   samplerStates[1] = SamplerClampPoint;
-};
-
-singleton ShaderData( SSAOShader )
-{   
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/ssao/SSAO_P.hlsl";            
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_P.glsl";
-
-   samplerNames[0] = "$deferredMap";
-   samplerNames[1] = "$randNormalTex";
-   samplerNames[2] = "$powTable";
-   
-   pixVersion = 3.0;
-};
-
-singleton ShaderData( SSAOBlurYShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/ssao/SSAO_Blur_V.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/ssao/SSAO_Blur_P.hlsl";   
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_Blur_V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_Blur_P.glsl";
-   
-   samplerNames[0] = "$occludeMap";
-   samplerNames[1] = "$deferredMap";
-
-   pixVersion = 3.0;      
-   
-   defines = "BLUR_DIR=float2(0.0,1.0)";         
-};
-
-singleton ShaderData( SSAOBlurXShader : SSAOBlurYShader )
-{
-   defines = "BLUR_DIR=float2(1.0,0.0)";
-};
-
-//-----------------------------------------------------------------------------
-// PostEffects
-//-----------------------------------------------------------------------------
-
-singleton PostEffect( SSAOPostFx )
-{     
-   allowReflectPass = false;
-     
-   renderTime = "PFXBeforeBin";
-   renderBin = "AL_LightBinMgr";   
-   renderPriority = 10;
-   
-   shader = SSAOShader;
-   stateBlock = SSAOStateBlock;
-         
-   texture[0] = "#deferred";         
-   texture[1] = "core/images/noise.png";
-   texture[2] = "#ssao_pow_table";
-   
-   target = "$outTex";
-   targetScale = "0.5 0.5";
-   targetViewport = "PFXTargetViewport_NamedInTexture0";
-   
-   singleton PostEffect()
-   {
-      internalName = "blurY";
-      
-      shader = SSAOBlurYShader;
-      stateBlock = SSAOBlurStateBlock;
-      
-      texture[0] = "$inTex";
-      texture[1] = "#deferred";
-      
-      target = "$outTex"; 
-   };
-      
-   singleton PostEffect()
-   {
-      internalName = "blurX";
-      
-      shader = SSAOBlurXShader;
-      stateBlock = SSAOBlurStateBlock;
-      
-      texture[0] = "$inTex";
-      texture[1] = "#deferred";
-      
-      target = "$outTex"; 
-   };   
-   
-   singleton PostEffect()
-   {
-      internalName = "blurY2";
-      
-      shader = SSAOBlurYShader;
-      stateBlock = SSAOBlurStateBlock;
-            
-      texture[0] = "$inTex";
-      texture[1] = "#deferred";
-      
-      target = "$outTex"; 
-   };
-   
-   singleton PostEffect()
-   {
-      internalName = "blurX2";
-            
-      shader = SSAOBlurXShader;
-      stateBlock = SSAOBlurStateBlock;
-            
-      texture[0] = "$inTex";
-      texture[1] = "#deferred";
-            
-      // We write to a mask texture which is then
-      // read by the lighting shaders to mask ambient.
-      target = "#ssaoMask";   
-   };  
-};
-
-
-/// Just here for debug visualization of the 
-/// SSAO mask texture used during lighting.
-singleton PostEffect( SSAOVizPostFx )
-{      
-   allowReflectPass = false;
-        
-   shader = PFX_PassthruShader;
-   stateBlock = PFX_DefaultStateBlock;
-   
-   texture[0] = "#ssaoMask";
-   
-   target = "$backbuffer";
-};
-
-singleton ShaderData( SSAOPowTableShader )
-{
-   DXVertexShaderFile 	= $Core::CommonShaderPath @ "/postFX/ssao/SSAO_PowerTable_V.hlsl";
-   DXPixelShaderFile 	= $Core::CommonShaderPath @ "/postFX/ssao/SSAO_PowerTable_P.hlsl";            
-   
-   OGLVertexShaderFile  = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_PowerTable_V.glsl";
-   OGLPixelShaderFile   = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_PowerTable_P.glsl";   
-   
-   pixVersion = 2.0;
-};
-
-singleton PostEffect( SSAOPowTablePostFx )
-{
-   shader = SSAOPowTableShader;
-   stateBlock = PFX_DefaultStateBlock;
-   
-   renderTime = "PFXTexGenOnDemand";
-   
-   target = "#ssao_pow_table"; 
-   
-   targetFormat = "GFXFormatR16F";   
-   targetSize = "256 1";
-};

部分文件因为文件数量过多而无法显示