ghorsington 5 年 前
コミット
c558faa144
124 ファイル変更7360 行追加2106 行削除
  1. 5 5
      Assembly-CSharp.sln
  2. 1 1
      Assembly-CSharp/AVProVideoPlayer.cs
  3. 69 20
      Assembly-CSharp/Assembly-CSharp.csproj
  4. 31 0
      Assembly-CSharp/AutoRotate.cs
  5. 148 104
      Assembly-CSharp/BaseKagManager.cs
  6. 1 1
      Assembly-CSharp/BasePhotoCustomObject.cs
  7. 1 1
      Assembly-CSharp/BasePhotoWindowManager.cs
  8. 17 17
      Assembly-CSharp/BenchSetting.cs
  9. 3 3
      Assembly-CSharp/BigThumbnail.cs
  10. 0 396
      Assembly-CSharp/BipedIKCtrlData.cs
  11. 36 105
      Assembly-CSharp/BodyCtrlData.cs
  12. 0 63
      Assembly-CSharp/CCDIKCtrlData.cs
  13. 10 10
      Assembly-CSharp/CMSystem.cs
  14. 2 2
      Assembly-CSharp/CameraMain.cs
  15. 13 13
      Assembly-CSharp/CharacterMgr.cs
  16. 4 4
      Assembly-CSharp/ControllerShortcutSettingData.cs
  17. 19 19
      Assembly-CSharp/DanceSetting.cs
  18. 3 4
      Assembly-CSharp/DeskCustomizeWindowManager.cs
  19. 3 3
      Assembly-CSharp/DeskManager.cs
  20. 3 3
      Assembly-CSharp/DynamicBone.cs
  21. 1 1
      Assembly-CSharp/DynamicSkirtBone.cs
  22. 1 1
      Assembly-CSharp/EditMod.cs
  23. 77 0
      Assembly-CSharp/ElbowKneeIKData.cs
  24. 1 1
      Assembly-CSharp/EmpireLifeModeManager.cs
  25. 39 0
      Assembly-CSharp/ExampleWheelController.cs
  26. 0 63
      Assembly-CSharp/FABRIKCtrlData.cs
  27. 2 2
      Assembly-CSharp/Facility.cs
  28. 3 3
      Assembly-CSharp/FacilityManager.cs
  29. 430 406
      Assembly-CSharp/FullBodyIKCtrl.cs
  30. 8 8
      Assembly-CSharp/GameMain.cs
  31. 1 1
      Assembly-CSharp/GameModeManager.cs
  32. 185 185
      Assembly-CSharp/GameUty.cs
  33. 207 0
      Assembly-CSharp/HandFootIKData.cs
  34. 4 4
      Assembly-CSharp/HandSignShortcut.cs
  35. 0 52
      Assembly-CSharp/HeightIKCtrlData.cs
  36. 594 452
      Assembly-CSharp/IKCtrlData.cs
  37. 2 2
      Assembly-CSharp/ImgDisplay.cs
  38. 2 2
      Assembly-CSharp/InfinityColorTextureCache.cs
  39. 3 3
      Assembly-CSharp/Kasizuki/BigThumbnailKasizuki.cs
  40. 5 5
      Assembly-CSharp/Kasizuki/KasizukiManager.cs
  41. 34 0
      Assembly-CSharp/LimbIKData.cs
  42. 33 33
      Assembly-CSharp/Maid.cs
  43. 1 1
      Assembly-CSharp/MaidParts.cs
  44. 1 1
      Assembly-CSharp/MaidProp.cs
  45. 1 1
      Assembly-CSharp/MaidStatus/Status.cs
  46. 5 5
      Assembly-CSharp/Menu.cs
  47. 3 1
      Assembly-CSharp/Misc.cs
  48. 1 1
      Assembly-CSharp/ModCompile.cs
  49. 7 7
      Assembly-CSharp/MyRoomCustom/CreativeRoomManager.cs
  50. 2 2
      Assembly-CSharp/OvrHandCamera.cs
  51. 6 6
      Assembly-CSharp/OvrIK.cs
  52. 2 2
      Assembly-CSharp/OvrSelfShotCamera.cs
  53. 1 1
      Assembly-CSharp/PhotoModeSaveAndLoad.cs
  54. 2 2
      Assembly-CSharp/PhotoMotionData.cs
  55. 4 4
      Assembly-CSharp/PhotoWindowManager.cs
  56. 1 1
      Assembly-CSharp/PlayerStatus/Status.cs
  57. 2 2
      Assembly-CSharp/PoseEditWindow.cs
  58. 9 0
      Assembly-CSharp/Product.cs
  59. 45 12
      Assembly-CSharp/SceneEdit.cs
  60. 3 4
      Assembly-CSharp/SceneEditWindow/WindowManager.cs
  61. 1 1
      Assembly-CSharp/SceneNPCEdit/SaveData.cs
  62. 4 4
      Assembly-CSharp/SceneVRCommunication.cs
  63. 1 1
      Assembly-CSharp/ScriptManager.cs
  64. 1 1
      Assembly-CSharp/ShootCutInTex.cs
  65. 42 27
      Assembly-CSharp/Shop.cs
  66. 97 0
      Assembly-CSharp/ShoulderThighIKData.cs
  67. 20 2
      Assembly-CSharp/SystemShortcut.cs
  68. 1 1
      Assembly-CSharp/TBody.cs
  69. 15 3
      Assembly-CSharp/TitleCtrl.cs
  70. 16 0
      Assembly-CSharp/UTY.cs
  71. 181 0
      Assembly-CSharp/UnityEngine/PostProcessing/AmbientOcclusionComponent.cs
  72. 80 0
      Assembly-CSharp/UnityEngine/PostProcessing/AmbientOcclusionModel.cs
  73. 226 0
      Assembly-CSharp/UnityEngine/PostProcessing/AntialiasingModel.cs
  74. 117 0
      Assembly-CSharp/UnityEngine/PostProcessing/BloomComponent.cs
  75. 121 0
      Assembly-CSharp/UnityEngine/PostProcessing/BloomModel.cs
  76. 244 0
      Assembly-CSharp/UnityEngine/PostProcessing/BuiltinDebugViewsComponent.cs
  77. 141 0
      Assembly-CSharp/UnityEngine/PostProcessing/BuiltinDebugViewsModel.cs
  78. 62 0
      Assembly-CSharp/UnityEngine/PostProcessing/ChromaticAberrationComponent.cs
  79. 51 0
      Assembly-CSharp/UnityEngine/PostProcessing/ChromaticAberrationModel.cs
  80. 356 0
      Assembly-CSharp/UnityEngine/PostProcessing/ColorGradingComponent.cs
  81. 66 0
      Assembly-CSharp/UnityEngine/PostProcessing/ColorGradingCurve.cs
  82. 344 0
      Assembly-CSharp/UnityEngine/PostProcessing/ColorGradingModel.cs
  83. 148 0
      Assembly-CSharp/UnityEngine/PostProcessing/DepthOfFieldComponent.cs
  84. 73 0
      Assembly-CSharp/UnityEngine/PostProcessing/DepthOfFieldModel.cs
  85. 60 0
      Assembly-CSharp/UnityEngine/PostProcessing/DitheringComponent.cs
  86. 40 0
      Assembly-CSharp/UnityEngine/PostProcessing/DitheringModel.cs
  87. 177 0
      Assembly-CSharp/UnityEngine/PostProcessing/EyeAdaptationComponent.cs
  88. 99 0
      Assembly-CSharp/UnityEngine/PostProcessing/EyeAdaptationModel.cs
  89. 82 0
      Assembly-CSharp/UnityEngine/PostProcessing/FogComponent.cs
  90. 46 0
      Assembly-CSharp/UnityEngine/PostProcessing/FogModel.cs
  91. 33 0
      Assembly-CSharp/UnityEngine/PostProcessing/FxaaComponent.cs
  92. 16 0
      Assembly-CSharp/UnityEngine/PostProcessing/GetSetAttribute.cs
  93. 61 0
      Assembly-CSharp/UnityEngine/PostProcessing/GrainComponent.cs
  94. 61 0
      Assembly-CSharp/UnityEngine/PostProcessing/GrainModel.cs
  95. 139 0
      Assembly-CSharp/UnityEngine/PostProcessing/GraphicsUtils.cs
  96. 45 0
      Assembly-CSharp/UnityEngine/PostProcessing/MaterialFactory.cs
  97. 14 0
      Assembly-CSharp/UnityEngine/PostProcessing/MinAttribute.cs
  98. 418 0
      Assembly-CSharp/UnityEngine/PostProcessing/MotionBlurComponent.cs
  99. 57 0
      Assembly-CSharp/UnityEngine/PostProcessing/MotionBlurModel.cs
  100. 425 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingBehaviour.cs
  101. 20 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponent.cs
  102. 26 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponentBase.cs
  103. 14 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponentCommandBuffer.cs
  104. 11 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponentRenderTexture.cs
  105. 72 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingContext.cs
  106. 34 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingModel.cs
  107. 37 0
      Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingProfile.cs
  108. 58 0
      Assembly-CSharp/UnityEngine/PostProcessing/RenderTextureFactory.cs
  109. 224 0
      Assembly-CSharp/UnityEngine/PostProcessing/ScreenSpaceReflectionComponent.cs
  110. 143 0
      Assembly-CSharp/UnityEngine/PostProcessing/ScreenSpaceReflectionModel.cs
  111. 181 0
      Assembly-CSharp/UnityEngine/PostProcessing/TaaComponent.cs
  112. 14 0
      Assembly-CSharp/UnityEngine/PostProcessing/TrackballAttribute.cs
  113. 8 0
      Assembly-CSharp/UnityEngine/PostProcessing/TrackballGroupAttribute.cs
  114. 38 0
      Assembly-CSharp/UnityEngine/PostProcessing/UserLutComponent.cs
  115. 51 0
      Assembly-CSharp/UnityEngine/PostProcessing/UserLutModel.cs
  116. 47 0
      Assembly-CSharp/UnityEngine/PostProcessing/VignetteComponent.cs
  117. 89 0
      Assembly-CSharp/UnityEngine/PostProcessing/VignetteModel.cs
  118. 2 2
      Assembly-CSharp/VRExternalFileLoader.cs
  119. 1 1
      Assembly-CSharp/VRPhotoMenu.cs
  120. 2 2
      Assembly-CSharp/Webs.cs
  121. 1 1
      Assembly-CSharp/WindowPartsFingerPreset.cs
  122. 4 4
      Assembly-CSharp/YotogiManager.cs
  123. 4 4
      Assembly-CSharp/YotogiOldManager.cs
  124. 1 1
      Assembly-CSharp/uGUITutorialPanel.cs

+ 5 - 5
Assembly-CSharp.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
 VisualStudioVersion = 15.0.26228.4
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{69249CDC-0A1B-48CB-BFA7-BB727626A42B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{8CB978AD-1DF6-4BE6-B95B-1DF265451E0E}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +11,10 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{69249CDC-0A1B-48CB-BFA7-BB727626A42B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{69249CDC-0A1B-48CB-BFA7-BB727626A42B}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{69249CDC-0A1B-48CB-BFA7-BB727626A42B}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{69249CDC-0A1B-48CB-BFA7-BB727626A42B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8CB978AD-1DF6-4BE6-B95B-1DF265451E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8CB978AD-1DF6-4BE6-B95B-1DF265451E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8CB978AD-1DF6-4BE6-B95B-1DF265451E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8CB978AD-1DF6-4BE6-B95B-1DF265451E0E}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 1 - 1
Assembly-CSharp/AVProVideoPlayer.cs

@@ -10,7 +10,7 @@ public class AVProVideoPlayer : MonoBehaviour
 		this.m_player = base.GetComponent<MediaPlayer>();
 		NDebug.Assert(this.m_player != null, "MediaPlayer コンポーネントが付いてないといけません。");
 		this.m_player.m_VideoLocation = MediaPlayer.FileLocation.AbsolutePathOrURL;
-		this.m_player.m_VideoPath = Path.GetFullPath(".\\") + "GameData\\" + this.m_player.m_VideoPath;
+		this.m_player.m_VideoPath = UTY.gameProjectPath + "\\GameData\\" + this.m_player.m_VideoPath;
 		string dshowFilter = GameMain.Instance.CMSystem.SConfig.DShowFilter;
 		MediaPlayer.OptionsWindows platformOptionsWindows = this.m_player.PlatformOptionsWindows;
 		if (!string.IsNullOrEmpty(dshowFilter))

+ 69 - 20
Assembly-CSharp/Assembly-CSharp.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{69249CDC-0A1B-48CB-BFA7-BB727626A42B}</ProjectGuid>
+    <ProjectGuid>{8CB978AD-1DF6-4BE6-B95B-1DF265451E0E}</ProjectGuid>
     <OutputType>Library</OutputType>
     <RootNamespace>Assembly-CSharp</RootNamespace>
     <AssemblyName>Assembly-CSharp</AssemblyName>
@@ -34,49 +34,49 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Assembly-CSharp-firstpass">
-      <HintPath>..\..\..\com_131\Assembly-CSharp-firstpass.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="Assembly-UnityScript-firstpass">
-      <HintPath>..\..\..\com_131\Assembly-UnityScript-firstpass.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="FoveUnityPlugin">
-      <HintPath>..\..\..\com_131\FoveUnityPlugin.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
     </Reference>
     <Reference Include="Ionic.Zlib">
-      <HintPath>..\..\..\com_131\Ionic.Zlib.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
     </Reference>
     <Reference Include="JsonFx.Json">
-      <HintPath>..\..\..\com_131\JsonFx.Json.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
     </Reference>
     <Reference Include="LeapCSharp.NET3.5">
-      <HintPath>..\..\..\com_131\LeapCSharp.NET3.5.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
     </Reference>
     <Reference Include="System">
-      <HintPath>..\..\..\com_131\System.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\System.dll</HintPath>
     </Reference>
     <Reference Include="System.Core">
-      <HintPath>..\..\..\com_131\System.Core.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
     </Reference>
     <Reference Include="System.Drawing">
-      <HintPath>..\..\..\com_131\System.Drawing.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
     </Reference>
     <Reference Include="System.Windows.Forms">
-      <HintPath>..\..\..\com_131\System.Windows.Forms.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml">
-      <HintPath>..\..\..\com_131\System.Xml.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml.Linq">
-      <HintPath>..\..\..\com_131\System.Xml.Linq.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine">
-      <HintPath>..\..\..\com_131\UnityEngine.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine.UI">
-      <HintPath>..\..\..\com_131\UnityEngine.UI.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
     </Reference>
     <Reference Include="zxing.unity">
-      <HintPath>..\..\..\com_131\zxing.unity.dll</HintPath>
+      <HintPath>..\..\..\com_132\com3d2_up132\data\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
     </Reference>
   </ItemGroup>
   <ItemGroup>
@@ -156,6 +156,7 @@
     <Compile Include="AudioSourceMgr.cs" />
     <Compile Include="AudioSourceParent.cs" />
     <Compile Include="AutoPiston.cs" />
+    <Compile Include="AutoRotate.cs" />
     <Compile Include="AVProVideoPlayer.cs" />
     <Compile Include="AVRController.cs" />
     <Compile Include="AVRControllerBehavior.cs" />
@@ -190,7 +191,6 @@
     <Compile Include="BGWindow.cs" />
     <Compile Include="BigThumbnail.cs" />
     <Compile Include="Billboard.cs" />
-    <Compile Include="BipedIKCtrlData.cs" />
     <Compile Include="BjMotionControl.cs" />
     <Compile Include="BjPlayer.cs" />
     <Compile Include="BjVoiceMgr.cs" />
@@ -228,7 +228,6 @@
     <Compile Include="CasinoItemUI.cs" />
     <Compile Include="CasinoShopItem.cs" />
     <Compile Include="CastPreviewHelper.cs" />
-    <Compile Include="CCDIKCtrlData.cs" />
     <Compile Include="ChallengeResult.cs" />
     <Compile Include="CharaAppealData.cs" />
     <Compile Include="CharacterEdit\HighlightSelector.cs" />
@@ -365,6 +364,7 @@
     <Compile Include="EditViewReset.cs" />
     <Compile Include="Edit\MaidProfile.cs" />
     <Compile Include="EffectWindow.cs" />
+    <Compile Include="ElbowKneeIKData.cs" />
     <Compile Include="EmpireLifeModeAPI.cs" />
     <Compile Include="EmpireLifeModeData.cs" />
     <Compile Include="EmpireLifeModeFacilityUI.cs" />
@@ -378,9 +378,9 @@
     <Compile Include="EventDelegate.cs" />
     <Compile Include="ExampleDragDropItem.cs" />
     <Compile Include="ExampleDragDropSurface.cs" />
+    <Compile Include="ExampleWheelController.cs" />
     <Compile Include="ExChangeUI.cs" />
     <Compile Include="ExtensionsDictionaryClass.cs" />
-    <Compile Include="FABRIKCtrlData.cs" />
     <Compile Include="FaceWindow.cs" />
     <Compile Include="Facility.cs" />
     <Compile Include="FacilityDataTable.cs" />
@@ -437,8 +437,8 @@
     <Compile Include="HairMode.cs" />
     <Compile Include="Hand.cs" />
     <Compile Include="HandEnableDisableNotifier.cs" />
+    <Compile Include="HandFootIKData.cs" />
     <Compile Include="HandSignShortcut.cs" />
-    <Compile Include="HeightIKCtrlData.cs" />
     <Compile Include="HideScroll.cs" />
     <Compile Include="HideScrollEventCatch.cs" />
     <Compile Include="HyperlinkText\ObjectPool.cs" />
@@ -677,6 +677,7 @@
     <Compile Include="LightMain.cs" />
     <Compile Include="LightWindow.cs" />
     <Compile Include="LimbControl.cs" />
+    <Compile Include="LimbIKData.cs" />
     <Compile Include="LineRendererNormals.cs" />
     <Compile Include="LineRendererSimpleFlat.cs" />
     <Compile Include="LipSyncDemo_SetCurrentTarget.cs" />
@@ -1123,6 +1124,7 @@
     <Compile Include="ShootCutInTex.cs" />
     <Compile Include="Shop.cs" />
     <Compile Include="ShopItem.cs" />
+    <Compile Include="ShoulderThighIKData.cs" />
     <Compile Include="SimpleExperienceSystem.cs" />
     <Compile Include="SimpleMaidPlate.cs" />
     <Compile Include="SingletonBase.cs" />
@@ -1426,6 +1428,53 @@
     <Compile Include="UndressingManager.cs" />
     <Compile Include="UndressingWindow.cs" />
     <Compile Include="UnityEngine\EventSystems\StandaloneInputModule2.cs" />
+    <Compile Include="UnityEngine\PostProcessing\AmbientOcclusionComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\AmbientOcclusionModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\AntialiasingModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\BloomComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\BloomModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\BuiltinDebugViewsComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\BuiltinDebugViewsModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\ChromaticAberrationComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\ChromaticAberrationModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\ColorGradingComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\ColorGradingCurve.cs" />
+    <Compile Include="UnityEngine\PostProcessing\ColorGradingModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\DepthOfFieldComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\DepthOfFieldModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\DitheringComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\DitheringModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\EyeAdaptationComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\EyeAdaptationModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\FogComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\FogModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\FxaaComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\GetSetAttribute.cs" />
+    <Compile Include="UnityEngine\PostProcessing\GrainComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\GrainModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\GraphicsUtils.cs" />
+    <Compile Include="UnityEngine\PostProcessing\MaterialFactory.cs" />
+    <Compile Include="UnityEngine\PostProcessing\MinAttribute.cs" />
+    <Compile Include="UnityEngine\PostProcessing\MotionBlurComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\MotionBlurModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingBehaviour.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingComponentBase.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingComponentCommandBuffer.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingComponentRenderTexture.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingContext.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\PostProcessingProfile.cs" />
+    <Compile Include="UnityEngine\PostProcessing\RenderTextureFactory.cs" />
+    <Compile Include="UnityEngine\PostProcessing\ScreenSpaceReflectionComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\ScreenSpaceReflectionModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\TaaComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\TrackballAttribute.cs" />
+    <Compile Include="UnityEngine\PostProcessing\TrackballGroupAttribute.cs" />
+    <Compile Include="UnityEngine\PostProcessing\UserLutComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\UserLutModel.cs" />
+    <Compile Include="UnityEngine\PostProcessing\VignetteComponent.cs" />
+    <Compile Include="UnityEngine\PostProcessing\VignetteModel.cs" />
     <Compile Include="UnityEngine\UI\HyperTextBase.cs" />
     <Compile Include="UnityEngine\UI\HyphenationJP.cs" />
     <Compile Include="UnityEngine\UI\RichtextAlphaAdapter.cs" />

+ 31 - 0
Assembly-CSharp/AutoRotate.cs

@@ -0,0 +1,31 @@
+using System;
+using UnityEngine;
+
+public class AutoRotate : MonoBehaviour
+{
+	private void Update()
+	{
+		Vector3 a = Vector3.one * this.Speed;
+		if (!this.RotateOnX)
+		{
+			a.x = 0f;
+		}
+		if (!this.RotateOnY)
+		{
+			a.y = 0f;
+		}
+		if (!this.RotateOnZ)
+		{
+			a.z = 0f;
+		}
+		base.transform.Rotate(a * Time.deltaTime);
+	}
+
+	public float Speed = 5f;
+
+	public bool RotateOnX = true;
+
+	public bool RotateOnY = true;
+
+	public bool RotateOnZ = true;
+}

+ 148 - 104
Assembly-CSharp/BaseKagManager.cs

@@ -961,7 +961,7 @@ public class BaseKagManager : IDisposable
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
 		string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -986,8 +986,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1022,10 +1028,10 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_28C:
+				IL_29C:
 				i++;
 				continue;
-				goto IL_28C;
+				goto IL_29C;
 			}
 		}
 		string axisbone = string.Empty;
@@ -1038,12 +1044,12 @@ public class BaseKagManager : IDisposable
 		{
 			do_animation = true;
 		}
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, false);
+		maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, IKCtrlData.IKExecTiming.Normal);
 		return false;
 	}
 
@@ -1064,7 +1070,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1090,8 +1096,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1126,10 +1138,10 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_27F:
+				IL_28F:
 				i++;
 				continue;
-				goto IL_27F;
+				goto IL_28F;
 			}
 		}
 		bool do_animation = false;
@@ -1137,12 +1149,12 @@ public class BaseKagManager : IDisposable
 		{
 			do_animation = true;
 		}
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, false);
+		maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, IKCtrlData.IKExecTiming.Normal);
 		return false;
 	}
 
@@ -1159,7 +1171,7 @@ public class BaseKagManager : IDisposable
 			return false;
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1203,7 +1215,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string odogu_name = tag_data.GetTagProperty("odogu").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1233,8 +1245,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1269,10 +1287,10 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_267:
+				IL_277:
 				i++;
 				continue;
-				goto IL_267;
+				goto IL_277;
 			}
 		}
 		bool do_animation = false;
@@ -1280,12 +1298,12 @@ public class BaseKagManager : IDisposable
 		{
 			do_animation = true;
 		}
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, false);
+		maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, IKCtrlData.IKExecTiming.Normal);
 		return false;
 	}
 
@@ -1306,7 +1324,7 @@ public class BaseKagManager : IDisposable
 		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string bone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1331,8 +1349,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1367,19 +1391,19 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_272:
+				IL_282:
 				i++;
 				continue;
-				goto IL_272;
+				goto IL_282;
 			}
 		}
 		bool do_animation = tag_data.IsValid("do_animation");
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, false);
+		maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, IKCtrlData.IKExecTiming.Normal);
 		return false;
 	}
 
@@ -1459,9 +1483,8 @@ public class BaseKagManager : IDisposable
 			maidAndMan.IKCtrl.BodyCtrlData.HeightFit = heightFit;
 		}
 		maidAndMan.IKCtrl.BodyCtrlData.PosBaseBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("srcbone").AsString());
-		maidAndMan.IKCtrl.BodyCtrlData.OffsetWorld = tag_data.IsValid("offset_world");
-		maidAndMan.IKCtrl.BodyCtrlData.OffsetBone = tag_data.IsValid("offset_bone");
-		maidAndMan.IKTargetToBone("体全体", maidAndMan2, tgtbone_name, zero, attach_type, search_sm, false, false);
+		maidAndMan.IKCtrl.BodyCtrlData.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+		maidAndMan.IKTargetToBone("体全体", maidAndMan2, tgtbone_name, zero, attach_type, search_sm, false, IKCtrlData.IKExecTiming.Normal);
 		return false;
 	}
 
@@ -1479,7 +1502,7 @@ public class BaseKagManager : IDisposable
 			return false;
 		}
 		string tag_name = tag_data.GetTagProperty("srcbone").AsString();
-		BipedIKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData<BipedIKCtrlData>(tag_name, false);
+		HandFootIKData ikdata = maidAndMan.IKCtrl.GetIKData<HandFootIKData>(tag_name);
 		if (tag_data.IsValid("correctbone"))
 		{
 			ikdata.ToCorrectBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("correctbone").AsString());
@@ -1490,7 +1513,7 @@ public class BaseKagManager : IDisposable
 		{
 			weight = tag_data.GetTagProperty("bendweight").AsReal();
 		}
-		BipedIKCtrlData.BorderCorrectData borderCorrectData;
+		HandFootIKData.BorderCorrectData borderCorrectData;
 		if (text.Contains("Floor"))
 		{
 			borderCorrectData = ikdata.FloorCorrect;
@@ -1509,11 +1532,7 @@ public class BaseKagManager : IDisposable
 		}
 		if (tag_data.IsValid("correcttype"))
 		{
-			ikdata.CorrectType = (BipedIKCtrlData.BorderCorrectType)Enum.Parse(typeof(BipedIKCtrlData.BorderCorrectType), tag_data.GetTagProperty("correcttype").AsString());
-			if (ikdata.CorrectType == BipedIKCtrlData.BorderCorrectType.HalfBody)
-			{
-				ikdata.RootEffector.positionWeight = 1f;
-			}
+			ikdata.CorrectType = (HandFootIKData.BorderCorrectType)Enum.Parse(typeof(HandFootIKData.BorderCorrectType), tag_data.GetTagProperty("correcttype").AsString());
 		}
 		ikdata.Chain.bendConstraint.weight = weight;
 		borderCorrectData.Enable = true;
@@ -1526,25 +1545,6 @@ public class BaseKagManager : IDisposable
 
 	public bool TagIKBendBoneCtrl(KagTagSupport tag_data)
 	{
-		this.CheckAbsolutelyNecessaryTag(tag_data, "ikbendbonectrl", new string[]
-		{
-			"src",
-			"srcbone",
-			"flagobj"
-		});
-		Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
-		if (maidAndMan == null)
-		{
-			return false;
-		}
-		string tag_name = tag_data.GetTagProperty("srcbone").AsString();
-		BipedIKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData<BipedIKCtrlData>(tag_name, false);
-		if (!ikdata)
-		{
-			return false;
-		}
-		string bendweightCtrl = tag_data.GetTagProperty("flagobj").AsString();
-		ikdata.SetBendweightCtrl(bendweightCtrl);
 		return false;
 	}
 
@@ -1562,7 +1562,7 @@ public class BaseKagManager : IDisposable
 			return false;
 		}
 		string tag_name = tag_data.GetTagProperty("srcbone").AsString();
-		IKCtrlData ik_data = maidAndMan.IKCtrl.GetIKData(tag_name, false);
+		IKCtrlData ik_data = maidAndMan.IKCtrl.GetIKData(tag_name);
 		if (!ik_data)
 		{
 			return false;
@@ -1610,10 +1610,15 @@ public class BaseKagManager : IDisposable
 		{
 			return false;
 		}
+		IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
+		if (tag_data.IsValid("exectiming"))
+		{
+			timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
+		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
 		string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1638,8 +1643,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1674,10 +1685,10 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_28C:
+				IL_2D4:
 				i++;
 				continue;
-				goto IL_28C;
+				goto IL_2D4;
 			}
 		}
 		string axisbone = string.Empty;
@@ -1690,12 +1701,12 @@ public class BaseKagManager : IDisposable
 		{
 			do_animation = true;
 		}
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, true);
+		maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, timing);
 		return false;
 	}
 
@@ -1714,9 +1725,14 @@ public class BaseKagManager : IDisposable
 		{
 			return false;
 		}
+		IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
+		if (tag_data.IsValid("exectiming"))
+		{
+			timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
+		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1742,8 +1758,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1778,10 +1800,10 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_27F:
+				IL_2C7:
 				i++;
 				continue;
-				goto IL_27F;
+				goto IL_2C7;
 			}
 		}
 		bool do_animation = false;
@@ -1789,12 +1811,12 @@ public class BaseKagManager : IDisposable
 		{
 			do_animation = true;
 		}
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, true);
+		maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, timing);
 		return false;
 	}
 
@@ -1811,9 +1833,14 @@ public class BaseKagManager : IDisposable
 		{
 			return false;
 		}
+		IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
+		if (tag_data.IsValid("exectiming"))
+		{
+			timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
+		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string odogu_name = tag_data.GetTagProperty("odogu").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1843,8 +1870,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1879,10 +1912,10 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_267:
+				IL_2B6:
 				i++;
 				continue;
-				goto IL_267;
+				goto IL_2B6;
 			}
 		}
 		bool do_animation = false;
@@ -1890,12 +1923,12 @@ public class BaseKagManager : IDisposable
 		{
 			do_animation = true;
 		}
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, true);
+		maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, timing);
 		return false;
 	}
 
@@ -1914,9 +1947,14 @@ public class BaseKagManager : IDisposable
 		{
 			return false;
 		}
+		IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
+		if (tag_data.IsValid("exectiming"))
+		{
+			timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
+		}
 		string text = tag_data.GetTagProperty("srcbone").AsString();
 		string bone_name = tag_data.GetTagProperty("targetbone").AsString();
-		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
+		IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
 		if (!ikdata)
 		{
 			return false;
@@ -1941,8 +1979,14 @@ public class BaseKagManager : IDisposable
 		}
 		if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
 		{
-			ikdata.OffsetWorld = tag_data.IsValid("offset_world");
-			ikdata.OffsetBone = tag_data.IsValid("offset_bone");
+			if (tag_data.IsValid("offset_world"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
+			}
+			else if (tag_data.IsValid("offset_bone"))
+			{
+				ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
+			}
 		}
 		ikdata.GetIKEnable(ikattachType).Recet();
 		if (tag_data.IsValid("disable"))
@@ -1977,19 +2021,19 @@ public class BaseKagManager : IDisposable
 						ikdata.GetIKEnable(ikattachType).EnableX = false;
 					}
 				}
-				IL_272:
+				IL_2BA:
 				i++;
 				continue;
-				goto IL_272;
+				goto IL_2BA;
 			}
 		}
 		bool do_animation = tag_data.IsValid("do_animation");
-		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is BipedIKCtrlData)
+		if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
 		{
-			BipedIKCtrlData bipedIKCtrlData = ikdata as BipedIKCtrlData;
-			bipedIKCtrlData.SetPullState(!tag_data.IsValid("pull_off"));
+			HandFootIKData handFootIKData = ikdata as HandFootIKData;
+			handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
 		}
-		maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, true);
+		maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, timing);
 		return false;
 	}
 
@@ -5424,7 +5468,7 @@ public class BaseKagManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_KAG");
-		binary.Write(1310);
+		binary.Write(1320);
 		byte[] array = this.kag_.Serialize();
 		int value = array.Length;
 		binary.Write(value);

+ 1 - 1
Assembly-CSharp/BasePhotoCustomObject.cs

@@ -173,7 +173,7 @@ public abstract class BasePhotoCustomObject : MonoBehaviour, IComparable<BasePho
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write("COM3D2_PHOTO_CUSTOM_OBJECT");
-				binaryWriter.Write(1310);
+				binaryWriter.Write(1320);
 				binaryWriter.Write(this.type.ToString());
 				binaryWriter.Write(this.scale_);
 				binaryWriter.Write(this.enabledTextureColor_);

+ 1 - 1
Assembly-CSharp/BasePhotoWindowManager.cs

@@ -153,7 +153,7 @@ public abstract class BasePhotoWindowManager : MonoBehaviour
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write(this.save_header_uidata);
-				binaryWriter.Write(1310);
+				binaryWriter.Write(1320);
 				binaryWriter.Write(this.save_data_.Count);
 				foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair3 in this.save_data_)
 				{

+ 17 - 17
Assembly-CSharp/BenchSetting.cs

@@ -40,29 +40,29 @@ public class BenchSetting : MonoBehaviour
 		this.LoadOrijinData();
 		Action<string> action = delegate(string file_path)
 		{
-			string text = string.Empty;
+			string text3 = string.Empty;
 			float num = -1f;
 			FileInfo fileInfo = new FileInfo(file_path);
 			try
 			{
 				using (StreamReader streamReader = new StreamReader(fileInfo.OpenRead(), Encoding.UTF8))
 				{
-					text = streamReader.ReadLine();
-					if (text == "@Bench_Setting")
+					text3 = streamReader.ReadLine();
+					if (text3 == "@Bench_Setting")
 					{
-						string text2 = streamReader.ReadLine();
-						if (text2.IndexOf(":") >= 0)
+						string text4 = streamReader.ReadLine();
+						if (text4.IndexOf(":") >= 0)
 						{
-							text2 = text2.Split(new char[]
+							text4 = text4.Split(new char[]
 							{
 								':'
 							})[1];
 						}
 						else
 						{
-							text2 = 1.1f.ToString();
+							text4 = 1.1f.ToString();
 						}
-						float.TryParse(text2, out num);
+						float.TryParse(text4, out num);
 						string json = streamReader.ReadLine();
 						BenchSetting.m_UseSetting = JsonUtility.FromJson<BenchSetting.SettingItems>(json);
 					}
@@ -71,7 +71,7 @@ public class BenchSetting : MonoBehaviour
 			}
 			catch (Exception ex)
 			{
-				if (string.IsNullOrEmpty(text) || text != "@Bench_Setting")
+				if (string.IsNullOrEmpty(text3) || text3 != "@Bench_Setting")
 				{
 					Debug.Log("ヘッダー書き込み前のデータです");
 				}
@@ -89,18 +89,18 @@ public class BenchSetting : MonoBehaviour
 			}
 			this.UpdateSettingUI(BenchSetting.m_UseSetting);
 		};
-		string fullPath = Path.GetFullPath(".\\benchmark_setting.dat");
-		if (File.Exists(fullPath))
+		string text = UTY.gameProjectPath + "\\benchmark_setting.dat";
+		if (File.Exists(text))
 		{
-			action(fullPath);
+			action(text);
 		}
 		else
 		{
-			string fullPath2 = Path.GetFullPath(".\\benchmark_setting.set");
-			if (File.Exists(fullPath2))
+			string text2 = UTY.gameProjectPath + "\\benchmark_setting.set";
+			if (File.Exists(text2))
 			{
-				action(fullPath2);
-				File.Delete(fullPath2);
+				action(text2);
+				File.Delete(text2);
 			}
 		}
 		NDebug.Assert(GameMain.Instance.ScriptMgr.adv_kag.tag_backup.ContainsKey("label"), "実行時に飛ぶラベルが未指定です");
@@ -126,7 +126,7 @@ public class BenchSetting : MonoBehaviour
 		{
 			BenchSetting.SettingRecet();
 		}
-		FileInfo fileInfo = new FileInfo(Path.GetFullPath(".\\benchmark_setting.dat"));
+		FileInfo fileInfo = new FileInfo(UTY.gameProjectPath + "\\benchmark_setting.dat");
 		using (StreamWriter streamWriter = new StreamWriter(fileInfo.Create()))
 		{
 			streamWriter.WriteLine("@Bench_Setting");

+ 3 - 3
Assembly-CSharp/BigThumbnail.cs

@@ -111,8 +111,8 @@ public class BigThumbnail : MonoBehaviour
 
 	private void CheckCreateFrame()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Thumb";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Thumb";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -136,7 +136,7 @@ public class BigThumbnail : MonoBehaviour
 	private void LoadFrameAndBG()
 	{
 		this.CheckCreateFrame();
-		string str = Path.GetFullPath(".\\") + "Thumb";
+		string str = UTY.gameProjectPath + "\\Thumb";
 		string f_strFileName = str + "/frame_back.png";
 		if (this.bg_sprite_.sprite2D == null)
 		{

+ 0 - 396
Assembly-CSharp/BipedIKCtrlData.cs

@@ -1,396 +0,0 @@
-using System;
-using System.Linq;
-using RootMotion.FinalIK;
-using UnityEngine;
-
-[Serializable]
-public class BipedIKCtrlData : IKCtrlData
-{
-	public BipedIKCtrlData(IKEffector effector, FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone, IKEffector sub_effector, bool use_old = false) : base(ik_ctrl, tgt_bone, use_old, false)
-	{
-		this.Effector = effector;
-		this.Effector.target = base.IKTarget;
-		this.Chain = chain;
-		this.IKMapping = ik_mapping;
-		this.RootEffector = sub_effector;
-		Transform transform = this.CreateSubTarget("BendBone");
-		this.m_BoneBendGoal = new IKCtrlData.BoneTgtPair(this.Chain.bendConstraint.bone2, transform);
-		this.Chain.bendConstraint.bendGoal = transform;
-		this.Chain.bendConstraint.weight = 1f;
-		this.RootEffector.target = this.CreateSubTarget("ChainRootBone");
-		this.m_RootBoneTgtPair = new IKCtrlData.BoneTgtPair(this.RootEffector.bone, this.RootEffector.target);
-		this.m_ForceIKEnable = true;
-		this.ToCorrectBone = this.TargetBone;
-		this.m_BendweitCtrl.Axis = Vector3.up;
-	}
-
-	public Transform BendBone
-	{
-		get
-		{
-			return this.m_BoneBendGoal.Bone;
-		}
-	}
-
-	public Transform RootBone
-	{
-		get
-		{
-			return this.m_RootBoneTgtPair.Bone;
-		}
-	}
-
-	public IKCtrlData.ChangeFlagData BendweightCtrl
-	{
-		get
-		{
-			return this.m_BendweitCtrl;
-		}
-	}
-
-	public override Transform TargetBone
-	{
-		get
-		{
-			if (this.IsRootIK)
-			{
-				return this.RootBone;
-			}
-			if (this.IsBendIK)
-			{
-				return this.BendBone;
-			}
-			return base.TargetBone;
-		}
-	}
-
-	public override Transform[] ChainBones
-	{
-		get
-		{
-			return (from node in this.Chain.nodes
-			select node.transform).ToArray<Transform>();
-		}
-	}
-
-	public override float PositionWeight
-	{
-		get
-		{
-			return this.Effector.positionWeight;
-		}
-		set
-		{
-			this.Effector.positionWeight = value;
-		}
-	}
-
-	public override float RotationWeight
-	{
-		get
-		{
-			return this.Effector.rotationWeight;
-		}
-		set
-		{
-			this.Effector.rotationWeight = value;
-		}
-	}
-
-	private Transform CreateSubTarget(string name)
-	{
-		Transform transform = base.IKTarget.parent.Find(name);
-		if (!transform)
-		{
-			transform = new GameObject(name).transform;
-			transform.SetParent(base.IKTarget.parent, false);
-		}
-		return transform;
-	}
-
-	private void CheckBorder(BipedIKCtrlData.BorderCorrectData correctData)
-	{
-		if (!correctData.Enable)
-		{
-			return;
-		}
-		float num = 0f;
-		Vector3 check_pos = this.ToCorrectBone.position + this.MyIKCtrl.BodyCtrlData.BodyOffset;
-		if (correctData.CheckBorder(check_pos, ref num))
-		{
-			switch (this.CorrectType)
-			{
-			case BipedIKCtrlData.BorderCorrectType.Bone:
-				base.IKTarget.position += correctData.Axis * num;
-				this.m_BoneBendGoal.Target.position += correctData.Axis * num;
-				if (this.PositionWeight == 0f)
-				{
-					this.PositionWeight = 1f;
-					base.PointIK.IsIKExec = true;
-				}
-				break;
-			case BipedIKCtrlData.BorderCorrectType.HalfBody:
-				base.IKTarget.position += correctData.Axis * num;
-				this.m_BoneBendGoal.Target.position += correctData.Axis * num;
-				this.m_RootBoneTgtPair.Target.position += correctData.Axis * num;
-				if (this.PositionWeight == 0f)
-				{
-					this.PositionWeight = 1f;
-					base.PointIK.IsIKExec = true;
-				}
-				break;
-			case BipedIKCtrlData.BorderCorrectType.Chara:
-				if (correctData.GetValue(this.MyIKCtrl.BodyCtrlData.AddOffset) < num)
-				{
-					this.MyIKCtrl.BodyCtrlData.SetAddOffset(correctData.Axis * num);
-				}
-				break;
-			case BipedIKCtrlData.BorderCorrectType.All:
-				if (correctData.GetValue(this.MyIKCtrl.BodyCtrlData.AllOffset) < num)
-				{
-					this.MyIKCtrl.BodyCtrlData.SetAllOffset(correctData.Axis * num);
-				}
-				break;
-			}
-		}
-	}
-
-	protected override void SetTargetTransform(IKCtrlData.IKParam data, Vector3 pos, Quaternion rot)
-	{
-		base.SetTargetTransform(data, pos, rot);
-		Transform target = this.m_BoneBendGoal.Target;
-		Transform target2 = this.m_RootBoneTgtPair.Target;
-		if (this.IsRootIK || this.IsBendIK)
-		{
-			Vector3 position = target2.InverseTransformPoint(target.position);
-			Vector3 position2 = this.m_BoneBendGoal.Bone.InverseTransformPoint(base.TargetBone.position);
-			if (this.IsRootIK)
-			{
-				if (data.IsPointAttach)
-				{
-					this.RootEffector.positionWeight = this.PositionWeight;
-					target2.position = base.IKTarget.position;
-				}
-				else
-				{
-					this.RootEffector.rotationWeight = this.RotationWeight;
-					target2.rotation = base.IKTarget.rotation;
-					target.rotation = target2.rotation * this.m_BoneBendGoal.Bone.localRotation;
-					base.IKTarget.rotation = target.rotation * base.TargetBone.localRotation;
-				}
-				target.position = target2.TransformPoint(position);
-				base.IKTarget.position = target.TransformPoint(position2);
-			}
-			else
-			{
-				if (data.IsPointAttach)
-				{
-					this.Chain.bendConstraint.weight = this.PositionWeight;
-					this.RootEffector.positionWeight = (this.RootEffector.rotationWeight = this.PositionWeight);
-					target2.rotation = Quaternion.FromToRotation(target.position - target2.position, base.IKTarget.position - target2.position) * target2.rotation;
-					Vector3 b = base.IKTarget.position - target2.TransformPoint(position);
-					target2.position += b;
-					target.position = base.IKTarget.position;
-				}
-				else
-				{
-					target.rotation = base.IKTarget.rotation;
-					base.IKTarget.rotation = target.rotation * base.TargetBone.localRotation;
-				}
-				base.IKTarget.position = this.m_BoneBendGoal.Target.TransformPoint(position2);
-			}
-		}
-		else if (data.IsPointAttach)
-		{
-			Vector3 vector = this.m_BoneBendGoal.Bone.position - this.TargetBone.position;
-			Vector3 vector2 = this.m_RootBoneTgtPair.Bone.position - this.m_BoneBendGoal.Bone.position;
-			float f = Vector3.Dot(vector.normalized, vector2.normalized);
-			float num = Mathf.Acos(f) * 57.29578f;
-			float num2 = Mathf.Clamp01(num / this.m_BendFadeBorder);
-			this.Chain.bendConstraint.weight = num2 * this.PositionWeight;
-			Vector3 position3 = this.TargetBone.InverseTransformPoint(this.m_RootBoneTgtPair.Bone.position);
-			target2.position = base.IKTarget.TransformPoint(position3);
-			Vector3 position4 = this.TargetBone.InverseTransformPoint(this.m_BoneBendGoal.Bone.position);
-			Vector3 position5 = base.IKTarget.TransformPoint(position4);
-			target.position = position5;
-		}
-	}
-
-	public void SetBendweightCtrl(string name)
-	{
-		if (this.MyIKCtrl.TgtMaid.boMAN)
-		{
-			this.BendweightCtrl.Target = this.MyIKCtrl.TgtBody.GetBone(name);
-		}
-		else
-		{
-			this.BendweightCtrl.Target = this.MyIKCtrl.GetSTFlagObj(name);
-		}
-	}
-
-	public override void ApplyIKSetting()
-	{
-		this.m_BoneBendGoal.Cppy();
-		this.m_RootBoneTgtPair.Cppy();
-		this.Chain.bendConstraint.weight = 0f;
-		this.RootEffector.positionWeight = 0f;
-		this.RootEffector.rotationWeight = 0f;
-		if (!base.PointIK.IsIKExec && !base.PointFlagData.IsEnable && (this.FloorCorrect.Enable || this.WallCorrect.Enable))
-		{
-			base.ForceIK = true;
-		}
-		base.ApplyIKSetting();
-		this.CheckBorder(this.WallCorrect);
-		this.CheckBorder(this.FloorCorrect);
-		if (!this.IsBendIK && !this.IsRootIK && this.m_BendweitCtrl.IsEnable)
-		{
-			this.Chain.bendConstraint.weight = 1f - this.m_BendweitCtrl.Value01();
-		}
-	}
-
-	public void SetPullState(bool pull_on)
-	{
-		if (this.m_OrijinPull < 0f)
-		{
-			this.m_OrijinPull = this.Chain.pull;
-		}
-		if (pull_on)
-		{
-			this.Chain.pull = this.m_OrijinPull;
-		}
-		else
-		{
-			this.Chain.pull = 0.1f;
-		}
-	}
-
-	public override void SetIKSetting(IKCtrlData.IKAttachType attachType, bool is_next, Maid tgt_maid, int slot_no, string attach_name, Transform axis_bone, Transform target, Vector3 f_vecOffset, bool do_animation = false)
-	{
-		base.SetIKSetting(attachType, is_next, tgt_maid, slot_no, attach_name, axis_bone, target, f_vecOffset, do_animation);
-		if (this.IsRootIK)
-		{
-			base.BlendPosRot.Copy(this.m_lastRootPosRot);
-		}
-		else if (this.IsBendIK)
-		{
-			base.BlendPosRot.Copy(this.m_lastBendPosRot);
-		}
-	}
-
-	public override void Detach(IKCtrlData.IKAttachType attachType)
-	{
-		base.Detach(attachType);
-		this.IsRootIK = (this.IsBendIK = false);
-		this.RootEffector.positionWeight = 0f;
-		this.RootEffector.rotationWeight = 0f;
-		this.m_BoneBendGoal.PosOffset = Vector3.zero;
-		this.m_RootBoneTgtPair.PosOffset = Vector3.zero;
-		this.WallCorrect.Reset();
-		this.FloorCorrect.Reset();
-		this.ToCorrectBone = this.TargetBone;
-		this.CorrectType = BipedIKCtrlData.BorderCorrectType.Bone;
-		this.m_BendweitCtrl.Reset();
-	}
-
-	public override void SetTargetOffset(Vector3 offset, bool inverse = false)
-	{
-		if (base.IsIKExec)
-		{
-			return;
-		}
-		base.SetTargetOffset(offset, inverse);
-		this.m_BoneBendGoal.PosOffset = this.m_OffsetEnable.GetEnable(offset, inverse);
-		this.m_RootBoneTgtPair.PosOffset = this.m_OffsetEnable.GetEnable(offset, inverse);
-	}
-
-	public override void LateUpdate()
-	{
-		base.LateUpdate();
-		this.m_lastBendPosRot.Copy(this.m_BoneBendGoal.Bone);
-		this.m_lastRootPosRot.Copy(this.m_RootBoneTgtPair.Bone);
-	}
-
-	private const float PULL_MIN_VALUE = 0.1f;
-
-	private IKCtrlData.BoneTgtPair m_BoneBendGoal;
-
-	private IKCtrlData.PosRotPair m_lastBendPosRot = new IKCtrlData.PosRotPair();
-
-	private IKCtrlData.ChangeFlagData m_BendweitCtrl = new IKCtrlData.ChangeFlagData();
-
-	private IKCtrlData.BoneTgtPair m_RootBoneTgtPair;
-
-	private IKCtrlData.PosRotPair m_lastRootPosRot = new IKCtrlData.PosRotPair();
-
-	private float m_OrijinPull = -1f;
-
-	[Header("壁・床補正情報")]
-	public BipedIKCtrlData.BorderCorrectData WallCorrect = new BipedIKCtrlData.BorderCorrectData(Vector3.forward);
-
-	public BipedIKCtrlData.BorderCorrectData FloorCorrect = new BipedIKCtrlData.BorderCorrectData(Vector3.up);
-
-	public BipedIKCtrlData.BorderCorrectType CorrectType;
-
-	public Transform ToCorrectBone;
-
-	[Header("肘・膝をターゲットに合わせるフラグ")]
-	public bool IsBendIK;
-
-	[Header("肩・太ももをターゲットに合わせるフラグ")]
-	public bool IsRootIK;
-
-	[SerializeField]
-	[Space]
-	[Range(1f, 90f)]
-	private float m_BendFadeBorder = 30f;
-
-	public readonly IKEffector Effector;
-
-	public readonly FBIKChain Chain;
-
-	public readonly IKMappingLimb IKMapping;
-
-	public readonly IKEffector RootEffector;
-
-	public enum BorderCorrectType
-	{
-		Bone,
-		HalfBody,
-		Chara,
-		All
-	}
-
-	[Serializable]
-	public class BorderCorrectData
-	{
-		public BorderCorrectData(Vector3 axis)
-		{
-			this.Axis = axis;
-		}
-
-		public void Reset()
-		{
-			this.Border = 0f;
-			this.Enable = false;
-		}
-
-		public float GetValue(Vector3 pos)
-		{
-			pos = KasaiUtility.Vec3Multiply(pos, this.Axis);
-			return pos.magnitude * Vector3.Dot(this.Axis, pos.normalized);
-		}
-
-		public bool CheckBorder(Vector3 check_pos, ref float diff)
-		{
-			float value = this.GetValue(check_pos);
-			diff = this.Border - value;
-			return value < this.Border;
-		}
-
-		public float Border;
-
-		public bool Enable;
-
-		public Vector3 Axis;
-	}
-}

+ 36 - 105
Assembly-CSharp/BodyCtrlData.cs

@@ -4,57 +4,31 @@ using UnityEngine;
 [Serializable]
 public class BodyCtrlData : IKCtrlData
 {
-	public BodyCtrlData(FullBodyIKCtrl ik_ctrl) : base(ik_ctrl, ik_ctrl.GetIKBone(IKManager.BoneType.Root), false, false)
+	public BodyCtrlData(FullBodyIKCtrl ik_ctrl) : base(ik_ctrl, ik_ctrl.GetIKBone(FullBodyIKCtrl.IKBoneType.Root), false, false)
 	{
 		this.PosBaseBone = this.TargetBone;
+		this.m_ChainBones = new Transform[]
+		{
+			this.TargetBone
+		};
 		this.m_ForceIKEnable = false;
 	}
 
-	public Vector3 OrijinMaidPos { get; private set; }
-
-	public Vector3 OrijinAllPos { get; private set; }
-
-	public bool DoAllOffset { get; private set; }
+	public bool IsDoSetCharaPos { get; private set; }
 
-	public Vector3 BodyOffset
-	{
-		get
-		{
-			return this.m_PosOffset + this.m_AddOffset;
-		}
-	}
+	public Vector3 OrijinMaidPos { get; private set; }
 
-	public Vector3 AllOffset
-	{
-		get
-		{
-			return this.m_AllOffset;
-		}
-	}
+	public override float PositionWeight { get; set; }
 
-	public Vector3 AddOffset
-	{
-		get
-		{
-			return this.m_AddOffset;
-		}
-	}
+	public override float RotationWeight { get; set; }
 
-	public override Transform[] ChainBones
+	public override void ApplyIKSetting()
 	{
-		get
-		{
-			return new Transform[]
-			{
-				this.MyIKCtrl.GetIKBone(IKManager.BoneType.Root)
-			};
-		}
+		this.OrijinMaidPos = this.MyIKCtrl.TgtChara.GetPos();
+		this.m_PosOffset = Vector3.zero;
+		base.ApplyIKSetting();
 	}
 
-	public override float PositionWeight { get; set; }
-
-	public override float RotationWeight { get; set; }
-
 	private bool CheckDoIK()
 	{
 		if (!base.IsIKExec)
@@ -65,16 +39,17 @@ public class BodyCtrlData : IKCtrlData
 		{
 			return true;
 		}
-		int value = this.MyIKCtrl.TgtMaid.GetProp(MPN.sintyou).value;
-		int value2 = base.PointIK.TgtMaid.GetProp(MPN.sintyou).value;
+		int num = this.MyIKCtrl.TgtChara.GetProp(MPN.sintyou).value + this.MyIKCtrl.TgtChara.GetProp(MPN.DouPer).value;
+		Maid tgtChara = base.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).curTargetData.TgtChara;
+		int num2 = tgtChara.GetProp(MPN.sintyou).value + tgtChara.GetProp(MPN.DouPer).value;
 		if (this.HeightFit == BodyCtrlData.HeightFitType.Higher)
 		{
-			return value < value2;
+			return num > num2;
 		}
-		return value > value2;
+		return num < num2;
 	}
 
-	protected override void SetTargetTransform(IKCtrlData.IKParam data, Vector3 pos, Quaternion rot)
+	protected override void SetTargetTransform(IKCtrlData.IKSettingData data, Vector3 pos, Quaternion rot)
 	{
 		if (!data.IsPointAttach || !this.CheckDoIK())
 		{
@@ -86,112 +61,68 @@ public class BodyCtrlData : IKCtrlData
 		}
 		Vector3 b = (!data.BlendNow) ? this.m_FirstBonePos : this.PosBaseBone.position;
 		pos = ((!data.BlendNow) ? this.m_FirstTgtPosRot.pos : pos);
-		if (!data.DoSetOffset)
-		{
-			if (this.OffsetWorld)
-			{
-				base.IKTarget.position = pos + data.TgtOffset;
-			}
-			else if (this.OffsetBone)
-			{
-				KasaiUtility.DrawAxis(pos, this.TargetBone.rotation, 0.0625f);
-				base.IKTarget.position = pos + this.TargetBone.rotation * data.TgtOffset;
-			}
-			else
-			{
-				base.IKTarget.position = pos + rot * data.TgtOffset;
-			}
-			Debug.DrawLine(pos, base.IKTarget.position, Color.white);
-		}
+		base.SetTargetTransform(data, pos, rot);
 		Vector3 enable = this.m_OffsetEnable.GetEnable(base.IKTarget.position - b, false);
 		if (data.BlendType == IKCtrlData.IKBlendType.IK_To_IK)
 		{
-			this.m_PosOffset += Vector3.Lerp(this.m_lastPosOffset, enable, data.BlendWeight);
+			this.m_PosOffset = Vector3.Lerp(this.m_lastPosOffset, enable, data.BlendWeight);
 		}
 		else if (data.BlendType == IKCtrlData.IKBlendType.IK_To_Detach)
 		{
-			this.m_PosOffset += Vector3.Lerp(Vector3.zero, enable, 1f - data.BlendWeight);
+			this.m_PosOffset = Vector3.Lerp(Vector3.zero, this.m_lastPosOffset, 1f - data.BlendWeight);
 		}
 		else
 		{
-			this.m_PosOffset += Vector3.Lerp(Vector3.zero, enable, data.BlendWeight);
+			this.m_PosOffset = Vector3.Lerp(Vector3.zero, enable, data.BlendWeight);
 		}
 		this.PositionWeight = data.BlendWeight;
 	}
 
-	public void SetAllOffset(Vector3 offset)
+	public override void Update()
 	{
-		if (!base.IsIKExec)
+		if (!this.CheckDoIK())
 		{
-			base.PointIK.IsIKExec = true;
-			this.PositionWeight = 1f;
+			return;
 		}
-		this.DoAllOffset = true;
-		this.m_AllOffset = offset;
+		this.SetPosOffset(this.m_PosOffset);
 	}
 
-	public void SetAddOffset(Vector3 offset)
+	public void SetPosOffset(Vector3 offset)
 	{
 		if (!base.IsIKExec)
 		{
 			base.PointIK.IsIKExec = true;
 			this.PositionWeight = 1f;
 		}
-		this.m_AddOffset = offset;
+		this.IsDoSetCharaPos = true;
+		Vector3 pos = this.MyIKCtrl.TgtChara.GetPos();
+		this.MyIKCtrl.TgtChara.SetPos(pos + offset * this.PositionWeight);
 	}
 
-	public override void ApplyIKSetting()
+	public void CharaPosReset()
 	{
-		this.m_AddOffset = Vector3.zero;
-		this.DoAllOffset = false;
-		this.m_PosOffset = this.OrijinMaidPos;
-		this.m_AllOffset = this.OrijinAllPos;
-		base.ApplyIKSetting();
-	}
-
-	public override void SetIKSetting(IKCtrlData.IKAttachType attachType, bool is_another, Maid tgt_maid, int slot_no, string attach_name, Transform axis_bone, Transform target, Vector3 f_vecOffset, bool do_animation)
-	{
-		this.OrijinMaidPos = this.MyIKCtrl.TgtMaid.GetPos();
-		this.OrijinAllPos = GameMain.Instance.CharacterMgr.GetCharaAllPos();
-		base.SetIKSetting(attachType, is_another, tgt_maid, slot_no, attach_name, axis_bone, target, f_vecOffset, do_animation);
-	}
-
-	public override void Update()
-	{
-		if (this.DoAllOffset)
-		{
-			GameMain.Instance.CharacterMgr.SetCharaAllPos(this.m_AllOffset);
-		}
-		if (!this.CheckDoIK())
+		if (this.IsDoSetCharaPos)
 		{
-			return;
+			this.MyIKCtrl.TgtChara.SetPos(this.OrijinMaidPos);
 		}
-		this.MyIKCtrl.TgtMaid.SetPos(this.BodyOffset);
+		this.IsDoSetCharaPos = false;
 	}
 
 	public override void Detach(IKCtrlData.IKAttachType attachType)
 	{
-		this.m_lastPosOffset = this.m_PosOffset - this.OrijinMaidPos;
+		this.m_lastPosOffset = this.m_PosOffset;
 		base.Detach(attachType);
 		base.BlendPosRot.Copy(this.PosBaseBone);
-		this.m_AddOffset = Vector3.zero;
 		this.HeightFit = BodyCtrlData.HeightFitType.None;
-		this.OrijinMaidPos = this.MyIKCtrl.TgtMaid.GetPos();
-		this.OrijinAllPos = GameMain.Instance.CharacterMgr.GetCharaAllPos();
 	}
 
 	[SerializeField]
 	private Vector3 m_PosOffset = Vector3.zero;
 
-	private Vector3 m_AddOffset = Vector3.zero;
-
 	private Vector3 m_FirstBonePos = Vector3.zero;
 
 	private Vector3 m_lastPosOffset = Vector3.zero;
 
-	[SerializeField]
-	private Vector3 m_AllOffset = Vector3.zero;
-
 	public Transform PosBaseBone;
 
 	public BodyCtrlData.HeightFitType HeightFit = BodyCtrlData.HeightFitType.None;

+ 0 - 63
Assembly-CSharp/CCDIKCtrlData.cs

@@ -1,63 +0,0 @@
-using System;
-using System.Linq;
-using RootMotion.FinalIK;
-using UnityEngine;
-
-[Serializable]
-public class CCDIKCtrlData : IKCtrlData
-{
-	public CCDIKCtrlData(CCDIK ccd_ik, Transform[] chain_bones, FullBodyIKCtrl ik_ctrl, bool weight_fade = true, bool attach_ik = false) : base(ik_ctrl, chain_bones.Last<Transform>(), false, attach_ik)
-	{
-		this.CCDIK = ccd_ik;
-		this.CCDIK.fixTransforms = false;
-		this.IKSolver.target = base.IKTarget;
-		this.IKSolver.useRotationLimits = false;
-		this.IKSolver.maxIterations = 4;
-		this.IKSolver.Initiate(chain_bones[0]);
-		this.IKSolver.SetChain(chain_bones, chain_bones[0]);
-		if (weight_fade)
-		{
-			this.IKSolver.FadeOutBoneWeights();
-		}
-		this.CCDIK.enabled = false;
-		this.m_ForceIKEnable = false;
-	}
-
-	public IKSolverCCD IKSolver
-	{
-		get
-		{
-			return this.CCDIK.solver;
-		}
-	}
-
-	public override Transform[] ChainBones
-	{
-		get
-		{
-			return (from bone in this.IKSolver.bones
-			select bone.transform).ToArray<Transform>();
-		}
-	}
-
-	public override float PositionWeight
-	{
-		get
-		{
-			return this.IKSolver.IKPositionWeight;
-		}
-		set
-		{
-			this.IKSolver.IKPositionWeight = value;
-		}
-	}
-
-	public override float RotationWeight { get; set; }
-
-	public override void Update()
-	{
-		this.CCDIK.solver.Update();
-	}
-
-	public readonly CCDIK CCDIK;
-}

+ 10 - 10
Assembly-CSharp/CMSystem.cs

@@ -855,7 +855,7 @@ public class CMSystem
 	{
 		XElement xelement = new XElement("Config", new object[]
 		{
-			new XAttribute("Version", 1310),
+			new XAttribute("Version", 1320),
 			new XElement("System", new XElement("SysButtonShowAlways", this.SysButtonShowAlways)),
 			new XElement("Screen", new object[]
 			{
@@ -952,7 +952,7 @@ public class CMSystem
 			new XComment("CM3D2 Config"),
 			xelement
 		});
-		string text = Path.GetFullPath(".\\");
+		string text = UTY.gameProjectPath + "\\";
 		if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
 		{
 			text += "config.xml";
@@ -967,7 +967,7 @@ public class CMSystem
 
 	public bool LoadIni()
 	{
-		string text = Path.GetFullPath(".\\");
+		string text = UTY.gameProjectPath + "\\";
 		if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
 		{
 			text += "config.xml";
@@ -1203,7 +1203,7 @@ public class CMSystem
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_SYSTEM2");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		binaryWriter.Write(this.m_dicEditColorPresetData.Count);
 		foreach (KeyValuePair<int, Dictionary<string, int>> keyValuePair in this.m_dicEditColorPresetData)
 		{
@@ -1221,21 +1221,21 @@ public class CMSystem
 			binaryWriter.Write(keyValuePair3.Key);
 			binaryWriter.Write(keyValuePair3.Value);
 		}
-		File.WriteAllBytes(Path.GetFullPath(".\\") + "system.dat", memoryStream.ToArray());
+		File.WriteAllBytes(UTY.gameProjectPath + "\\system.dat", memoryStream.ToArray());
 		memoryStream.Dispose();
 		memoryStream = null;
 	}
 
 	public bool LoadSystem()
 	{
-		string path = Path.GetFullPath(".\\") + "system.dat";
+		string path = UTY.gameProjectPath + "\\system.dat";
 		if (File.Exists(path))
 		{
 			try
 			{
 				this.m_dicEditColorPresetData.Clear();
 				this.m_SystemVers.Clear();
-				using (FileStream fileStream = new FileStream(Path.GetFullPath(".\\") + "system.dat", FileMode.Open))
+				using (FileStream fileStream = new FileStream(UTY.gameProjectPath + "\\system.dat", FileMode.Open))
 				{
 					BinaryReader binaryReader = new BinaryReader(fileStream);
 					string a = binaryReader.ReadString();
@@ -1277,7 +1277,7 @@ public class CMSystem
 
 	private void LoadLauncherCfg()
 	{
-		string path = Path.GetFullPath(".\\") + "update.cfg";
+		string path = UTY.gameProjectPath + "\\update.cfg";
 		if (File.Exists(path))
 		{
 			using (StreamReader streamReader = new StreamReader(path))
@@ -1837,7 +1837,7 @@ public class CMSystem
 
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1310;
+			this.m_nVersion = 1320;
 		}
 
 		public void OnAfterDeserialize()
@@ -1845,7 +1845,7 @@ public class CMSystem
 		}
 
 		[SerializeField]
-		private int m_nVersion = 1310;
+		private int m_nVersion = 1320;
 
 		[SerializeField]
 		private string m_strDShowFilter = "Microsoft DTV-DVD Video Decoder";

+ 2 - 2
Assembly-CSharp/CameraMain.cs

@@ -1042,8 +1042,8 @@ public class CameraMain : MonoBehaviour
 
 	private string GetTimeFileName()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "ScreenShot";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "ScreenShot";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 13 - 13
Assembly-CSharp/CharacterMgr.cs

@@ -991,7 +991,7 @@ public class CharacterMgr : MonoBehaviour
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		string result = string.Empty;
 		binaryWriter.Write("CM3D2_PRESET_S");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		binaryWriter.Write((char)presset_type);
 		maid.SerializePropLowCapacity(binaryWriter);
 		maid.SerializeMultiColor(binaryWriter);
@@ -1008,7 +1008,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1033,8 +1033,8 @@ public class CharacterMgr : MonoBehaviour
 		});
 		text = UTY.FileNameEscape(text);
 		text += ".preset";
-		string fullPath = Path.GetFullPath(".\\");
-		string text2 = fullPath + "Preset";
+		string str = UTY.gameProjectPath + "\\";
+		string text2 = str + "Preset";
 		if (!Directory.Exists(text2))
 		{
 			Directory.CreateDirectory(text2);
@@ -1054,7 +1054,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1088,8 +1088,8 @@ public class CharacterMgr : MonoBehaviour
 		});
 		text = UTY.FileNameEscape(text);
 		text += ".png";
-		string fullPath = Path.GetFullPath(".\\");
-		string text2 = fullPath + "Preset";
+		string str = UTY.gameProjectPath + "\\";
+		string text2 = str + "Preset";
 		if (!Directory.Exists(text2))
 		{
 			Directory.CreateDirectory(text2);
@@ -1188,9 +1188,9 @@ public class CharacterMgr : MonoBehaviour
 	{
 		try
 		{
-			string fullPath = Path.GetFullPath(".\\");
-			string str = fullPath + "Preset";
-			string text = str + "\\" + f_pre.strFileName;
+			string str = UTY.gameProjectPath + "\\";
+			string str2 = str + "Preset";
+			string text = str2 + "\\" + f_pre.strFileName;
 			if (File.Exists(text))
 			{
 				File.Delete(text);
@@ -1209,8 +1209,8 @@ public class CharacterMgr : MonoBehaviour
 	public List<CharacterMgr.Preset> PresetListLoad()
 	{
 		List<CharacterMgr.Preset> list = new List<CharacterMgr.Preset>();
-		string fullPath = Path.GetFullPath(".\\");
-		string path = fullPath + "Preset";
+		string str = UTY.gameProjectPath + "\\";
+		string path = str + "Preset";
 		if (!Directory.Exists(path))
 		{
 			Directory.CreateDirectory(path);
@@ -1318,7 +1318,7 @@ public class CharacterMgr : MonoBehaviour
 	public bool Serialize(BinaryWriter bwWrite)
 	{
 		bwWrite.Write("CM3D2_CHR_MGR");
-		bwWrite.Write(1310);
+		bwWrite.Write(1320);
 		this.m_PlayerStatus.Serialize(bwWrite);
 		bwWrite.Write(this.m_listStockMan.Count);
 		for (int i = 0; i < this.m_listStockMan.Count; i++)

+ 4 - 4
Assembly-CSharp/ControllerShortcutSettingData.cs

@@ -33,7 +33,7 @@ public static class ControllerShortcutSettingData
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1310;
+			this.m_nVersion = 1320;
 		}
 
 		public void OnAfterDeserialize()
@@ -43,7 +43,7 @@ public static class ControllerShortcutSettingData
 		public bool Write()
 		{
 			string contents = JsonUtility.ToJson(this, true);
-			string path = Path.GetFullPath(".\\") + "OvrControllerShortcutConfig.json";
+			string path = UTY.gameProjectPath + "\\OvrControllerShortcutConfig.json";
 			try
 			{
 				File.WriteAllText(path, contents);
@@ -58,7 +58,7 @@ public static class ControllerShortcutSettingData
 
 		public ControllerShortcutSettingData.OvrControllerShortcutConfig ReadAndSet()
 		{
-			string path = Path.GetFullPath(".\\") + "OvrControllerShortcutConfig.json";
+			string path = UTY.gameProjectPath + "\\OvrControllerShortcutConfig.json";
 			if (!File.Exists(path))
 			{
 				this.CreateDefaultData();
@@ -261,7 +261,7 @@ public static class ControllerShortcutSettingData
 		private const string CONF_NAME = "OvrControllerShortcutConfig.json";
 
 		[SerializeField]
-		private int m_nVersion = 1310;
+		private int m_nVersion = 1320;
 
 		[SerializeField]
 		private bool IsDirectShortcutMode = true;

+ 19 - 19
Assembly-CSharp/DanceSetting.cs

@@ -27,9 +27,9 @@ public class DanceSetting : MonoBehaviour
 						using (FileStream fileStream = new FileStream(file_path, FileMode.Open, FileAccess.Read))
 						{
 							BinaryFormatter binaryFormatter = new BinaryFormatter();
-							string text = (string)binaryFormatter.Deserialize(fileStream);
-							string text2 = (string)binaryFormatter.Deserialize(fileStream);
-							float.TryParse(text2.Split(new char[]
+							string text4 = (string)binaryFormatter.Deserialize(fileStream);
+							string text5 = (string)binaryFormatter.Deserialize(fileStream);
+							float.TryParse(text5.Split(new char[]
 							{
 								':'
 							})[1], out num);
@@ -41,17 +41,17 @@ public class DanceSetting : MonoBehaviour
 					{
 						using (StreamReader streamReader = new StreamReader(fileInfo.OpenRead(), Encoding.UTF8))
 						{
-							string text3 = streamReader.ReadLine();
-							if (text3 == "@Dance_Setting")
+							string text6 = streamReader.ReadLine();
+							if (text6 == "@Dance_Setting")
 							{
 								string s = streamReader.ReadLine().Split(new char[]
 								{
 									':'
 								})[1];
 								float.TryParse(s, out num);
-								text3 = streamReader.ReadLine();
+								text6 = streamReader.ReadLine();
 							}
-							DanceSetting.Settings = JsonUtility.FromJson<SettingData>(text3);
+							DanceSetting.Settings = JsonUtility.FromJson<SettingData>(text6);
 							streamReader.Close();
 						}
 					}
@@ -73,25 +73,25 @@ public class DanceSetting : MonoBehaviour
 					}
 				}
 			};
-			string fullPath = Path.GetFullPath(".\\dance_setting_br.dat");
-			DanceSetting.m_IsFileExist = File.Exists(fullPath);
+			string text = UTY.gameProjectPath + "\\dance_setting_br.dat";
+			DanceSetting.m_IsFileExist = File.Exists(text);
 			if (DanceSetting.m_IsFileExist)
 			{
-				action(fullPath, true);
+				action(text, true);
 			}
 			else
 			{
-				string fullPath2 = Path.GetFullPath(".\\dance_setting.set");
-				string fullPath3 = Path.GetFullPath(".\\dance_setting.dat");
-				if (File.Exists(fullPath2))
+				string text2 = UTY.gameProjectPath + "\\dance_setting.set";
+				string text3 = UTY.gameProjectPath + "\\dance_setting.dat";
+				if (File.Exists(text2))
 				{
-					action(fullPath2, false);
-					File.Delete(fullPath2);
+					action(text2, false);
+					File.Delete(text2);
 				}
-				else if (File.Exists(fullPath3))
+				else if (File.Exists(text3))
 				{
-					action(fullPath3, false);
-					File.Delete(fullPath3);
+					action(text3, false);
+					File.Delete(text3);
 				}
 			}
 			DanceSetting.m_IsFileCheck = true;
@@ -322,7 +322,7 @@ public class DanceSetting : MonoBehaviour
 
 	private void OnDestroy()
 	{
-		using (FileStream fileStream = new FileStream(Path.GetFullPath(".\\dance_setting_br.dat"), FileMode.Create, FileAccess.Write))
+		using (FileStream fileStream = new FileStream(UTY.gameProjectPath + "\\dance_setting_br.dat", FileMode.Create, FileAccess.Write))
 		{
 			BinaryFormatter binaryFormatter = new BinaryFormatter();
 			binaryFormatter.Serialize(fileStream, "@Dance_Setting");

+ 3 - 4
Assembly-CSharp/DeskCustomizeWindowManager.cs

@@ -1,6 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.IO;
 using UnityEngine;
 
 public class DeskCustomizeWindowManager : BasePhotoWindowManager
@@ -34,9 +33,9 @@ public class DeskCustomizeWindowManager : BasePhotoWindowManager
 	{
 		get
 		{
-			string fullPath = Path.GetFullPath(".\\");
-			string str = fullPath + "SaveData";
-			return str + "/CustomizeUISetting.save";
+			string str = UTY.gameProjectPath + "\\";
+			string str2 = str + "SaveData";
+			return str2 + "/CustomizeUISetting.save";
 		}
 	}
 

+ 3 - 3
Assembly-CSharp/DeskManager.cs

@@ -143,7 +143,7 @@ internal class DeskManager
 	public static void SerializeSingleSaveData(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_DeskCustomize");
-		binary.Write(1310);
+		binary.Write(1320);
 		binary.Write(DeskManager.item_inst_data_.Count);
 		for (int i = 0; i < DeskManager.item_inst_data_.Count; i++)
 		{
@@ -154,8 +154,8 @@ internal class DeskManager
 
 	public static void Deserialize()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "SaveData";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "SaveData";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 3 - 3
Assembly-CSharp/DynamicBone.cs

@@ -30,7 +30,7 @@ public class DynamicBone : MonoBehaviour
 			return false;
 		};
 		f_bw.Write("CM3D21_PHY");
-		f_bw.Write(1310);
+		f_bw.Write(1320);
 		if (this.m_Root == null)
 		{
 			NDebug.MessageBox("エラー", "×物理ルートボーンが設定されていません。");
@@ -94,7 +94,7 @@ public class DynamicBone : MonoBehaviour
 	public bool SerializeWriteCollider(BinaryWriter f_bw, string f_strFileName)
 	{
 		f_bw.Write("CM3D21_COL");
-		f_bw.Write(1310);
+		f_bw.Write(1320);
 		if (this.m_Colliders == null || this.m_Colliders.Count == 0)
 		{
 			NDebug.MessageBox("エラー", "×物理Collidersは空です。");
@@ -110,7 +110,7 @@ public class DynamicBone : MonoBehaviour
 			else
 			{
 				f_bw.Write(this.m_Colliders[i].TypeName);
-				this.m_Colliders[i].Serialize(f_bw, 1310);
+				this.m_Colliders[i].Serialize(f_bw, 1320);
 			}
 		}
 		this.m_ColliderFileName = f_strFileName;

+ 1 - 1
Assembly-CSharp/DynamicSkirtBone.cs

@@ -18,7 +18,7 @@ public class DynamicSkirtBone : MonoBehaviour
 	public bool SerializeWrite(BinaryWriter f_bw)
 	{
 		f_bw.Write("CM3D21_PSK");
-		f_bw.Write(1310);
+		f_bw.Write(1320);
 		f_bw.Write(this.m_fPanierRadius);
 		this.SerializeWriteAnimationCurve(f_bw, this.m_PanierRadiusDistrib);
 		int num = (this.m_PanierRadiusDistribGroup == null) ? 0 : this.m_PanierRadiusDistribGroup.Length;

+ 1 - 1
Assembly-CSharp/EditMod.cs

@@ -303,7 +303,7 @@ public class EditMod : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MOD");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		binaryWriter.Write(value);
 		binaryWriter.Write(text2.ToLower());
 		binaryWriter.Write(value2);

+ 77 - 0
Assembly-CSharp/ElbowKneeIKData.cs

@@ -0,0 +1,77 @@
+using System;
+using RootMotion.FinalIK;
+using UnityEngine;
+
+[Serializable]
+public class ElbowKneeIKData : LimbIKData
+{
+	public ElbowKneeIKData(FBIKChain chain, FullBodyIKCtrl ik_ctrl, Transform tgt_bone) : base(ik_ctrl, chain, tgt_bone, false)
+	{
+		this.Chain.bendConstraint.bendGoal = base.IKTarget;
+		this.PositionWeight = 0f;
+		this.m_ForceIKEnable = true;
+	}
+
+	public override float PositionWeight
+	{
+		get
+		{
+			return this.Chain.bendConstraint.weight;
+		}
+		set
+		{
+			this.Chain.bendConstraint.weight = value;
+		}
+	}
+
+	public override float RotationWeight { get; set; }
+
+	public ShoulderThighIKData ShoulderThighData
+	{
+		get
+		{
+			return this.m_ShoulderThighData;
+		}
+	}
+
+	public HandFootIKData HandFootData
+	{
+		get
+		{
+			return this.m_HandFootData;
+		}
+	}
+
+	protected override void SetTargetTransform(IKCtrlData.IKSettingData data, Vector3 pos, Quaternion rot)
+	{
+		base.SetTargetTransform(data, pos, rot);
+		Vector3 position = this.m_ShoulderThighData.TargetBone.InverseTransformPoint(this.TargetBone.position);
+		Vector3 vector = this.TargetBone.InverseTransformPoint(this.m_HandFootData.TargetBone.position);
+		Transform iktarget = this.m_HandFootData.IKTarget;
+		Transform iktarget2 = this.m_ShoulderThighData.IKTarget;
+		if (data.IsPointAttach)
+		{
+			if (!this.m_ShoulderThighData.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec)
+			{
+				this.m_ShoulderThighData.PositionWeight = this.PositionWeight;
+				Vector3 b = base.IKTarget.position - iktarget2.TransformPoint(position);
+				iktarget2.position += b;
+			}
+			if (!this.m_ShoulderThighData.GetIKSettingData(IKCtrlData.IKAttachType.Rotate).IsIKExec)
+			{
+				this.m_ShoulderThighData.RotationWeight = this.PositionWeight;
+				iktarget2.rotation = Quaternion.FromToRotation(this.TargetBone.position - this.ShoulderThighData.TargetBone.position, base.IKTarget.position - iktarget2.position) * iktarget2.rotation;
+			}
+		}
+	}
+
+	public void SetChainData(HandFootIKData handfoot_data, ShoulderThighIKData shoulderthigh_data)
+	{
+		this.m_HandFootData = handfoot_data;
+		this.m_ShoulderThighData = shoulderthigh_data;
+	}
+
+	private ShoulderThighIKData m_ShoulderThighData;
+
+	private HandFootIKData m_HandFootData;
+}

+ 1 - 1
Assembly-CSharp/EmpireLifeModeManager.cs

@@ -477,7 +477,7 @@ public class EmpireLifeModeManager : MonoBehaviour
 	public bool Serialize(BinaryWriter brWrite)
 	{
 		brWrite.Write("CM3D21_LIFE_MODE_MGR");
-		brWrite.Write(1310);
+		brWrite.Write(1320);
 		brWrite.Write("2");
 		DataArray<int, byte> saveDataScenarioExecuteCountArray = this.m_SaveDataScenarioExecuteCountArray;
 		if (EmpireLifeModeManager.<>f__mg$cache1 == null)

+ 39 - 0
Assembly-CSharp/ExampleWheelController.cs

@@ -0,0 +1,39 @@
+using System;
+using UnityEngine;
+
+public class ExampleWheelController : MonoBehaviour
+{
+	private void Start()
+	{
+		this.m_Rigidbody = base.GetComponent<Rigidbody>();
+		this.m_Rigidbody.maxAngularVelocity = 100f;
+	}
+
+	private void Update()
+	{
+		if (Input.GetKey(KeyCode.UpArrow))
+		{
+			this.m_Rigidbody.AddRelativeTorque(new Vector3(-1f * this.acceleration, 0f, 0f), ForceMode.Acceleration);
+		}
+		else if (Input.GetKey(KeyCode.DownArrow))
+		{
+			this.m_Rigidbody.AddRelativeTorque(new Vector3(1f * this.acceleration, 0f, 0f), ForceMode.Acceleration);
+		}
+		float value = -this.m_Rigidbody.angularVelocity.x / 100f;
+		if (this.motionVectorRenderer)
+		{
+			this.motionVectorRenderer.material.SetFloat(ExampleWheelController.Uniforms._MotionAmount, Mathf.Clamp(value, -0.25f, 0.25f));
+		}
+	}
+
+	public float acceleration;
+
+	public Renderer motionVectorRenderer;
+
+	private Rigidbody m_Rigidbody;
+
+	private static class Uniforms
+	{
+		internal static readonly int _MotionAmount = Shader.PropertyToID("_MotionAmount");
+	}
+}

+ 0 - 63
Assembly-CSharp/FABRIKCtrlData.cs

@@ -1,63 +0,0 @@
-using System;
-using System.Linq;
-using RootMotion.FinalIK;
-using UnityEngine;
-
-[Serializable]
-public class FABRIKCtrlData : IKCtrlData
-{
-	public FABRIKCtrlData(FABRIK fabr_ik, Transform[] chain_bones, FullBodyIKCtrl ik_ctrl, bool attach_ik = false) : base(ik_ctrl, chain_bones.Last<Transform>(), false, attach_ik)
-	{
-		this.FABRIK = fabr_ik;
-		this.FABRIK.fixTransforms = false;
-		this.IKSolver.target = base.IKTarget;
-		this.IKSolver.useRotationLimits = false;
-		this.IKSolver.maxIterations = 4;
-		this.IKSolver.Initiate(chain_bones[0]);
-		this.IKSolver.SetChain(chain_bones, chain_bones[0]);
-		this.FABRIK.enabled = false;
-		this.m_ForceIKEnable = false;
-	}
-
-	public IKSolverFABRIK IKSolver
-	{
-		get
-		{
-			return this.FABRIK.solver;
-		}
-	}
-
-	public override Transform[] ChainBones
-	{
-		get
-		{
-			return (from bone in this.IKSolver.bones
-			select bone.transform).ToArray<Transform>();
-		}
-	}
-
-	public override float PositionWeight
-	{
-		get
-		{
-			return this.IKSolver.IKPositionWeight;
-		}
-		set
-		{
-			this.IKSolver.IKPositionWeight = value;
-		}
-	}
-
-	public override float RotationWeight { get; set; }
-
-	public override void Update()
-	{
-		this.FABRIK.solver.Update();
-		if (base.RotateIK.IsIKExec)
-		{
-			this.TargetBone.rotation = Quaternion.Lerp(this.TargetBone.rotation, base.IKTarget.rotation, this.RotationWeight);
-		}
-	}
-
-	public readonly FABRIK FABRIK;
-}

+ 2 - 2
Assembly-CSharp/Facility.cs

@@ -585,8 +585,8 @@ public class Facility : MonoBehaviour
 
 	public static string GetFacilityEditCostumeThumbnailPath()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		return fullPath + "Thumb\\";
+		string str = UTY.gameProjectPath + "\\";
+		return str + "Thumb\\";
 	}
 
 	public string GetFacilityEditCostumeThumbnailName()

+ 3 - 3
Assembly-CSharp/FacilityManager.cs

@@ -657,7 +657,7 @@ public class FacilityManager : MonoBehaviour
 		Stopwatch stopwatch = new Stopwatch();
 		stopwatch.Start();
 		brWrite.Write("CM3D21_FACILITY_MGR");
-		brWrite.Write(1310);
+		brWrite.Write(1320);
 		brWrite.Write("5");
 		int num = 0;
 		for (int i = 0; i < this.m_FacilityArray.Count; i++)
@@ -1008,7 +1008,7 @@ public class FacilityManager : MonoBehaviour
 			this.m_FacilityArray[i] = null;
 		}
 		this.ClearNextDayFacilityArray();
-		string text = Path.GetFullPath(".\\") + "SaveData(営業施設)\\";
+		string text = UTY.gameProjectPath + "\\SaveData(営業施設)\\";
 		string str = "Facility.save";
 		if (!Directory.Exists(text))
 		{
@@ -1034,7 +1034,7 @@ public class FacilityManager : MonoBehaviour
 	[Obsolete("[FacilityManager]使用しなくなる関数です\u3000Serialize(BinaryWriter)を使用して下さい", false)]
 	public void Serialize()
 	{
-		string text = Path.GetFullPath(".\\") + "SaveData(営業施設)\\";
+		string text = UTY.gameProjectPath + "\\SaveData(営業施設)\\";
 		string str = "Facility.save";
 		if (!Directory.Exists(text))
 		{

ファイルの差分が大きいため隠しています
+ 430 - 406
Assembly-CSharp/FullBodyIKCtrl.cs


+ 8 - 8
Assembly-CSharp/GameMain.cs

@@ -373,8 +373,8 @@ public class GameMain : MonoSingleton<GameMain>
 		{
 			VRSettings.LoadDeviceByName("None");
 		}
-		string fullPath = Path.GetFullPath(".\\");
-		if (!UTY.IsLowercaseAlphanumeric(fullPath))
+		string target = UTY.gameProjectPath + "\\";
+		if (!UTY.IsLowercaseAlphanumeric(target))
 		{
 		}
 		this.m_boDebugCharaLoad = false;
@@ -678,7 +678,7 @@ public class GameMain : MonoSingleton<GameMain>
 		serializeHeader.strComment = f_strComment;
 		serializeHeader.productTypeID = (int)Product.type;
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		this.SerializeWriteHeader(binaryWriter, serializeHeader);
 		binaryWriter.Write("bookmark_kk_01");
 		GameMain.BinaryBookmark binaryBookmark = new GameMain.BinaryBookmark(binaryWriter);
@@ -739,8 +739,8 @@ public class GameMain : MonoSingleton<GameMain>
 
 	public string MakeSavePathFileName(int f_nSaveNo)
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "SaveData";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "SaveData";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -796,7 +796,7 @@ public class GameMain : MonoSingleton<GameMain>
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		this.SerializeWriteHeader(binaryWriter, saveDataHeader);
 		binaryWriter.Write(array, (int)saveDataHeader.lHeaderSize, (int)((long)array.Length - saveDataHeader.lHeaderSize));
 		File.WriteAllBytes(path, memoryStream.ToArray());
@@ -1174,8 +1174,8 @@ public class GameMain : MonoSingleton<GameMain>
 
 	public void UpdateSaveDataDay()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string path = fullPath + "SaveData";
+		string str = UTY.gameProjectPath + "\\";
+		string path = str + "SaveData";
 		int num = -1;
 		if (Directory.Exists(path))
 		{

+ 1 - 1
Assembly-CSharp/GameModeManager.cs

@@ -31,7 +31,7 @@ public static class GameModeManager
 	public static bool Serialize(BinaryWriter brWrite)
 	{
 		brWrite.Write("CM3D21_GAME_MODE_MGR");
-		brWrite.Write(1310);
+		brWrite.Write(1320);
 		brWrite.Write(1);
 		brWrite.Write((int)GameModeManager.m_NowGameModeType);
 		return true;

+ 185 - 185
Assembly-CSharp/GameUty.cs

@@ -268,7 +268,7 @@ public class GameUty
 
 	public static void UpdateFileSystemPath()
 	{
-		string fullPath = Path.GetFullPath(".\\");
+		string text = UTY.gameProjectPath + "\\";
 		string gameDataPath = "GameData";
 		int check_ver_no = 3;
 		Func<string, bool> AddFolderOrArchive = delegate(string name)
@@ -294,34 +294,34 @@ public class GameUty
 		HashSet<string> addedLegacyArchives = new HashSet<string>();
 		Action<string> action = delegate(string name)
 		{
-			foreach (string text29 in GameUty.PathList)
+			foreach (string text30 in GameUty.PathList)
 			{
-				string text30 = name + "_" + text29;
-				bool flag3 = AddFolderOrArchive(text30);
-				if (flag3 && !addedLegacyArchives.Contains(text30))
+				string text31 = name + "_" + text30;
+				bool flag3 = AddFolderOrArchive(text31);
+				if (flag3 && !addedLegacyArchives.Contains(text31))
 				{
-					addedLegacyArchives.Add(text30);
+					addedLegacyArchives.Add(text31);
 				}
 				if (flag3)
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text29);
+						GameUty.ExistCsvPathList.Add(text30);
 					}
 					for (int num15 = 2; num15 <= check_ver_no; num15++)
 					{
-						AddFolderOrArchive(text30 + "_" + num15);
+						AddFolderOrArchive(text31 + "_" + num15);
 					}
 				}
 			}
 		};
 		Action<string> action2 = delegate(string name)
 		{
-			foreach (string text29 in GameUty.PathList)
+			foreach (string text30 in GameUty.PathList)
 			{
-				string text30 = name + "_" + text29;
-				bool flag3 = AddFolderOrArchive(text30);
-				if (!flag3 && addedLegacyArchives.Contains(text30))
+				string text31 = name + "_" + text30;
+				bool flag3 = AddFolderOrArchive(text31);
+				if (!flag3 && addedLegacyArchives.Contains(text31))
 				{
 					flag3 = true;
 				}
@@ -329,7 +329,7 @@ public class GameUty
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text29);
+						GameUty.ExistCsvPathList.Add(text30);
 					}
 					for (int num15 = 2; num15 <= check_ver_no; num15++)
 					{
@@ -337,7 +337,7 @@ public class GameUty
 						{
 							name,
 							"_",
-							text29,
+							text30,
 							"_",
 							num15
 						}));
@@ -347,13 +347,13 @@ public class GameUty
 		};
 		Action<string> action3 = delegate(string name)
 		{
-			foreach (string text29 in GameUty.PathList)
+			foreach (string text30 in GameUty.PathList)
 			{
-				if (AddFolderOrArchive(name + "_" + text29))
+				if (AddFolderOrArchive(name + "_" + text30))
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text29);
+						GameUty.ExistCsvPathList.Add(text30);
 					}
 					for (int num15 = 2; num15 <= check_ver_no; num15++)
 					{
@@ -361,7 +361,7 @@ public class GameUty
 						{
 							name,
 							"_",
-							text29,
+							text30,
 							"_",
 							num15
 						}));
@@ -371,7 +371,7 @@ public class GameUty
 		};
 		string str = string.Empty;
 		str = "必用アーカイブがありません。GameData\\";
-		GameUty.m_FileSystem.SetBaseDirectory(fullPath);
+		GameUty.m_FileSystem.SetBaseDirectory(text);
 		AddFolderOrArchive("product");
 		Product.Initialize(GameUty.m_FileSystem);
 		Debug.Log("IsEnabledCompatibilityMode:" + GameUty.IsEnabledCompatibilityMode.ToString());
@@ -403,24 +403,24 @@ public class GameUty
 				GameUty.m_FileSystem.SetBaseDirectory(GameMain.Instance.CMSystem.CM3D2Path);
 				GameUty.PathList = GameUty.PathListOld;
 				AddFolderOrArchive("material");
-				foreach (string text in GameUty.PathListOld)
+				foreach (string text2 in GameUty.PathListOld)
 				{
 					string str3 = "material";
-					if (text == "denkigai2015wTowelR")
+					if (text2 == "denkigai2015wTowelR")
 					{
 						AddFolderOrArchive(str3 + "_denkigai2015wTowel");
 					}
-					string text2 = str3 + "_" + text;
-					bool flag = AddFolderOrArchive(text2);
-					if (flag && !addedLegacyArchives.Contains(text2))
+					string text3 = str3 + "_" + text2;
+					bool flag = AddFolderOrArchive(text3);
+					if (flag && !addedLegacyArchives.Contains(text3))
 					{
-						addedLegacyArchives.Add(text2);
+						addedLegacyArchives.Add(text3);
 					}
 					if (flag)
 					{
 						for (int i2 = 2; i2 <= check_ver_no; i2++)
 						{
-							AddFolderOrArchive(text2 + "_" + i2);
+							AddFolderOrArchive(text3 + "_" + i2);
 						}
 					}
 				}
@@ -440,24 +440,24 @@ public class GameUty
 			}
 			Debug.Log("■■■■■■■■ Archive Log[2.1 Compatibility] (GameData_20) ■■■■■■■■");
 			gameDataPath = "GameData_20";
-			GameUty.m_FileSystem.SetBaseDirectory(fullPath);
+			GameUty.m_FileSystem.SetBaseDirectory(text);
 			if (GameUty.IsEnabledCompatibilityMode)
 			{
 				GameUty.m_FileSystem.AddPatchDecryptPreferredSearchDirectory(GameMain.Instance.CMSystem.CM3D2Path + "\\GameData");
 			}
-			GameUty.PathList = GameUty.ReadAutoPathFile("[2.1Compatibility]", fullPath + gameDataPath + "\\paths.dat");
+			GameUty.PathList = GameUty.ReadAutoPathFile("[2.1Compatibility]", text + gameDataPath + "\\paths.dat");
 			if (GameUty.PathList != null && 0 < GameUty.PathList.Count)
 			{
-				foreach (string text3 in GameUty.PathList)
+				foreach (string text4 in GameUty.PathList)
 				{
-					string text4 = "material";
-					if (text3 == "denkigai2015wTowelR")
+					string text5 = "material";
+					if (text4 == "denkigai2015wTowelR")
 					{
-						AddFolderOrArchive(text4 + "_denkigai2015wTowel");
+						AddFolderOrArchive(text5 + "_denkigai2015wTowel");
 					}
-					string text5 = text4 + "_" + text3;
-					bool flag2 = AddFolderOrArchive(text5);
-					if (!flag2 && addedLegacyArchives.Contains(text5))
+					string text6 = text5 + "_" + text4;
+					bool flag2 = AddFolderOrArchive(text6);
+					if (!flag2 && addedLegacyArchives.Contains(text6))
 					{
 						flag2 = true;
 					}
@@ -467,9 +467,9 @@ public class GameUty
 						{
 							AddFolderOrArchive(string.Concat(new object[]
 							{
-								text4,
+								text5,
 								"_",
-								text3,
+								text4,
 								"_",
 								j
 							}));
@@ -491,7 +491,7 @@ public class GameUty
 			Debug.Log("■■■■■■■■■■■■■■■■■■■■");
 			Debug.Log("■■■■■■■■ Archive Log[2.1] (GameData) ■■■■■■■■");
 			gameDataPath = "GameData";
-			GameUty.PathList = GameUty.ReadAutoPathFile("[2.1]", fullPath + gameDataPath + "\\paths.dat");
+			GameUty.PathList = GameUty.ReadAutoPathFile("[2.1]", text + gameDataPath + "\\paths.dat");
 			if (GameUty.PathList == null)
 			{
 				GameUty.PathList = new List<string>();
@@ -499,18 +499,18 @@ public class GameUty
 			}
 			GameUty.PathList.Add("jp");
 			AddFolderOrArchive("csv");
-			foreach (string text6 in GameUty.PathList)
+			foreach (string text7 in GameUty.PathList)
 			{
-				string text7 = "csv";
-				if (AddFolderOrArchive(text7 + "_" + text6))
+				string text8 = "csv";
+				if (AddFolderOrArchive(text8 + "_" + text7))
 				{
 					for (int k = 2; k <= check_ver_no; k++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text7,
+							text8,
 							"_",
-							text6,
+							text7,
 							"_",
 							k
 						}));
@@ -519,18 +519,18 @@ public class GameUty
 			}
 			AddFolderOrArchive("prioritymaterial");
 			NDebug.Assert(AddFolderOrArchive("motion"), str + "motion");
-			foreach (string text8 in GameUty.PathList)
+			foreach (string text9 in GameUty.PathList)
 			{
-				string text9 = "motion";
-				if (AddFolderOrArchive(text9 + "_" + text8))
+				string text10 = "motion";
+				if (AddFolderOrArchive(text10 + "_" + text9))
 				{
 					for (int l = 2; l <= check_ver_no; l++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text9,
+							text10,
 							"_",
-							text8,
+							text9,
 							"_",
 							l
 						}));
@@ -539,18 +539,18 @@ public class GameUty
 			}
 			AddFolderOrArchive("motion2");
 			NDebug.Assert(AddFolderOrArchive("script"), str + "script");
-			foreach (string text10 in GameUty.PathList)
+			foreach (string text11 in GameUty.PathList)
 			{
-				string text11 = "script";
-				if (AddFolderOrArchive(text11 + "_" + text10))
+				string text12 = "script";
+				if (AddFolderOrArchive(text12 + "_" + text11))
 				{
 					for (int m = 2; m <= check_ver_no; m++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text11,
+							text12,
 							"_",
-							text10,
+							text11,
 							"_",
 							m
 						}));
@@ -558,18 +558,18 @@ public class GameUty
 				}
 			}
 			AddFolderOrArchive("script_share");
-			foreach (string text12 in GameUty.PathList)
+			foreach (string text13 in GameUty.PathList)
 			{
-				string text13 = "script_share";
-				if (AddFolderOrArchive(text13 + "_" + text12))
+				string text14 = "script_share";
+				if (AddFolderOrArchive(text14 + "_" + text13))
 				{
 					for (int n = 2; n <= check_ver_no; n++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text13,
+							text14,
 							"_",
-							text12,
+							text13,
 							"_",
 							n
 						}));
@@ -578,18 +578,18 @@ public class GameUty
 			}
 			AddFolderOrArchive("script_share2");
 			NDebug.Assert(AddFolderOrArchive("sound"), str + "sound");
-			foreach (string text14 in GameUty.PathList)
+			foreach (string text15 in GameUty.PathList)
 			{
-				string text15 = "sound";
-				if (AddFolderOrArchive(text15 + "_" + text14))
+				string text16 = "sound";
+				if (AddFolderOrArchive(text16 + "_" + text15))
 				{
 					for (int num = 2; num <= check_ver_no; num++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text15,
+							text16,
 							"_",
-							text14,
+							text15,
 							"_",
 							num
 						}));
@@ -598,18 +598,18 @@ public class GameUty
 			}
 			AddFolderOrArchive("sound2");
 			NDebug.Assert(AddFolderOrArchive("system"), str + "system");
-			foreach (string text16 in GameUty.PathList)
+			foreach (string text17 in GameUty.PathList)
 			{
-				string text17 = "system";
-				if (AddFolderOrArchive(text17 + "_" + text16))
+				string text18 = "system";
+				if (AddFolderOrArchive(text18 + "_" + text17))
 				{
 					for (int num2 = 2; num2 <= check_ver_no; num2++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text17,
+							text18,
 							"_",
-							text16,
+							text17,
 							"_",
 							num2
 						}));
@@ -618,36 +618,36 @@ public class GameUty
 			}
 			AddFolderOrArchive("system2");
 			AddFolderOrArchive("language");
-			foreach (string text18 in GameUty.PathList)
+			foreach (string text19 in GameUty.PathList)
 			{
-				string text19 = "language";
-				if (AddFolderOrArchive(text19 + "_" + text18))
+				string text20 = "language";
+				if (AddFolderOrArchive(text20 + "_" + text19))
 				{
 					for (int num3 = 2; num3 <= check_ver_no; num3++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text19,
+							text20,
 							"_",
-							text18,
+							text19,
 							"_",
 							num3
 						}));
 					}
 				}
 			}
-			foreach (string text20 in GameUty.PathList)
+			foreach (string text21 in GameUty.PathList)
 			{
-				string text21 = "bg";
-				if (AddFolderOrArchive(text21 + "_" + text20))
+				string text22 = "bg";
+				if (AddFolderOrArchive(text22 + "_" + text21))
 				{
 					for (int num4 = 2; num4 <= check_ver_no; num4++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text21,
+							text22,
 							"_",
-							text20,
+							text21,
 							"_",
 							num4
 						}));
@@ -656,20 +656,20 @@ public class GameUty
 			}
 			if (Product.isEnglish && !Product.isPublic)
 			{
-				string text22 = "bg-en";
-				NDebug.Assert(AddFolderOrArchive(text22), str + text22);
-				foreach (string text23 in GameUty.PathList)
+				string text23 = "bg-en";
+				NDebug.Assert(AddFolderOrArchive(text23), str + text23);
+				foreach (string text24 in GameUty.PathList)
 				{
-					if (AddFolderOrArchive(text22 + "_" + text23))
+					if (AddFolderOrArchive(text23 + "_" + text24))
 					{
 						for (int num5 = 2; num5 <= check_ver_no; num5++)
 						{
 							AddFolderOrArchive(string.Concat(new object[]
 							{
-								text22,
-								"_",
 								text23,
 								"_",
+								text24,
+								"_",
 								num5
 							}));
 						}
@@ -684,18 +684,18 @@ public class GameUty
 				string arg2 = arg + "_" + (char)(97 + num6);
 				AddFolderOrArchive(arg2);
 			}
-			foreach (string text24 in GameUty.PathList)
+			foreach (string text25 in GameUty.PathList)
 			{
-				string text25 = "voice";
-				if (AddFolderOrArchive(text25 + "_" + text24))
+				string text26 = "voice";
+				if (AddFolderOrArchive(text26 + "_" + text25))
 				{
 					for (int num7 = 2; num7 <= check_ver_no; num7++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text25,
+							text26,
 							"_",
-							text24,
+							text25,
 							"_",
 							num7
 						}));
@@ -707,20 +707,20 @@ public class GameUty
 				string arg3 = "voice";
 				AddFolderOrArchive(arg3 + num8);
 			}
-			string text26 = "parts";
-			NDebug.Assert(AddFolderOrArchive(text26), str + text26);
-			foreach (string text27 in GameUty.PathList)
+			string text27 = "parts";
+			NDebug.Assert(AddFolderOrArchive(text27), str + text27);
+			foreach (string text28 in GameUty.PathList)
 			{
-				if (AddFolderOrArchive(text26 + "_" + text27))
+				if (AddFolderOrArchive(text27 + "_" + text28))
 				{
 					for (int num9 = 2; num9 <= check_ver_no; num9++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text26,
-							"_",
 							text27,
 							"_",
+							text28,
+							"_",
 							num9
 						}));
 					}
@@ -778,17 +778,17 @@ public class GameUty
 				languageSource2.LoadAllLanguages(false);
 			}
 		}
-		if (Directory.Exists(fullPath + "Mod"))
+		if (Directory.Exists(text + "Mod"))
 		{
 			GameUty.m_ModFileSystem = new FileSystemWindows();
-			GameUty.m_ModFileSystem.SetBaseDirectory(fullPath);
+			GameUty.m_ModFileSystem.SetBaseDirectory(text);
 			GameUty.m_ModFileSystem.AddFolder("Mod");
 			string[] list2 = GameUty.m_ModFileSystem.GetList(string.Empty, AFileSystemBase.ListType.AllFolder);
-			foreach (string text28 in list2)
+			foreach (string text29 in list2)
 			{
-				if (!GameUty.m_ModFileSystem.AddAutoPath(text28))
+				if (!GameUty.m_ModFileSystem.AddAutoPath(text29))
 				{
-					Debug.Log("m_ModFileSystemのAddAutoPathには既に " + text28 + " がありました。");
+					Debug.Log("m_ModFileSystemのAddAutoPathには既に " + text29 + " がありました。");
 				}
 			}
 		}
@@ -839,7 +839,7 @@ public class GameUty
 
 	public static void UpdateFileSystemPathToNewProduct()
 	{
-		string fullPath = Path.GetFullPath(".\\");
+		string text = UTY.gameProjectPath + "\\";
 		string gameDataPath = "GameData";
 		string str = string.Empty;
 		str = "必用アーカイブがありません。GameData" + Product.gameDataPath + "\\";
@@ -867,15 +867,15 @@ public class GameUty
 		};
 		Action<string> action = delegate(string name)
 		{
-			foreach (string text27 in GameUty.PathList)
+			foreach (string text28 in GameUty.PathList)
 			{
-				string arg5 = name + "_" + text27;
+				string arg5 = name + "_" + text28;
 				bool flag2 = AddFolderOrArchive(arg5);
 				if (flag2)
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text27);
+						GameUty.ExistCsvPathList.Add(text28);
 					}
 					for (int num10 = 2; num10 <= check_ver_no; num10++)
 					{
@@ -883,7 +883,7 @@ public class GameUty
 						{
 							name,
 							"_",
-							text27,
+							text28,
 							"_",
 							num10
 						}));
@@ -893,13 +893,13 @@ public class GameUty
 		};
 		Action<string> action2 = delegate(string name)
 		{
-			foreach (string text27 in GameUty.PathList)
+			foreach (string text28 in GameUty.PathList)
 			{
-				if (AddFolderOrArchive(name + "_" + text27))
+				if (AddFolderOrArchive(name + "_" + text28))
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text27);
+						GameUty.ExistCsvPathList.Add(text28);
 					}
 					for (int num10 = 2; num10 <= check_ver_no; num10++)
 					{
@@ -907,7 +907,7 @@ public class GameUty
 						{
 							name,
 							"_",
-							text27,
+							text28,
 							"_",
 							num10
 						}));
@@ -918,18 +918,18 @@ public class GameUty
 		StopWatch stopWatch = new StopWatch();
 		Debug.Log("■■■■■■■■ Archive Log[2.1 Compatibility] (GameData_20) ■■■■■■■■");
 		gameDataPath = "GameData_20";
-		GameUty.m_FileSystem.SetBaseDirectory(fullPath);
-		GameUty.PathList = GameUty.ReadAutoPathFile("[2.1Compatibility]", fullPath + gameDataPath + "\\paths.dat");
+		GameUty.m_FileSystem.SetBaseDirectory(text);
+		GameUty.PathList = GameUty.ReadAutoPathFile("[2.1Compatibility]", text + gameDataPath + "\\paths.dat");
 		if (GameUty.PathList != null && 0 < GameUty.PathList.Count)
 		{
-			foreach (string text in GameUty.PathList)
+			foreach (string text2 in GameUty.PathList)
 			{
-				string text2 = "material";
-				if (text == "denkigai2015wTowelR")
+				string text3 = "material";
+				if (text2 == "denkigai2015wTowelR")
 				{
-					AddFolderOrArchive(text2 + "_denkigai2015wTowel");
+					AddFolderOrArchive(text3 + "_denkigai2015wTowel");
 				}
-				string arg = text2 + "_" + text;
+				string arg = text3 + "_" + text2;
 				bool flag = AddFolderOrArchive(arg);
 				if (flag)
 				{
@@ -937,9 +937,9 @@ public class GameUty
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text2,
+							text3,
 							"_",
-							text,
+							text2,
 							"_",
 							i
 						}));
@@ -960,7 +960,7 @@ public class GameUty
 		Debug.Log("■■■■■■■■■■■■■■■■■■■■");
 		Debug.Log("■■■■■■■■ Archive Log[2.1] (GameData) ■■■■■■■■");
 		gameDataPath = "GameData";
-		GameUty.PathList = GameUty.ReadAutoPathFile("[2.1]", fullPath + gameDataPath + "\\paths.dat");
+		GameUty.PathList = GameUty.ReadAutoPathFile("[2.1]", text + gameDataPath + "\\paths.dat");
 		if (GameUty.PathList == null)
 		{
 			GameUty.PathList = new List<string>();
@@ -968,18 +968,18 @@ public class GameUty
 		}
 		GameUty.PathList.Add(Product.gameDataPath.Replace("_", string.Empty));
 		AddFolderOrArchive("csv");
-		foreach (string text3 in GameUty.PathList)
+		foreach (string text4 in GameUty.PathList)
 		{
-			string text4 = "csv";
-			if (AddFolderOrArchive(text4 + "_" + text3))
+			string text5 = "csv";
+			if (AddFolderOrArchive(text5 + "_" + text4))
 			{
 				for (int j = 2; j <= check_ver_no; j++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text4,
+						text5,
 						"_",
-						text3,
+						text4,
 						"_",
 						j
 					}));
@@ -988,18 +988,18 @@ public class GameUty
 		}
 		AddFolderOrArchive("prioritymaterial");
 		NDebug.Assert(AddFolderOrArchive("motion"), str + "motion");
-		foreach (string text5 in GameUty.PathList)
+		foreach (string text6 in GameUty.PathList)
 		{
-			string text6 = "motion";
-			if (AddFolderOrArchive(text6 + "_" + text5))
+			string text7 = "motion";
+			if (AddFolderOrArchive(text7 + "_" + text6))
 			{
 				for (int k = 2; k <= check_ver_no; k++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text6,
+						text7,
 						"_",
-						text5,
+						text6,
 						"_",
 						k
 					}));
@@ -1008,18 +1008,18 @@ public class GameUty
 		}
 		AddFolderOrArchive("motion2");
 		NDebug.Assert(AddFolderOrArchive("script"), str + "script");
-		foreach (string text7 in GameUty.PathList)
+		foreach (string text8 in GameUty.PathList)
 		{
-			string text8 = "script";
-			if (AddFolderOrArchive(text8 + "_" + text7))
+			string text9 = "script";
+			if (AddFolderOrArchive(text9 + "_" + text8))
 			{
 				for (int l = 2; l <= check_ver_no; l++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text8,
+						text9,
 						"_",
-						text7,
+						text8,
 						"_",
 						l
 					}));
@@ -1027,18 +1027,18 @@ public class GameUty
 			}
 		}
 		AddFolderOrArchive("script_share");
-		foreach (string text9 in GameUty.PathList)
+		foreach (string text10 in GameUty.PathList)
 		{
-			string text10 = "script_share";
-			if (AddFolderOrArchive(text10 + "_" + text9))
+			string text11 = "script_share";
+			if (AddFolderOrArchive(text11 + "_" + text10))
 			{
 				for (int m = 2; m <= check_ver_no; m++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text10,
+						text11,
 						"_",
-						text9,
+						text10,
 						"_",
 						m
 					}));
@@ -1047,18 +1047,18 @@ public class GameUty
 		}
 		AddFolderOrArchive("script_share2");
 		NDebug.Assert(AddFolderOrArchive("sound"), str + "sound");
-		foreach (string text11 in GameUty.PathList)
+		foreach (string text12 in GameUty.PathList)
 		{
-			string text12 = "sound";
-			if (AddFolderOrArchive(text12 + "_" + text11))
+			string text13 = "sound";
+			if (AddFolderOrArchive(text13 + "_" + text12))
 			{
 				for (int n = 2; n <= check_ver_no; n++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text12,
+						text13,
 						"_",
-						text11,
+						text12,
 						"_",
 						n
 					}));
@@ -1067,18 +1067,18 @@ public class GameUty
 		}
 		AddFolderOrArchive("sound2");
 		NDebug.Assert(AddFolderOrArchive("system"), str + "system");
-		foreach (string text13 in GameUty.PathList)
+		foreach (string text14 in GameUty.PathList)
 		{
-			string text14 = "system";
-			if (AddFolderOrArchive(text14 + "_" + text13))
+			string text15 = "system";
+			if (AddFolderOrArchive(text15 + "_" + text14))
 			{
 				for (int num = 2; num <= check_ver_no; num++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text14,
+						text15,
 						"_",
-						text13,
+						text14,
 						"_",
 						num
 					}));
@@ -1087,36 +1087,36 @@ public class GameUty
 		}
 		AddFolderOrArchive("system2");
 		AddFolderOrArchive("language");
-		foreach (string text15 in GameUty.PathList)
+		foreach (string text16 in GameUty.PathList)
 		{
-			string text16 = "language";
-			if (AddFolderOrArchive(text16 + "_" + text15))
+			string text17 = "language";
+			if (AddFolderOrArchive(text17 + "_" + text16))
 			{
 				for (int num2 = 2; num2 <= check_ver_no; num2++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text16,
+						text17,
 						"_",
-						text15,
+						text16,
 						"_",
 						num2
 					}));
 				}
 			}
 		}
-		foreach (string text17 in GameUty.PathList)
+		foreach (string text18 in GameUty.PathList)
 		{
-			string text18 = "bg";
-			if (AddFolderOrArchive(text18 + "_" + text17))
+			string text19 = "bg";
+			if (AddFolderOrArchive(text19 + "_" + text18))
 			{
 				for (int num3 = 2; num3 <= check_ver_no; num3++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text18,
+						text19,
 						"_",
-						text17,
+						text18,
 						"_",
 						num3
 					}));
@@ -1125,20 +1125,20 @@ public class GameUty
 		}
 		if (Product.isEnglish && !Product.isPublic)
 		{
-			string text19 = "bg-en";
-			NDebug.Assert(AddFolderOrArchive(text19), str + text19);
-			foreach (string text20 in GameUty.PathList)
+			string text20 = "bg-en";
+			NDebug.Assert(AddFolderOrArchive(text20), str + text20);
+			foreach (string text21 in GameUty.PathList)
 			{
-				if (AddFolderOrArchive(text19 + "_" + text20))
+				if (AddFolderOrArchive(text20 + "_" + text21))
 				{
 					for (int num4 = 2; num4 <= check_ver_no; num4++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text19,
-							"_",
 							text20,
 							"_",
+							text21,
+							"_",
 							num4
 						}));
 					}
@@ -1153,18 +1153,18 @@ public class GameUty
 			string arg3 = arg2 + "_" + (char)(97 + num5);
 			AddFolderOrArchive(arg3);
 		}
-		foreach (string text21 in GameUty.PathList)
+		foreach (string text22 in GameUty.PathList)
 		{
-			string text22 = "voice";
-			if (AddFolderOrArchive(text22 + "_" + text21))
+			string text23 = "voice";
+			if (AddFolderOrArchive(text23 + "_" + text22))
 			{
 				for (int num6 = 2; num6 <= check_ver_no; num6++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text22,
+						text23,
 						"_",
-						text21,
+						text22,
 						"_",
 						num6
 					}));
@@ -1176,20 +1176,20 @@ public class GameUty
 			string arg4 = "voice";
 			AddFolderOrArchive(arg4 + num7);
 		}
-		string text23 = "parts";
-		NDebug.Assert(AddFolderOrArchive(text23), str + text23);
-		foreach (string text24 in GameUty.PathList)
+		string text24 = "parts";
+		NDebug.Assert(AddFolderOrArchive(text24), str + text24);
+		foreach (string text25 in GameUty.PathList)
 		{
-			if (AddFolderOrArchive(text23 + "_" + text24))
+			if (AddFolderOrArchive(text24 + "_" + text25))
 			{
 				for (int num8 = 2; num8 <= check_ver_no; num8++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text23,
-						"_",
 						text24,
 						"_",
+						text25,
+						"_",
 						num8
 					}));
 				}
@@ -1198,20 +1198,20 @@ public class GameUty
 		AddFolderOrArchive("parts2");
 		if (Product.isEnglish && !Product.isPublic)
 		{
-			string text25 = "parts-en";
-			NDebug.Assert(AddFolderOrArchive(text25), str + text25);
-			foreach (string text26 in GameUty.PathList)
+			string text26 = "parts-en";
+			NDebug.Assert(AddFolderOrArchive(text26), str + text26);
+			foreach (string text27 in GameUty.PathList)
 			{
-				if (AddFolderOrArchive(text25 + "_" + text26))
+				if (AddFolderOrArchive(text26 + "_" + text27))
 				{
 					for (int num9 = 2; num9 <= check_ver_no; num9++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
-							text25,
-							"_",
 							text26,
 							"_",
+							text27,
+							"_",
 							num9
 						}));
 					}
@@ -1404,15 +1404,15 @@ public class GameUty
 
 	public static string GetBuildVersionText()
 	{
-		int num = 1310;
+		int num = 1320;
 		return (num >= 1000) ? ((float)num / 1000f).ToString("F2") : ((float)num / 100f).ToString("F2");
 	}
 
 	public static string GetGameVersionText()
 	{
 		string text = "COM3D2x64.exe";
-		int num = 1310;
-		string path = Path.GetFullPath(".\\") + "update.lst";
+		int num = 1320;
+		string path = UTY.gameProjectPath + "\\update.lst";
 		string[] array = new string[0];
 		if (File.Exists(path))
 		{

+ 207 - 0
Assembly-CSharp/HandFootIKData.cs

@@ -0,0 +1,207 @@
+using System;
+using RootMotion.FinalIK;
+using UnityEngine;
+
+[Serializable]
+public class HandFootIKData : LimbIKData
+{
+	public HandFootIKData(IKEffector effector, FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone, bool use_old = false) : base(ik_ctrl, chain, tgt_bone, use_old)
+	{
+		this.Effector = effector;
+		this.Effector.target = base.IKTarget;
+		this.IKMapping = ik_mapping;
+		this.m_ForceIKEnable = true;
+		this.ToCorrectBone = this.TargetBone;
+	}
+
+	public ShoulderThighIKData ShoulderThighData
+	{
+		get
+		{
+			return this.m_ShoulderThighData;
+		}
+	}
+
+	public ElbowKneeIKData ElbowKneeData
+	{
+		get
+		{
+			return this.m_ElbowKneeData;
+		}
+	}
+
+	public override float PositionWeight
+	{
+		get
+		{
+			return this.Effector.positionWeight;
+		}
+		set
+		{
+			this.Effector.positionWeight = value;
+		}
+	}
+
+	public override float RotationWeight
+	{
+		get
+		{
+			return this.Effector.rotationWeight;
+		}
+		set
+		{
+			this.Effector.rotationWeight = value;
+		}
+	}
+
+	private void CheckBorder(HandFootIKData.BorderCorrectData correctData)
+	{
+		if (!correctData.Enable)
+		{
+			return;
+		}
+		float d = 0f;
+		Vector3 position = this.ToCorrectBone.position;
+		if (correctData.CheckBorder(position, ref d))
+		{
+			if (!base.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec)
+			{
+				base.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec = true;
+			}
+			switch (this.CorrectType)
+			{
+			case HandFootIKData.BorderCorrectType.Bone:
+				base.IKTarget.position += correctData.Axis * d;
+				this.m_ElbowKneeData.IKTarget.position += correctData.Axis * d;
+				break;
+			case HandFootIKData.BorderCorrectType.HalfBody:
+				base.IKTarget.position += correctData.Axis * d;
+				this.m_ElbowKneeData.IKTarget.position += correctData.Axis * d;
+				this.m_ShoulderThighData.IKTarget.position += correctData.Axis * d;
+				break;
+			case HandFootIKData.BorderCorrectType.Chara:
+				this.MyIKCtrl.BodyCtrlData.SetPosOffset(correctData.Axis * d);
+				break;
+			}
+		}
+	}
+
+	protected override void SetTargetTransform(IKCtrlData.IKSettingData data, Vector3 pos, Quaternion rot)
+	{
+		base.SetTargetTransform(data, pos, rot);
+		if (!data.IsPointAttach)
+		{
+			return;
+		}
+		Transform iktarget = this.m_ShoulderThighData.IKTarget;
+		Transform iktarget2 = this.m_ElbowKneeData.IKTarget;
+		Vector3 vector = this.m_ElbowKneeData.TargetBone.position - this.TargetBone.position;
+		Vector3 vector2 = this.m_ShoulderThighData.TargetBone.position - this.m_ElbowKneeData.TargetBone.position;
+		if (this.ElbowKneeData.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec)
+		{
+			return;
+		}
+		float f = Vector3.Dot(vector.normalized, vector2.normalized);
+		float num = Mathf.Acos(f) * 57.29578f;
+		float num2 = Mathf.Clamp01(num / this.m_BendFadeBorder);
+		this.ElbowKneeData.PositionWeight = num2 * this.PositionWeight;
+		Vector3 position = this.TargetBone.InverseTransformPoint(this.m_ElbowKneeData.TargetBone.position);
+		Vector3 position2 = base.IKTarget.TransformPoint(position);
+		iktarget2.position = position2;
+		if (this.ElbowKneeData.GetIKSettingData(IKCtrlData.IKAttachType.Rotate).IsIKExec)
+		{
+			this.ElbowKneeData.RotationWeight = this.PositionWeight;
+			iktarget2.rotation = Quaternion.FromToRotation(this.TargetBone.position - this.ElbowKneeData.TargetBone.position, base.IKTarget.position - iktarget2.position) * iktarget2.rotation;
+		}
+	}
+
+	public override void ApplyIKSetting()
+	{
+		if (!base.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec && !base.GetFlagData(IKCtrlData.IKAttachType.NewPoint).IsEnable && (this.FloorCorrect.Enable || this.WallCorrect.Enable))
+		{
+			base.ForceIK = true;
+		}
+		base.ApplyIKSetting();
+		this.CheckBorder(this.WallCorrect);
+		this.CheckBorder(this.FloorCorrect);
+	}
+
+	public override void Detach(IKCtrlData.IKAttachType attachType)
+	{
+		base.Detach(attachType);
+		this.WallCorrect.Reset();
+		this.FloorCorrect.Reset();
+		this.ToCorrectBone = this.TargetBone;
+		this.CorrectType = HandFootIKData.BorderCorrectType.Bone;
+	}
+
+	public void SetChainData(ElbowKneeIKData elbowknee_data, ShoulderThighIKData shoulderthigh_data)
+	{
+		this.m_ElbowKneeData = elbowknee_data;
+		this.m_ShoulderThighData = shoulderthigh_data;
+	}
+
+	[Header("壁・床補正情報")]
+	public HandFootIKData.BorderCorrectData WallCorrect = new HandFootIKData.BorderCorrectData(Vector3.forward);
+
+	public HandFootIKData.BorderCorrectData FloorCorrect = new HandFootIKData.BorderCorrectData(Vector3.up);
+
+	public HandFootIKData.BorderCorrectType CorrectType;
+
+	public Transform ToCorrectBone;
+
+	[SerializeField]
+	[Space]
+	[Range(1f, 90f)]
+	private float m_BendFadeBorder = 30f;
+
+	public readonly IKEffector Effector;
+
+	public readonly IKMappingLimb IKMapping;
+
+	private ShoulderThighIKData m_ShoulderThighData;
+
+	private ElbowKneeIKData m_ElbowKneeData;
+
+	public enum BorderCorrectType
+	{
+		Bone,
+		HalfBody,
+		Chara,
+		All
+	}
+
+	[Serializable]
+	public class BorderCorrectData
+	{
+		public BorderCorrectData(Vector3 axis)
+		{
+			this.Axis = axis;
+		}
+
+		public void Reset()
+		{
+			this.Border = 0f;
+			this.Enable = false;
+		}
+
+		public float GetValue(Vector3 pos)
+		{
+			pos = KasaiUtility.Vec3Multiply(pos, this.Axis);
+			return pos.magnitude * Vector3.Dot(this.Axis, pos.normalized);
+		}
+
+		public bool CheckBorder(Vector3 check_pos, ref float diff)
+		{
+			float value = this.GetValue(check_pos);
+			diff = this.Border - value;
+			return value < this.Border;
+		}
+
+		public float Border;
+
+		public bool Enable;
+
+		public Vector3 Axis;
+	}
+}

+ 4 - 4
Assembly-CSharp/HandSignShortcut.cs

@@ -506,7 +506,7 @@ public class HandSignShortcut : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1310;
+			this.m_nVersion = 1320;
 		}
 
 		public void OnAfterDeserialize()
@@ -516,7 +516,7 @@ public class HandSignShortcut : MonoBehaviour
 		public bool Write()
 		{
 			string contents = JsonUtility.ToJson(this, true);
-			string path = Path.GetFullPath(".\\") + "MaidFingerDataList.json";
+			string path = UTY.gameProjectPath + "\\MaidFingerDataList.json";
 			try
 			{
 				File.WriteAllText(path, contents);
@@ -531,7 +531,7 @@ public class HandSignShortcut : MonoBehaviour
 
 		public HandSignShortcut.Serializer ReadAndSet()
 		{
-			string path = Path.GetFullPath(".\\") + "MaidFingerDataList.json";
+			string path = UTY.gameProjectPath + "\\MaidFingerDataList.json";
 			if (!File.Exists(path))
 			{
 				this.CreateDefaultData();
@@ -815,7 +815,7 @@ public class HandSignShortcut : MonoBehaviour
 		private const string CONF_NAME = "MaidFingerDataList.json";
 
 		[SerializeField]
-		private int m_nVersion = 1310;
+		private int m_nVersion = 1320;
 
 		[SerializeField]
 		private List<HandSignShortcut.MaidFingerData> MaidFingerDataList = new List<HandSignShortcut.MaidFingerData>();

+ 0 - 52
Assembly-CSharp/HeightIKCtrlData.cs

@@ -1,52 +0,0 @@
-using System;
-using RootMotion.FinalIK;
-using UnityEngine;
-
-[Serializable]
-public class HeightIKCtrlData : CCDIKCtrlData
-{
-	public HeightIKCtrlData(CCDIK ccd_ik, Transform[] chain_bones, FullBodyIKCtrl ik_ctrl, bool weight_fade = true, bool attach_ik = false) : base(ccd_ik, chain_bones, ik_ctrl, weight_fade, attach_ik)
-	{
-	}
-
-	public void CheckReachTarget()
-	{
-		if (!base.PointIK.IsIKExec || base.PointIK.BlendType == IKCtrlData.IKBlendType.IK_To_Detach)
-		{
-			return;
-		}
-		float num = Vector3.Distance(base.IKTarget.position, this.TargetBone.position);
-		if (num <= 0.05f || (num > 1f && base.PointIK.BlendNow))
-		{
-			return;
-		}
-		int value = this.MyIKCtrl.TgtMaid.GetProp(MPN.sintyou).value;
-		int value2 = base.PointIK.TgtMaid.GetProp(MPN.sintyou).value;
-		if (this.m_EachOtherIK && value < value2)
-		{
-			IKCtrlData ikdata = base.PointIK.TgtMaid.IKCtrl.GetIKData(base.PointIK.Tgt_AttachName, false);
-			if (base.PointIK.TgtMaid.IKCtrl.IsUpdateEnd)
-			{
-				ikdata.IKTarget.position += (this.TargetBone.position - base.IKTarget.position) * ikdata.PointIK.BlendWeight;
-				base.PointIK.TgtMaid.IKCtrl.SolverUpdate();
-			}
-		}
-		else if (!this.MyIKCtrl.DoHeightCover && !base.PointIK.BlendNow)
-		{
-			Vector3 vector = base.IKTarget.position - this.TargetBone.position;
-			this.MyIKCtrl.BodyTarget.position += vector;
-			foreach (IKCtrlData ikctrlData in this.MyIKCtrl.strIKDataPair.Values)
-			{
-				ikctrlData.SetTargetOffset(vector, false);
-			}
-			this.MyIKCtrl.BodyEffector.positionWeight = 1f;
-		}
-		this.MyIKCtrl.DoHeightCover = true;
-	}
-
-	public override void Update()
-	{
-		base.Update();
-		this.CheckReachTarget();
-	}
-}

ファイルの差分が大きいため隠しています
+ 594 - 452
Assembly-CSharp/IKCtrlData.cs


+ 2 - 2
Assembly-CSharp/ImgDisplay.cs

@@ -6,8 +6,8 @@ public class ImgDisplay : MonoBehaviour
 {
 	private void Start()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Img";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Img";
 		bool flag = false;
 		if (Directory.Exists(text))
 		{

+ 2 - 2
Assembly-CSharp/InfinityColorTextureCache.cs

@@ -229,8 +229,8 @@ public class InfinityColorTextureCache
 
 	public static string GetTimeFileName()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "ScreenShot/_tmp";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "ScreenShot/_tmp";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 3 - 3
Assembly-CSharp/Kasizuki/BigThumbnailKasizuki.cs

@@ -105,8 +105,8 @@ namespace Kasizuki
 
 		private void CheckCreateFrame()
 		{
-			string fullPath = Path.GetFullPath(".\\");
-			string text = fullPath + "Thumb";
+			string str = UTY.gameProjectPath + "\\";
+			string text = str + "Thumb";
 			if (!Directory.Exists(text))
 			{
 				Directory.CreateDirectory(text);
@@ -130,7 +130,7 @@ namespace Kasizuki
 		private void LoadFrameAndBG()
 		{
 			this.CheckCreateFrame();
-			string str = Path.GetFullPath(".\\") + "Thumb";
+			string str = UTY.gameProjectPath + "\\Thumb";
 			string f_strFileName = str + "/frame_back.png";
 			if (this.m_BGSprite.sprite2D == null)
 			{

+ 5 - 5
Assembly-CSharp/Kasizuki/KasizukiManager.cs

@@ -864,7 +864,7 @@ namespace Kasizuki
 		public void Serialize(BinaryWriter bw)
 		{
 			bw.Write("COM3D2_KASIZUKI");
-			bw.Write(1310);
+			bw.Write(1320);
 			this.SerializeOriginHeader(bw);
 			foreach (KeyValuePair<int, KasizukiManager.SaveData> keyValuePair in this.m_SaveDataArray)
 			{
@@ -1041,7 +1041,7 @@ namespace Kasizuki
 		public static Texture2D GetMaidThumbnail(Maid maid)
 		{
 			Texture2D result = null;
-			string text = Path.GetFullPath(".\\") + "Thumb\\";
+			string text = UTY.gameProjectPath + "\\Thumb\\";
 			if (!Directory.Exists(text))
 			{
 				Directory.CreateDirectory(text);
@@ -1065,7 +1065,7 @@ namespace Kasizuki
 
 		public static bool IsExistMaidThumbnail(Maid maid)
 		{
-			string text = Path.GetFullPath(".\\") + "Thumb\\";
+			string text = UTY.gameProjectPath + "\\Thumb\\";
 			if (!Directory.Exists(text))
 			{
 				return false;
@@ -1082,7 +1082,7 @@ namespace Kasizuki
 
 		private static void FixMaidThumbnails()
 		{
-			string text = Path.GetFullPath(".\\") + "Thumb\\";
+			string text = UTY.gameProjectPath + "\\Thumb\\";
 			if (!Directory.Exists(text))
 			{
 				return;
@@ -1131,7 +1131,7 @@ namespace Kasizuki
 
 		private static void DeleteTmpMaidThumnails()
 		{
-			string text = Path.GetFullPath(".\\") + "Thumb\\";
+			string text = UTY.gameProjectPath + "\\Thumb\\";
 			if (!Directory.Exists(text))
 			{
 				return;

+ 34 - 0
Assembly-CSharp/LimbIKData.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Linq;
+using RootMotion.FinalIK;
+using UnityEngine;
+
+public abstract class LimbIKData : IKCtrlData
+{
+	public LimbIKData(FullBodyIKCtrl ik_ctrl, FBIKChain chain, Transform tgt_bone, bool use_old = false) : base(ik_ctrl, tgt_bone, use_old, false)
+	{
+		this.Chain = chain;
+		this.m_ChainBones = (from node in this.Chain.nodes
+		select node.transform).ToArray<Transform>();
+	}
+
+	public override void SetPullState(bool pull_on)
+	{
+		if (this.m_OrijinPull < 0f)
+		{
+			this.m_OrijinPull = this.Chain.pull;
+		}
+		if (pull_on)
+		{
+			this.Chain.pull = this.m_OrijinPull;
+		}
+		else
+		{
+			this.Chain.pull = 0.1f;
+		}
+	}
+
+	public readonly FBIKChain Chain;
+
+	protected float m_OrijinPull = -1f;
+}

+ 33 - 33
Assembly-CSharp/Maid.cs

@@ -1378,7 +1378,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeProp(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP_LIST");
-		f_bwWrite.Write(1310);
+		f_bwWrite.Write(1320);
 		f_bwWrite.Write(this.m_dicMaidProp.Count);
 		int num = 0;
 		foreach (KeyValuePair<string, MaidProp> keyValuePair in this.m_dicMaidProp)
@@ -1412,7 +1412,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeMisc(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_MISC");
-		f_bwWrite.Write(1310);
+		f_bwWrite.Write(1320);
 		f_bwWrite.Write(this.m_nActiveSlotNo);
 		if (this.m_texIcon != null)
 		{
@@ -1437,7 +1437,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeBody(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_BODY");
-		f_bwWrite.Write(1310);
+		f_bwWrite.Write(1320);
 		return true;
 	}
 
@@ -1499,7 +1499,7 @@ public class Maid : MonoBehaviour
 			string text = GameMain.Instance.CMSystem.CM3D2Path + "\\Thumb\\" + this.status.guid + ".png";
 			if (File.Exists(text))
 			{
-				string text2 = Path.GetFullPath(".\\") + "Thumb\\" + this.status.guid + ".png";
+				string text2 = UTY.gameProjectPath + "\\Thumb\\" + this.status.guid + ".png";
 				if (!File.Exists(text2))
 				{
 					File.Copy(text, text2);
@@ -1846,8 +1846,8 @@ public class Maid : MonoBehaviour
 		{
 			texture2D = component.ShotThumCardOriginal();
 		}
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Thumb";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Thumb";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -1859,8 +1859,8 @@ public class Maid : MonoBehaviour
 
 	public void SetThumCard(Texture2D tex)
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Thumb";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Thumb";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -1888,8 +1888,8 @@ public class Maid : MonoBehaviour
 	public Texture2D GetThumCard()
 	{
 		Texture2D result = null;
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Thumb";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Thumb";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -1912,8 +1912,8 @@ public class Maid : MonoBehaviour
 
 	public static void DeletedTmpThumCards()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Thumb";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Thumb";
 		if (!Directory.Exists(text))
 		{
 			return;
@@ -1964,8 +1964,8 @@ public class Maid : MonoBehaviour
 
 	private void FixThumCard()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Thumb";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Thumb";
 		if (!Directory.Exists(text))
 		{
 			return;
@@ -1991,8 +1991,8 @@ public class Maid : MonoBehaviour
 
 	private void CheckOldThumCard()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "Thumb";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "Thumb";
 		if (!Directory.Exists(text))
 		{
 			return;
@@ -2104,8 +2104,8 @@ public class Maid : MonoBehaviour
 			{
 				this.body0.MuneYureL(1f);
 				this.body0.MuneYureR(1f);
-				this.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-				this.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+				this.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+				this.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 			}
 		}
 	}
@@ -2183,20 +2183,20 @@ public class Maid : MonoBehaviour
 		this.m_bFoceKuchipakuSelfUpdateTime = false;
 	}
 
-	public void IKTargetToAttachPoint(string tag, Maid tgt_maid, string tgt_name, string attachpoint_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, string axisbone = "", bool do_animation = false, bool is_next = false)
+	public void IKTargetToAttachPoint(string tag, Maid tgt_maid, string tgt_name, string attachpoint_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, string axisbone = "", bool do_animation = false, IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.Normal)
 	{
-		IKCtrlData ikdata = this.body0.IKCtrl.GetIKData(tag, true);
+		IKCtrlData ikdata = this.body0.IKCtrl.GetIKData(tag);
 		Transform axis_bone = null;
 		if (attach_type != IKCtrlData.IKAttachType.Rotate && !string.IsNullOrEmpty(axisbone))
 		{
 			axis_bone = CMT.SearchObjName(tgt_maid.body0.m_trBones, axisbone, true);
 		}
-		ikdata.SetIKSetting(attach_type, is_next, tgt_maid, this.body0.GetSlotNo(tgt_name), attachpoint_name, axis_bone, f_vecOffset, do_animation);
+		ikdata.SetIKSetting(attach_type, timing, tgt_maid, this.body0.GetSlotNo(tgt_name), attachpoint_name, axis_bone, f_vecOffset, do_animation);
 	}
 
-	public void IKTargetToBone(string tag, Maid tgt_maid, string tgtbone_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, bool search_sm = false, bool do_animation = false, bool is_next = false)
+	public void IKTargetToBone(string tag, Maid tgt_maid, string tgtbone_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, bool search_sm = false, bool do_animation = false, IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.Normal)
 	{
-		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag, true);
+		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag);
 		if (tgtbone_name != "無し")
 		{
 			Transform target;
@@ -2208,7 +2208,7 @@ public class Maid : MonoBehaviour
 			{
 				target = CMT.SearchObjName(tgt_maid.body0.SmBody, tgtbone_name, false);
 			}
-			ikdata.SetIKSetting(attach_type, is_next, tgt_maid, target, f_vecOffset, do_animation);
+			ikdata.SetIKSetting(attach_type, timing, tgt_maid, target, f_vecOffset, do_animation);
 		}
 		else
 		{
@@ -2217,7 +2217,7 @@ public class Maid : MonoBehaviour
 		}
 	}
 
-	public void IKTargetToOdogu(string tag, string odogu_name, string tgt_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, bool do_animation = false, bool is_next = false)
+	public void IKTargetToOdogu(string tag, string odogu_name, string tgt_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, bool do_animation = false, IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.Normal)
 	{
 		Transform transform = null;
 		GameObject prefabFromBg = GameMain.Instance.BgMgr.GetPrefabFromBg(odogu_name);
@@ -2252,25 +2252,25 @@ public class Maid : MonoBehaviour
 				});
 			}
 		}
-		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag, true);
-		ikdata.SetIKSetting(attach_type, is_next, transform, f_vecOffset, do_animation);
+		IKCtrlData ikdata = this.IKCtrl.GetIKData(tag);
+		ikdata.SetIKSetting(attach_type, timing, transform, f_vecOffset, do_animation);
 	}
 
-	public void IKTargetToIKBone(string my_tag, Maid f_maidTarget, string bone_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, bool do_animation = false, bool is_next = false)
+	public void IKTargetToIKBone(string my_tag, Maid f_maidTarget, string bone_name, Vector3 f_vecOffset, IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.Point, bool do_animation = false, IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.Normal)
 	{
-		IKCtrlData ikdata = f_maidTarget.IKCtrl.GetIKData(bone_name, true);
+		IKCtrlData ikdata = f_maidTarget.IKCtrl.GetIKData(bone_name);
 		if (!ikdata)
 		{
 			return;
 		}
 		Transform targetBone = ikdata.TargetBone;
-		IKCtrlData ikdata2 = this.IKCtrl.GetIKData(my_tag, true);
-		ikdata2.SetIKSetting(attach_type, is_next, f_maidTarget, bone_name, targetBone, f_vecOffset, do_animation);
+		IKCtrlData ikdata2 = this.IKCtrl.GetIKData(my_tag);
+		ikdata2.SetIKSetting(attach_type, timing, f_maidTarget, bone_name, targetBone, f_vecOffset, do_animation);
 	}
 
 	public void IKDetach(string name)
 	{
-		this.IKTargetToBone(name, null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+		this.IKTargetToBone(name, null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 	}
 
 	public void AllIKDetach(float blendtime = 0f)
@@ -2280,7 +2280,7 @@ public class Maid : MonoBehaviour
 		this.IKCtrl.AllForceIK = false;
 		foreach (string tag in this.IKCtrl.strIKDataPair.Keys)
 		{
-			this.IKTargetToBone(tag, null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+			this.IKTargetToBone(tag, null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 		}
 	}
 

+ 1 - 1
Assembly-CSharp/MaidParts.cs

@@ -37,7 +37,7 @@ public class MaidParts : MonoBehaviour
 	public unsafe bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MULTI_COL");
-		f_bwWrite.Write(1310);
+		f_bwWrite.Write(1320);
 		f_bwWrite.Write(this.m_aryPartsColor.Length);
 		for (int i = 0; i < this.m_aryPartsColor.Length; i++)
 		{

+ 1 - 1
Assembly-CSharp/MaidProp.cs

@@ -8,7 +8,7 @@ public class MaidProp
 	public bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP");
-		f_bwWrite.Write(1310);
+		f_bwWrite.Write(1320);
 		f_bwWrite.Write(this.idx);
 		f_bwWrite.Write(this.name);
 		f_bwWrite.Write(this.type);

+ 1 - 1
Assembly-CSharp/MaidStatus/Status.cs

@@ -1317,7 +1317,7 @@ namespace MaidStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_MAID_STATUS");
-			binary.Write(1310);
+			binary.Write(1320);
 			binary.Write(this.guid);
 			binary.Write(this.creationTime);
 			binary.Write((short)this.heroineType);

+ 5 - 5
Assembly-CSharp/Menu.cs

@@ -12,8 +12,8 @@ public class Menu : MonoBehaviour
 {
 	public static string[] GetModFiles()
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string path = fullPath + "Mod";
+		string str = UTY.gameProjectPath + "\\";
+		string path = str + "Mod";
 		if (!Directory.Exists(path))
 		{
 			return null;
@@ -910,8 +910,8 @@ public class Menu : MonoBehaviour
 		{
 			Debug.LogError("ExportModScript アイテムメニューファイルが読み込めませんでした。 : " + filename + " : " + ex.Message);
 		}
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "ModExport";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "ModExport";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -924,7 +924,7 @@ public class Menu : MonoBehaviour
 			Directory.CreateDirectory(text);
 		}
 		StreamWriter streamWriter = new StreamWriter(text + "\\" + text2 + ".txt", false, Encoding.UTF8);
-		streamWriter.WriteLine("出力バージョン\t" + 1310);
+		streamWriter.WriteLine("出力バージョン\t" + 1320);
 		streamWriter.WriteLine("基本アイテム\t" + filename.Replace(" ", ":"));
 		try
 		{

+ 3 - 1
Assembly-CSharp/Misc.cs

@@ -2,7 +2,7 @@
 
 public class Misc
 {
-	public const int GAME_VERSION = 1310;
+	public const int GAME_VERSION = 1320;
 
 	public const string GAME_DATA_PATH = "GameData";
 
@@ -38,6 +38,8 @@ public class Misc
 
 	public const string SHOP_URL_EN_PUBLIC = "https://com3d2-shop-en-inm.s-court.me";
 
+	public const string OFFICIAL_SITE = "http://com3d2.world/?shop";
+
 	public const string LAUNCHER_EXE = "COM3D2.exe";
 
 	public const string AUTO_PATH = "paths.dat";

+ 1 - 1
Assembly-CSharp/ModCompile.cs

@@ -604,7 +604,7 @@ public class ModCompile : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MESH");
-		binaryWriter.Write(1310);
+		binaryWriter.Write(1320);
 		string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(f_strMqoFile);
 		binaryWriter.Write(fileNameWithoutExtension);
 		binaryWriter.Write(exObjIn2.strName);

+ 7 - 7
Assembly-CSharp/MyRoomCustom/CreativeRoomManager.cs

@@ -158,7 +158,7 @@ namespace MyRoomCustom
 
 		public CreativeRoomManager.CreativeRoomHeader Save(int number)
 		{
-			string text = Path.GetFullPath(".\\");
+			string text = UTY.gameProjectPath + "\\";
 			text += "MyRoom\\";
 			string text2 = "Room_";
 			text2 += number.ToString("000");
@@ -208,7 +208,7 @@ namespace MyRoomCustom
 
 		public void Load(int number)
 		{
-			string text = Path.GetFullPath(".\\");
+			string text = UTY.gameProjectPath + "\\";
 			text += "MyRoom\\";
 			if (!Directory.Exists(text))
 			{
@@ -265,7 +265,7 @@ namespace MyRoomCustom
 
 		public CreativeRoomManager.CreativeRoomHeader GetSaveDataHeader(string number)
 		{
-			string str = Path.GetFullPath(".\\");
+			string str = UTY.gameProjectPath + "\\";
 			str += "MyRoom\\";
 			string text = "Room_" + number;
 			if (File.Exists(str + text + ".save"))
@@ -322,7 +322,7 @@ namespace MyRoomCustom
 			{
 				return;
 			}
-			string str = Path.GetFullPath(".\\");
+			string str = UTY.gameProjectPath + "\\";
 			str += "MyRoom\\";
 			string path = str + "Room_" + number + ".room";
 			FileStream fileStream = new FileStream(path, FileMode.Open);
@@ -417,7 +417,7 @@ namespace MyRoomCustom
 				if (CreativeRoomManager.m_CachedSaveDataDic == null)
 				{
 					CreativeRoomManager.m_CachedSaveDataDic = new StringDictionary();
-					string text = Path.GetFullPath(".\\");
+					string text = UTY.gameProjectPath + "\\";
 					text += "MyRoom\\";
 					if (Directory.Exists(text))
 					{
@@ -442,7 +442,7 @@ namespace MyRoomCustom
 				CreativeRoomManager.m_CachedSaveDataDic.Clear();
 			}
 			CreativeRoomManager.m_CachedSaveDataDic = new StringDictionary();
-			string text = Path.GetFullPath(".\\");
+			string text = UTY.gameProjectPath + "\\";
 			text += "MyRoom\\";
 			Dictionary<string, string> dictionary = null;
 			if (Directory.Exists(text))
@@ -476,7 +476,7 @@ namespace MyRoomCustom
 
 		private static void UpdateSaveDataGUID()
 		{
-			string text = Path.GetFullPath(".\\");
+			string text = UTY.gameProjectPath + "\\";
 			text += "MyRoom\\";
 			if (Directory.Exists(text))
 			{

+ 2 - 2
Assembly-CSharp/OvrHandCamera.cs

@@ -98,8 +98,8 @@ public class OvrHandCamera : MonoBehaviour
 
 	private string GetTimeFileName(bool f_bThum = false)
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "ScreenShot";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "ScreenShot";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 6 - 6
Assembly-CSharp/OvrIK.cs

@@ -1215,8 +1215,8 @@ public class OvrIK : MonoBehaviour
 	public static List<string> UpdateGeneralModelFileList()
 	{
 		OvrIK.m_listFileList.Clear();
-		string fullPath = Path.GetFullPath(".\\");
-		string path = fullPath + "Model";
+		string str = UTY.gameProjectPath + "\\";
+		string path = str + "Model";
 		if (!Directory.Exists(path))
 		{
 			return OvrIK.m_listFileList;
@@ -1568,7 +1568,7 @@ public class OvrIK : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1310;
+			this.m_nVersion = 1320;
 		}
 
 		public void OnAfterDeserialize()
@@ -1578,7 +1578,7 @@ public class OvrIK : MonoBehaviour
 		public bool Write()
 		{
 			string contents = JsonUtility.ToJson(this, true);
-			string path = Path.GetFullPath(".\\") + "OvrIK.json";
+			string path = UTY.gameProjectPath + "\\OvrIK.json";
 			try
 			{
 				File.WriteAllText(path, contents);
@@ -1593,7 +1593,7 @@ public class OvrIK : MonoBehaviour
 
 		public OvrIK.OvrIkConfig Read()
 		{
-			string path = Path.GetFullPath(".\\") + "OvrIK.json";
+			string path = UTY.gameProjectPath + "\\OvrIK.json";
 			if (!File.Exists(path))
 			{
 				this.Write();
@@ -1628,7 +1628,7 @@ public class OvrIK : MonoBehaviour
 		private const string CONF_NAME = "OvrIK.json";
 
 		[SerializeField]
-		private int m_nVersion = 1310;
+		private int m_nVersion = 1320;
 
 		[SerializeField]
 		private float solver_locomotion_weight = 1f;

+ 2 - 2
Assembly-CSharp/OvrSelfShotCamera.cs

@@ -123,8 +123,8 @@ public class OvrSelfShotCamera : MonoBehaviour
 
 	private string GetTimeFileName(bool f_bThum = false)
 	{
-		string fullPath = Path.GetFullPath(".\\");
-		string text = fullPath + "ScreenShot";
+		string str = UTY.gameProjectPath + "\\";
+		string text = str + "ScreenShot";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 1 - 1
Assembly-CSharp/PhotoModeSaveAndLoad.cs

@@ -450,7 +450,7 @@ public class PhotoModeSaveAndLoad : MonoBehaviour
 	private XElement CreateCommonData(string title, string comment)
 	{
 		string value = DateTime.ParseExact(DateTime.Now.ToString("yyyyMMddHHmmss"), "yyyyMMddHHmmss", null).ToString("yyyy.MM.dd HH:mm");
-		XElement xelement = new XElement("GameVersion", 1310);
+		XElement xelement = new XElement("GameVersion", 1320);
 		XElement xelement2 = new XElement("SaveTime", value);
 		XElement xelement3 = new XElement("Title", title);
 		XElement xelement4 = new XElement("Comment", comment);

+ 2 - 2
Assembly-CSharp/PhotoMotionData.cs

@@ -266,8 +266,8 @@ public class PhotoMotionData
 		}
 		if (!string.IsNullOrEmpty(this.direct_file))
 		{
-			maid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-			maid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+			maid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+			maid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 			if (!this.is_mod && !this.is_mypose)
 			{
 				maid.CrossFade(this.direct_file, false, this.is_loop, false, 0f, 1f);

+ 4 - 4
Assembly-CSharp/PhotoWindowManager.cs

@@ -74,7 +74,7 @@ public class PhotoWindowManager : BasePhotoWindowManager
 	{
 		get
 		{
-			return Path.GetFullPath(".\\") + "PhotoModeData\\";
+			return UTY.gameProjectPath + "\\PhotoModeData\\";
 		}
 	}
 
@@ -649,9 +649,9 @@ public class PhotoWindowManager : BasePhotoWindowManager
 	{
 		get
 		{
-			string fullPath = Path.GetFullPath(".\\");
-			string str = fullPath + "PhotoModeData/SaveData";
-			return str + "/PhotoModeUISetting.save";
+			string str = UTY.gameProjectPath + "\\";
+			string str2 = str + "PhotoModeData/SaveData";
+			return str2 + "/PhotoModeUISetting.save";
 		}
 	}
 

+ 1 - 1
Assembly-CSharp/PlayerStatus/Status.cs

@@ -831,7 +831,7 @@ namespace PlayerStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_PLAYER_STATUS");
-			binary.Write(1310);
+			binary.Write(1320);
 			binary.Write(this.playerName_);
 			binary.Write(this.days_);
 			binary.Write(this.totalPurchasePrice_);

+ 2 - 2
Assembly-CSharp/PoseEditWindow.cs

@@ -512,8 +512,8 @@ public class PoseEditWindow : BaseMaidPhotoWindow
 				motionWindow.CheckbtnStop.check = true;
 				motionWindow.OnClickStopCheck(motionWindow.CheckbtnStop);
 			}
-			base.mgr.select_maid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-			base.mgr.select_maid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+			base.mgr.select_maid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+			base.mgr.select_maid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 			this.ControlSelectBtnTab.ResetSelect();
 			Dictionary<PoseEditWindow.ControlType, UIWFTabButton> dictionary = new Dictionary<PoseEditWindow.ControlType, UIWFTabButton>();
 			foreach (UIWFTabButton uiwftabButton in this.ControlSelectBtnTab.button_list)

+ 9 - 0
Assembly-CSharp/Product.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Text;
 using I2.Loc;
 using UnityEngine;
@@ -133,6 +134,14 @@ public static class Product
 		}
 	}
 
+	public static bool lockDLCSiteLink
+	{
+		get
+		{
+			return Product.type == Product.Type.EnPublic && File.Exists(Path.Combine(UTY.gameProjectPath, "platform_others"));
+		}
+	}
+
 	public static void Initialize(AFileSystemBase fileSystem)
 	{
 		KeyValuePair<string, Product.Type>[] array = new KeyValuePair<string, Product.Type>[]

+ 45 - 12
Assembly-CSharp/SceneEdit.cs

@@ -3188,8 +3188,8 @@ public class SceneEdit : MonoBehaviour
 			MaidColliderCollect.RemoveColliderAll(maid);
 			maid.body0.SetMaskMode(TBody.MaskMode.None);
 			maid.OpenMouthLookTooth(false);
-			maid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-			maid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+			maid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+			maid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 			maid.Visible = false;
 		}
 		this.SetCameraOffset(SceneEdit.CAM_OFFS.CENTER);
@@ -3415,13 +3415,14 @@ public class SceneEdit : MonoBehaviour
 		{
 			get
 			{
-				if (Product.systemLanguage == Product.Language.Japanese)
+				string text = this.m_strMenuName;
+				if (Product.systemLanguage != Product.Language.Japanese)
 				{
-					return this.m_strMenuName;
+					string str = this.m_strCateName + "/" + Path.GetFileNameWithoutExtension(this.m_strMenuFileName).ToLower();
+					string translation = LocalizationManager.GetTranslation(str + "|name", true, 0, true, false, null, null);
+					text = ((!string.IsNullOrEmpty(translation)) ? translation.Replace("《改行》", "\n") : this.m_strMenuName);
 				}
-				string str = this.m_strCateName + "/" + Path.GetFileNameWithoutExtension(this.m_strMenuFileName).ToLower();
-				string translation = LocalizationManager.GetTranslation(str + "|name", true, 0, true, false, null, null);
-				return (!string.IsNullOrEmpty(translation)) ? translation.Replace("《改行》", "\n") : this.m_strMenuName;
+				return this.CountryReplace(text);
 			}
 		}
 
@@ -3429,13 +3430,14 @@ public class SceneEdit : MonoBehaviour
 		{
 			get
 			{
-				if (Product.systemLanguage == Product.Language.Japanese)
+				string text = this.m_strInfo;
+				if (Product.systemLanguage != Product.Language.Japanese)
 				{
-					return this.m_strInfo;
+					string str = this.m_strCateName + "/" + Path.GetFileNameWithoutExtension(this.m_strMenuFileName).ToLower();
+					string translation = LocalizationManager.GetTranslation(str + "|info", true, 0, true, false, null, null);
+					text = ((!string.IsNullOrEmpty(translation)) ? translation.Replace("《改行》", "\n") : this.m_strInfo);
 				}
-				string str = this.m_strCateName + "/" + Path.GetFileNameWithoutExtension(this.m_strMenuFileName).ToLower();
-				string translation = LocalizationManager.GetTranslation(str + "|info", true, 0, true, false, null, null);
-				return (!string.IsNullOrEmpty(translation)) ? translation.Replace("《改行》", "\n") : this.m_strInfo;
+				return this.CountryReplace(text);
 			}
 		}
 
@@ -3455,6 +3457,37 @@ public class SceneEdit : MonoBehaviour
 			}
 		}
 
+		public string CountryReplace(string text)
+		{
+			if (Product.isJapan)
+			{
+				return text;
+			}
+			string[][] array = new string[][]
+			{
+				new string[]
+				{
+					"ゴスロリ",
+					"ピュアゴス"
+				},
+				new string[]
+				{
+					"ロリゴス",
+					"プリティゴス"
+				},
+				new string[]
+				{
+					"ロリータ",
+					"プリティ"
+				}
+			};
+			foreach (string array3 in array)
+			{
+				text = text.Replace(array3[0], array3[1]);
+			}
+			return text;
+		}
+
 		public void Dispose()
 		{
 			UnityEngine.Object.DestroyImmediate(this.m_goButton);

+ 3 - 4
Assembly-CSharp/SceneEditWindow/WindowManager.cs

@@ -1,5 +1,4 @@
 using System;
-using System.IO;
 using UnityEngine;
 
 namespace SceneEditWindow
@@ -11,9 +10,9 @@ namespace SceneEditWindow
 		{
 			get
 			{
-				string fullPath = Path.GetFullPath(".\\");
-				string str = fullPath + "SaveData";
-				return str + "/EditUI.save";
+				string str = UTY.gameProjectPath + "\\";
+				string str2 = str + "SaveData";
+				return str2 + "/EditUI.save";
 			}
 		}
 

+ 1 - 1
Assembly-CSharp/SceneNPCEdit/SaveData.cs

@@ -10,7 +10,7 @@ namespace SceneNPCEdit
 		public static void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_NPCEDIT");
-			binary.Write(1310);
+			binary.Write(1320);
 			binary.Write(SaveData.presetData.Count);
 			foreach (KeyValuePair<int, byte[]> keyValuePair in SaveData.presetData)
 			{

+ 4 - 4
Assembly-CSharp/SceneVRCommunication.cs

@@ -256,8 +256,8 @@ public class SceneVRCommunication : MonoBehaviour
 						{
 							stockMaid.body0.MuneYureL(1f);
 							stockMaid.body0.MuneYureR(1f);
-							stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-							stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+							stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+							stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 							stockMaid.transform.localScale = Vector3.one;
 							stockMaid.StopKuchipakuPattern();
 							stockMaid.EyeToCamera(Maid.EyeMoveType.目と顔を向ける, 0f);
@@ -269,8 +269,8 @@ public class SceneVRCommunication : MonoBehaviour
 						Maid stockMan = characterMgr.GetStockMan(j);
 						if (stockMan != null && stockMan.body0 != null && stockMan.body0.isLoadedBody)
 						{
-							stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-							stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+							stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+							stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 							stockMan.DelPrefabAll();
 						}
 					}

+ 1 - 1
Assembly-CSharp/ScriptManager.cs

@@ -3217,7 +3217,7 @@ public class ScriptManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_SCRIPT");
-		binary.Write(1310);
+		binary.Write(1320);
 		this.adv_kag_.Serialize(binary);
 	}
 

+ 1 - 1
Assembly-CSharp/ShootCutInTex.cs

@@ -41,7 +41,7 @@ public class ShootCutInTex : MonoBehaviour
 		{
 			return true;
 		}
-		string text = Path.GetFullPath(".\\") + "AppealImage/";
+		string text = UTY.gameProjectPath + "\\AppealImage/";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 42 - 27
Assembly-CSharp/Shop.cs

@@ -63,17 +63,32 @@ public class Shop
 		}
 		HashSet<int> hashSet = new HashSet<int>();
 		CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "game_in_shop_itemlist", ref hashSet);
+		if (Product.type == Product.Type.EnPublic)
+		{
+			int[] array = new int[]
+			{
+				10,
+				20,
+				30,
+				40,
+				5000
+			};
+			foreach (int item in array)
+			{
+				hashSet.Remove(item);
+			}
+		}
 		using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen("game_in_shop_item_setting.nei"))
 		{
 			using (CsvParser csvParser2 = new CsvParser())
 			{
 				bool condition2 = csvParser2.Open(afileBase2);
 				NDebug.Assert(condition2, "game_in_shop_item_setting.nei\nopen failed.");
-				for (int l = 1; l < csvParser2.max_cell_y; l++)
+				for (int m = 1; m < csvParser2.max_cell_y; m++)
 				{
-					if (csvParser2.IsCellToExistData(0, l) && hashSet.Contains(csvParser2.GetCellAsInteger(0, l)))
+					if (csvParser2.IsCellToExistData(0, m) && hashSet.Contains(csvParser2.GetCellAsInteger(0, m)))
 					{
-						Shop.ItemData itemData = new Shop.ItemData(csvParser2, l);
+						Shop.ItemData itemData = new Shop.ItemData(csvParser2, m);
 						Shop.item_data_dic_.Add(itemData.id, itemData);
 					}
 				}
@@ -85,11 +100,11 @@ public class Shop
 			{
 				bool condition3 = csvParser3.Open(afileBase3);
 				NDebug.Assert(condition3, "game_in_shop_item_groups_setting.nei\nopen failed.");
-				for (int m = 1; m < csvParser3.max_cell_y; m++)
+				for (int n = 1; n < csvParser3.max_cell_y; n++)
 				{
-					if (csvParser3.IsCellToExistData(0, m) && hashSet.Contains(csvParser3.GetCellAsInteger(0, m)))
+					if (csvParser3.IsCellToExistData(0, n) && hashSet.Contains(csvParser3.GetCellAsInteger(0, n)))
 					{
-						Shop.ItemDataGroup itemDataGroup = new Shop.ItemDataGroup(csvParser3, m);
+						Shop.ItemDataGroup itemDataGroup = new Shop.ItemDataGroup(csvParser3, n);
 						Shop.item_data_dic_.Add(itemDataGroup.id, itemDataGroup);
 						Shop.item_data_group_dic_.Add(itemDataGroup.id, itemDataGroup);
 					}
@@ -104,11 +119,11 @@ public class Shop
 				{
 					bool condition4 = csvParser4.Open(afileBase4);
 					NDebug.Assert(condition4, "game_in_shop_event_item_setting.nei\nopen failed.");
-					for (int n = 1; n < csvParser4.max_cell_y; n++)
+					for (int num = 1; num < csvParser4.max_cell_y; num++)
 					{
-						if (csvParser4.IsCellToExistData(0, n) && hashSet.Contains(csvParser4.GetCellAsInteger(0, n)))
+						if (csvParser4.IsCellToExistData(0, num) && hashSet.Contains(csvParser4.GetCellAsInteger(0, num)))
 						{
-							Shop.ItemDataEvent itemDataEvent = new Shop.ItemDataEvent(csvParser4, n);
+							Shop.ItemDataEvent itemDataEvent = new Shop.ItemDataEvent(csvParser4, num);
 							Shop.item_data_dic_.Add(itemDataEvent.id, itemDataEvent);
 						}
 					}
@@ -121,40 +136,40 @@ public class Shop
 			{
 				bool condition5 = csvParser5.Open(afileBase5);
 				NDebug.Assert(condition5, "game_in_shop_setcard_setting.nei\nopen failed.");
-				for (int num = 1; num < csvParser5.max_cell_y; num++)
+				for (int num2 = 1; num2 < csvParser5.max_cell_y; num2++)
 				{
-					if (csvParser5.IsCellToExistData(0, num))
+					if (csvParser5.IsCellToExistData(0, num2))
 					{
-						int num2 = 0;
-						string cellAsString3 = csvParser5.GetCellAsString(num2++, num);
-						string[] array = cellAsString3.Split(new char[]
+						int num3 = 0;
+						string cellAsString3 = csvParser5.GetCellAsString(num3++, num2);
+						string[] array3 = cellAsString3.Split(new char[]
 						{
 							','
 						});
-						for (int num3 = 0; num3 < array.Length; num3++)
+						for (int num4 = 0; num4 < array3.Length; num4++)
 						{
-							array[num3] = array[num3].ToLower() + ".menu";
+							array3[num4] = array3[num4].ToLower() + ".menu";
 						}
 						HashSet<int> hashSet2 = new HashSet<int>();
-						while (num2 < csvParser5.max_cell_x)
+						while (num3 < csvParser5.max_cell_x)
 						{
-							if (!csvParser5.IsCellToExistData(num2, num))
+							if (!csvParser5.IsCellToExistData(num3, num2))
 							{
 								break;
 							}
-							int num4 = int.Parse(csvParser5.GetCellAsString(num2, num));
-							if (!Shop.item_data_dic_.ContainsKey(num4))
+							int num5 = int.Parse(csvParser5.GetCellAsString(num3, num2));
+							if (!Shop.item_data_dic_.ContainsKey(num5))
 							{
-								Debug.LogWarning("ショップアイテムID[" + num4 + "]は存在しません");
+								Debug.LogWarning("ショップアイテムID[" + num5 + "]は存在しません");
 								hashSet2.Clear();
 								break;
 							}
-							hashSet2.Add(num4);
-							num2++;
+							hashSet2.Add(num5);
+							num3++;
 						}
 						if (0 < hashSet2.Count)
 						{
-							Shop.set_card_list_.Add(new KeyValuePair<string[], HashSet<int>>(array, hashSet2));
+							Shop.set_card_list_.Add(new KeyValuePair<string[], HashSet<int>>(array3, hashSet2));
 						}
 					}
 				}
@@ -166,11 +181,11 @@ public class Shop
 			{
 				bool condition6 = csvParser6.Open(afileBase6);
 				NDebug.Assert(condition6, "game_in_shop_bg_setting.nei\nopen failed.");
-				for (int num5 = 1; num5 < csvParser6.max_cell_y; num5++)
+				for (int num6 = 1; num6 < csvParser6.max_cell_y; num6++)
 				{
-					if (csvParser6.IsCellToExistData(0, num5))
+					if (csvParser6.IsCellToExistData(0, num6))
 					{
-						Shop.BGData bgdata = new Shop.BGData(csvParser6, num5);
+						Shop.BGData bgdata = new Shop.BGData(csvParser6, num6);
 						NDebug.Assert(!Shop.bg_data_dic_.ContainsKey(bgdata.id), "ショップ背景設定id[" + bgdata.id + "]は重複しています");
 						Shop.bg_data_dic_.Add(bgdata.id, bgdata);
 					}

+ 97 - 0
Assembly-CSharp/ShoulderThighIKData.cs

@@ -0,0 +1,97 @@
+using System;
+using RootMotion.FinalIK;
+using UnityEngine;
+
+[Serializable]
+public class ShoulderThighIKData : LimbIKData
+{
+	public ShoulderThighIKData(IKEffector root_effector, FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone) : base(ik_ctrl, chain, tgt_bone, false)
+	{
+		this.Effector = root_effector;
+		this.Effector.target = base.IKTarget;
+		this.IKMapping = ik_mapping;
+		this.m_ForceIKEnable = true;
+	}
+
+	public override float PositionWeight
+	{
+		get
+		{
+			return this.Effector.positionWeight;
+		}
+		set
+		{
+			this.Effector.positionWeight = value;
+		}
+	}
+
+	public override float RotationWeight
+	{
+		get
+		{
+			return this.Effector.rotationWeight;
+		}
+		set
+		{
+			this.Effector.rotationWeight = value;
+		}
+	}
+
+	public ElbowKneeIKData ElbowKneeData
+	{
+		get
+		{
+			return this.m_ElbowKneeData;
+		}
+	}
+
+	public HandFootIKData HandFootData
+	{
+		get
+		{
+			return this.m_HandFootData;
+		}
+	}
+
+	protected override void SetTargetTransform(IKCtrlData.IKSettingData data, Vector3 pos, Quaternion rot)
+	{
+		base.SetTargetTransform(data, pos, rot);
+		Transform iktarget = this.m_HandFootData.IKTarget;
+		Transform iktarget2 = this.m_ElbowKneeData.IKTarget;
+		Vector3 position = this.TargetBone.InverseTransformPoint(this.m_ElbowKneeData.TargetBone.position);
+		Vector3 position2 = this.m_ElbowKneeData.TargetBone.InverseTransformPoint(this.m_HandFootData.TargetBone.position);
+		if (!data.IsPointAttach)
+		{
+			if (!this.m_ElbowKneeData.GetIKSettingData(IKCtrlData.IKAttachType.Rotate).IsIKExec)
+			{
+				iktarget2.rotation = base.IKTarget.rotation * this.m_ElbowKneeData.TargetBone.localRotation;
+			}
+			if (!this.m_HandFootData.GetIKSettingData(IKCtrlData.IKAttachType.Rotate).IsIKExec)
+			{
+				iktarget.rotation = iktarget2.rotation * this.m_HandFootData.TargetBone.localRotation;
+			}
+		}
+		if (!this.m_ElbowKneeData.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec)
+		{
+			iktarget2.position = base.IKTarget.TransformPoint(position);
+		}
+		if (!this.m_HandFootData.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec)
+		{
+			iktarget.position = iktarget2.TransformPoint(position2);
+		}
+	}
+
+	public void SetChainData(HandFootIKData handfoot_data, ElbowKneeIKData elbowknee_data)
+	{
+		this.m_HandFootData = handfoot_data;
+		this.m_ElbowKneeData = elbowknee_data;
+	}
+
+	public readonly IKEffector Effector;
+
+	public readonly IKMappingLimb IKMapping;
+
+	private ElbowKneeIKData m_ElbowKneeData;
+
+	private HandFootIKData m_HandFootData;
+}

+ 20 - 2
Assembly-CSharp/SystemShortcut.cs

@@ -35,7 +35,14 @@ public class SystemShortcut : MonoBehaviour
 		dictionary.Add(0, "System/ショートカット/コンフィグ");
 		dictionary.Add(3, "System/ショートカット/UI無し スクリーンショット");
 		dictionary.Add(4, "System/ショートカット/UI有り スクリーンショット");
-		dictionary.Add(6, "System/ショートカット/ショップ");
+		if (Product.lockDLCSiteLink)
+		{
+			dictionary.Add(6, "System/ショートカット/オフィシャルサイト");
+		}
+		else
+		{
+			dictionary.Add(6, "System/ショートカット/ショップ");
+		}
 		dictionary.Add(5, "System/ショートカット/タイトルへ");
 		dictionary.Add(2, "System/ショートカット/ゲーム情報");
 		dictionary.Add(1, "System/ショートカット/終了");
@@ -108,6 +115,10 @@ public class SystemShortcut : MonoBehaviour
 		UTY.GetChildObject(this.m_goBase, "Grid", false).GetComponent<UIGrid>().repositionNow = true;
 		SceneManager.activeSceneChanged += this.OnActiveSceneChanged;
 		SceneManager.sceneUnloaded += this.OnSceneUnloaded;
+		if (Product.lockDLCSiteLink)
+		{
+			this.m_goBtn[6].GetComponentInChildren<UIButton>().normalSprite = "systemicon_home";
+		}
 	}
 
 	private void OnClick_Gear()
@@ -304,7 +315,14 @@ public class SystemShortcut : MonoBehaviour
 
 	private void OnClick_Shop()
 	{
-		Application.OpenURL(GameMain.Instance.CMSystem.ShopURL);
+		if (Product.lockDLCSiteLink)
+		{
+			Application.OpenURL("http://com3d2.world/?shop");
+		}
+		else
+		{
+			Application.OpenURL(GameMain.Instance.CMSystem.ShopURL);
+		}
 	}
 
 	private void OnClick_VRCommHome()

+ 1 - 1
Assembly-CSharp/TBody.cs

@@ -2695,7 +2695,7 @@ public class TBody : MonoBehaviour
 			this.Thigh_L_pos_old = this.Thigh_L.position;
 			this.Thigh_R_pos_old = this.Thigh_R.position;
 		}
-		if (this.m_IKCtrl.IsSelfIKAttach)
+		if (this.m_IKCtrl.IsSelfIKAttach || this.m_IKCtrl.IsTargetIKAttachSelf(true))
 		{
 			for (int i = 0; i < this.goSlot.Count; i++)
 			{

+ 15 - 3
Assembly-CSharp/TitleCtrl.cs

@@ -17,6 +17,11 @@ public class TitleCtrl : MonoBehaviour
 		{
 			Localize component = UTY.GetChildObject(goTitlePanel, "Title/TitleLogo", false).GetComponent<Localize>();
 			Utility.SetLocalizeTerm(component, "SceneTitle/タイトルロゴ_全年齢", true);
+			if (Product.lockDLCSiteLink)
+			{
+				UIButton component2 = UTY.GetChildObject(goTitlePanel, "ButtonGroup/ShopGroup/Shop", false).GetComponent<UIButton>();
+				component2.normalSprite = "title_menu_officialsite";
+			}
 		}
 		this.m_listButton = new List<GameObject>();
 		this.m_dicTitleButton = new Dictionary<TitleMgr.ButtonType, TitleCtrl.TitleButton>();
@@ -50,8 +55,8 @@ public class TitleCtrl : MonoBehaviour
 					Vector3 localPosition = childObject.transform.localPosition;
 					childObject.transform.localPosition = new Vector3(localPosition.x, localPosition.y - (float)num, localPosition.z);
 					childObject.AddComponent<TitleMouseOver>();
-					UIButton component2 = childObject.GetComponent<UIButton>();
-					EventDelegate.Add(component2.onClick, new EventDelegate.Callback(BaseMgr<TitleMgr>.Instance.ClickButton));
+					UIButton component3 = childObject.GetComponent<UIButton>();
+					EventDelegate.Add(component3.onClick, new EventDelegate.Callback(BaseMgr<TitleMgr>.Instance.ClickButton));
 					GameObject childObject2 = UTY.GetChildObject(childObject, "SelectCursor", false);
 					titleButton.selectCursor = childObject2;
 					titleButton.name = buttonType;
@@ -200,7 +205,14 @@ public class TitleCtrl : MonoBehaviour
 
 	public void OnShop()
 	{
-		Application.OpenURL(GameMain.Instance.CMSystem.ShopURL);
+		if (Product.lockDLCSiteLink)
+		{
+			Application.OpenURL("http://com3d2.world/?shop");
+		}
+		else
+		{
+			Application.OpenURL(GameMain.Instance.CMSystem.ShopURL);
+		}
 	}
 
 	public void OnGuestMode(SaveAndLoadMgr saveAndLoadMgr)

+ 16 - 0
Assembly-CSharp/UTY.cs

@@ -9,6 +9,22 @@ using UnityEngine;
 
 public class UTY : MonoBehaviour
 {
+	public static string gameProjectPath
+	{
+		get
+		{
+			return Application.dataPath.Substring(0, Application.dataPath.LastIndexOf("/"));
+		}
+	}
+
+	public static string gameDataPath
+	{
+		get
+		{
+			return Path.Combine(UTY.gameProjectPath, "GameData");
+		}
+	}
+
 	public static string[] GetStringList(string sss)
 	{
 		List<string> list = new List<string>();

+ 181 - 0
Assembly-CSharp/UnityEngine/PostProcessing/AmbientOcclusionComponent.cs

@@ -0,0 +1,181 @@
+using System;
+using UnityEngine.Rendering;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class AmbientOcclusionComponent : PostProcessingComponentCommandBuffer<AmbientOcclusionModel>
+	{
+		private AmbientOcclusionComponent.OcclusionSource occlusionSource
+		{
+			get
+			{
+				if (this.context.isGBufferAvailable && !base.model.settings.forceForwardCompatibility)
+				{
+					return AmbientOcclusionComponent.OcclusionSource.GBuffer;
+				}
+				if (base.model.settings.highPrecision && (!this.context.isGBufferAvailable || base.model.settings.forceForwardCompatibility))
+				{
+					return AmbientOcclusionComponent.OcclusionSource.DepthTexture;
+				}
+				return AmbientOcclusionComponent.OcclusionSource.DepthNormalsTexture;
+			}
+		}
+
+		private bool ambientOnlySupported
+		{
+			get
+			{
+				return this.context.isHdr && base.model.settings.ambientOnly && this.context.isGBufferAvailable && !base.model.settings.forceForwardCompatibility;
+			}
+		}
+
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && base.model.settings.intensity > 0f && !this.context.interrupted;
+			}
+		}
+
+		public override DepthTextureMode GetCameraFlags()
+		{
+			DepthTextureMode depthTextureMode = DepthTextureMode.None;
+			if (this.occlusionSource == AmbientOcclusionComponent.OcclusionSource.DepthTexture)
+			{
+				depthTextureMode |= DepthTextureMode.Depth;
+			}
+			if (this.occlusionSource != AmbientOcclusionComponent.OcclusionSource.GBuffer)
+			{
+				depthTextureMode |= DepthTextureMode.DepthNormals;
+			}
+			return depthTextureMode;
+		}
+
+		public override string GetName()
+		{
+			return "Ambient Occlusion";
+		}
+
+		public override CameraEvent GetCameraEvent()
+		{
+			return (!this.ambientOnlySupported || this.context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.AmbientOcclusion)) ? CameraEvent.BeforeImageEffectsOpaque : CameraEvent.BeforeReflections;
+		}
+
+		public override void PopulateCommandBuffer(CommandBuffer cb)
+		{
+			AmbientOcclusionModel.Settings settings = base.model.settings;
+			Material mat = this.context.materialFactory.Get("Hidden/Post FX/Blit");
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Ambient Occlusion");
+			material.shaderKeywords = null;
+			material.SetFloat(AmbientOcclusionComponent.Uniforms._Intensity, settings.intensity);
+			material.SetFloat(AmbientOcclusionComponent.Uniforms._Radius, settings.radius);
+			material.SetFloat(AmbientOcclusionComponent.Uniforms._Downsample, (!settings.downsampling) ? 1f : 0.5f);
+			material.SetInt(AmbientOcclusionComponent.Uniforms._SampleCount, (int)settings.sampleCount);
+			if (!this.context.isGBufferAvailable && RenderSettings.fog)
+			{
+				material.SetVector(AmbientOcclusionComponent.Uniforms._FogParams, new Vector3(RenderSettings.fogDensity, RenderSettings.fogStartDistance, RenderSettings.fogEndDistance));
+				FogMode fogMode = RenderSettings.fogMode;
+				if (fogMode != FogMode.Linear)
+				{
+					if (fogMode != FogMode.Exponential)
+					{
+						if (fogMode == FogMode.ExponentialSquared)
+						{
+							material.EnableKeyword("FOG_EXP2");
+						}
+					}
+					else
+					{
+						material.EnableKeyword("FOG_EXP");
+					}
+				}
+				else
+				{
+					material.EnableKeyword("FOG_LINEAR");
+				}
+			}
+			else
+			{
+				material.EnableKeyword("FOG_OFF");
+			}
+			int width = this.context.width;
+			int height = this.context.height;
+			int num = (!settings.downsampling) ? 1 : 2;
+			int nameID = AmbientOcclusionComponent.Uniforms._OcclusionTexture1;
+			cb.GetTemporaryRT(nameID, width / num, height / num, 0, FilterMode.Bilinear, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
+			cb.Blit(null, nameID, material, (int)this.occlusionSource);
+			int occlusionTexture = AmbientOcclusionComponent.Uniforms._OcclusionTexture2;
+			cb.GetTemporaryRT(occlusionTexture, width, height, 0, FilterMode.Bilinear, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
+			cb.SetGlobalTexture(AmbientOcclusionComponent.Uniforms._MainTex, nameID);
+			cb.Blit(nameID, occlusionTexture, material, (this.occlusionSource != AmbientOcclusionComponent.OcclusionSource.GBuffer) ? 3 : 4);
+			cb.ReleaseTemporaryRT(nameID);
+			nameID = AmbientOcclusionComponent.Uniforms._OcclusionTexture;
+			cb.GetTemporaryRT(nameID, width, height, 0, FilterMode.Bilinear, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
+			cb.SetGlobalTexture(AmbientOcclusionComponent.Uniforms._MainTex, occlusionTexture);
+			cb.Blit(occlusionTexture, nameID, material, 5);
+			cb.ReleaseTemporaryRT(occlusionTexture);
+			if (this.context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.AmbientOcclusion))
+			{
+				cb.SetGlobalTexture(AmbientOcclusionComponent.Uniforms._MainTex, nameID);
+				cb.Blit(nameID, BuiltinRenderTextureType.CameraTarget, material, 8);
+				this.context.Interrupt();
+			}
+			else if (this.ambientOnlySupported)
+			{
+				cb.SetRenderTarget(this.m_MRT, BuiltinRenderTextureType.CameraTarget);
+				cb.DrawMesh(GraphicsUtils.quad, Matrix4x4.identity, material, 0, 7);
+			}
+			else
+			{
+				RenderTextureFormat format = (!this.context.isHdr) ? RenderTextureFormat.Default : RenderTextureFormat.DefaultHDR;
+				int tempRT = AmbientOcclusionComponent.Uniforms._TempRT;
+				cb.GetTemporaryRT(tempRT, this.context.width, this.context.height, 0, FilterMode.Bilinear, format);
+				cb.Blit(BuiltinRenderTextureType.CameraTarget, tempRT, mat, 0);
+				cb.SetGlobalTexture(AmbientOcclusionComponent.Uniforms._MainTex, tempRT);
+				cb.Blit(tempRT, BuiltinRenderTextureType.CameraTarget, material, 6);
+				cb.ReleaseTemporaryRT(tempRT);
+			}
+			cb.ReleaseTemporaryRT(nameID);
+		}
+
+		private const string k_BlitShaderString = "Hidden/Post FX/Blit";
+
+		private const string k_ShaderString = "Hidden/Post FX/Ambient Occlusion";
+
+		private readonly RenderTargetIdentifier[] m_MRT = new RenderTargetIdentifier[]
+		{
+			BuiltinRenderTextureType.GBuffer0,
+			BuiltinRenderTextureType.CameraTarget
+		};
+
+		private static class Uniforms
+		{
+			internal static readonly int _Intensity = Shader.PropertyToID("_Intensity");
+
+			internal static readonly int _Radius = Shader.PropertyToID("_Radius");
+
+			internal static readonly int _FogParams = Shader.PropertyToID("_FogParams");
+
+			internal static readonly int _Downsample = Shader.PropertyToID("_Downsample");
+
+			internal static readonly int _SampleCount = Shader.PropertyToID("_SampleCount");
+
+			internal static readonly int _OcclusionTexture1 = Shader.PropertyToID("_OcclusionTexture1");
+
+			internal static readonly int _OcclusionTexture2 = Shader.PropertyToID("_OcclusionTexture2");
+
+			internal static readonly int _OcclusionTexture = Shader.PropertyToID("_OcclusionTexture");
+
+			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");
+
+			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");
+		}
+
+		private enum OcclusionSource
+		{
+			DepthTexture,
+			DepthNormalsTexture,
+			GBuffer
+		}
+	}
+}

+ 80 - 0
Assembly-CSharp/UnityEngine/PostProcessing/AmbientOcclusionModel.cs

@@ -0,0 +1,80 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class AmbientOcclusionModel : PostProcessingModel
+	{
+		public AmbientOcclusionModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = AmbientOcclusionModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private AmbientOcclusionModel.Settings m_Settings = AmbientOcclusionModel.Settings.defaultSettings;
+
+		public enum SampleCount
+		{
+			Lowest = 3,
+			Low = 6,
+			Medium = 10,
+			High = 16
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static AmbientOcclusionModel.Settings defaultSettings
+			{
+				get
+				{
+					return new AmbientOcclusionModel.Settings
+					{
+						intensity = 1f,
+						radius = 0.3f,
+						sampleCount = AmbientOcclusionModel.SampleCount.Medium,
+						downsampling = true,
+						forceForwardCompatibility = false,
+						ambientOnly = false,
+						highPrecision = false
+					};
+				}
+			}
+
+			[Range(0f, 4f)]
+			[Tooltip("Degree of darkness produced by the effect.")]
+			public float intensity;
+
+			[Min(0.0001f)]
+			[Tooltip("Radius of sample points, which affects extent of darkened areas.")]
+			public float radius;
+
+			[Tooltip("Number of sample points, which affects quality and performance.")]
+			public AmbientOcclusionModel.SampleCount sampleCount;
+
+			[Tooltip("Halves the resolution of the effect to increase performance at the cost of visual quality.")]
+			public bool downsampling;
+
+			[Tooltip("Forces compatibility with Forward rendered objects when working with the Deferred rendering path.")]
+			public bool forceForwardCompatibility;
+
+			[Tooltip("Enables the ambient-only mode in that the effect only affects ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering.")]
+			public bool ambientOnly;
+
+			[Tooltip("Toggles the use of a higher precision depth texture with the forward rendering path (may impact performances). Has no effect with the deferred rendering path.")]
+			public bool highPrecision;
+		}
+	}
+}

+ 226 - 0
Assembly-CSharp/UnityEngine/PostProcessing/AntialiasingModel.cs

@@ -0,0 +1,226 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class AntialiasingModel : PostProcessingModel
+	{
+		public AntialiasingModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = AntialiasingModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private AntialiasingModel.Settings m_Settings = AntialiasingModel.Settings.defaultSettings;
+
+		public enum Method
+		{
+			Fxaa,
+			Taa
+		}
+
+		public enum FxaaPreset
+		{
+			ExtremePerformance,
+			Performance,
+			Default,
+			Quality,
+			ExtremeQuality
+		}
+
+		[Serializable]
+		public struct FxaaQualitySettings
+		{
+			[Tooltip("The amount of desired sub-pixel aliasing removal. Effects the sharpeness of the output.")]
+			[Range(0f, 1f)]
+			public float subpixelAliasingRemovalAmount;
+
+			[Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")]
+			[Range(0.063f, 0.333f)]
+			public float edgeDetectionThreshold;
+
+			[Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")]
+			[Range(0f, 0.0833f)]
+			public float minimumRequiredLuminance;
+
+			public static AntialiasingModel.FxaaQualitySettings[] presets = new AntialiasingModel.FxaaQualitySettings[]
+			{
+				new AntialiasingModel.FxaaQualitySettings
+				{
+					subpixelAliasingRemovalAmount = 0f,
+					edgeDetectionThreshold = 0.333f,
+					minimumRequiredLuminance = 0.0833f
+				},
+				new AntialiasingModel.FxaaQualitySettings
+				{
+					subpixelAliasingRemovalAmount = 0.25f,
+					edgeDetectionThreshold = 0.25f,
+					minimumRequiredLuminance = 0.0833f
+				},
+				new AntialiasingModel.FxaaQualitySettings
+				{
+					subpixelAliasingRemovalAmount = 0.75f,
+					edgeDetectionThreshold = 0.166f,
+					minimumRequiredLuminance = 0.0833f
+				},
+				new AntialiasingModel.FxaaQualitySettings
+				{
+					subpixelAliasingRemovalAmount = 1f,
+					edgeDetectionThreshold = 0.125f,
+					minimumRequiredLuminance = 0.0625f
+				},
+				new AntialiasingModel.FxaaQualitySettings
+				{
+					subpixelAliasingRemovalAmount = 1f,
+					edgeDetectionThreshold = 0.063f,
+					minimumRequiredLuminance = 0.0312f
+				}
+			};
+		}
+
+		[Serializable]
+		public struct FxaaConsoleSettings
+		{
+			[Tooltip("The amount of spread applied to the sampling coordinates while sampling for subpixel information.")]
+			[Range(0.33f, 0.5f)]
+			public float subpixelSpreadAmount;
+
+			[Tooltip("This value dictates how sharp the edges in the image are kept; a higher value implies sharper edges.")]
+			[Range(2f, 8f)]
+			public float edgeSharpnessAmount;
+
+			[Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")]
+			[Range(0.125f, 0.25f)]
+			public float edgeDetectionThreshold;
+
+			[Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")]
+			[Range(0.04f, 0.06f)]
+			public float minimumRequiredLuminance;
+
+			public static AntialiasingModel.FxaaConsoleSettings[] presets = new AntialiasingModel.FxaaConsoleSettings[]
+			{
+				new AntialiasingModel.FxaaConsoleSettings
+				{
+					subpixelSpreadAmount = 0.33f,
+					edgeSharpnessAmount = 8f,
+					edgeDetectionThreshold = 0.25f,
+					minimumRequiredLuminance = 0.06f
+				},
+				new AntialiasingModel.FxaaConsoleSettings
+				{
+					subpixelSpreadAmount = 0.33f,
+					edgeSharpnessAmount = 8f,
+					edgeDetectionThreshold = 0.125f,
+					minimumRequiredLuminance = 0.06f
+				},
+				new AntialiasingModel.FxaaConsoleSettings
+				{
+					subpixelSpreadAmount = 0.5f,
+					edgeSharpnessAmount = 8f,
+					edgeDetectionThreshold = 0.125f,
+					minimumRequiredLuminance = 0.05f
+				},
+				new AntialiasingModel.FxaaConsoleSettings
+				{
+					subpixelSpreadAmount = 0.5f,
+					edgeSharpnessAmount = 4f,
+					edgeDetectionThreshold = 0.125f,
+					minimumRequiredLuminance = 0.04f
+				},
+				new AntialiasingModel.FxaaConsoleSettings
+				{
+					subpixelSpreadAmount = 0.5f,
+					edgeSharpnessAmount = 2f,
+					edgeDetectionThreshold = 0.125f,
+					minimumRequiredLuminance = 0.04f
+				}
+			};
+		}
+
+		[Serializable]
+		public struct FxaaSettings
+		{
+			public static AntialiasingModel.FxaaSettings defaultSettings
+			{
+				get
+				{
+					return new AntialiasingModel.FxaaSettings
+					{
+						preset = AntialiasingModel.FxaaPreset.Default
+					};
+				}
+			}
+
+			public AntialiasingModel.FxaaPreset preset;
+		}
+
+		[Serializable]
+		public struct TaaSettings
+		{
+			public static AntialiasingModel.TaaSettings defaultSettings
+			{
+				get
+				{
+					return new AntialiasingModel.TaaSettings
+					{
+						jitterSpread = 0.75f,
+						sharpen = 0.3f,
+						stationaryBlending = 0.95f,
+						motionBlending = 0.85f
+					};
+				}
+			}
+
+			[Tooltip("The diameter (in texels) inside which jitter samples are spread. Smaller values result in crisper but more aliased output, while larger values result in more stable but blurrier output.")]
+			[Range(0.1f, 1f)]
+			public float jitterSpread;
+
+			[Tooltip("Controls the amount of sharpening applied to the color buffer.")]
+			[Range(0f, 3f)]
+			public float sharpen;
+
+			[Tooltip("The blend coefficient for a stationary fragment. Controls the percentage of history sample blended into the final color.")]
+			[Range(0f, 0.99f)]
+			public float stationaryBlending;
+
+			[Tooltip("The blend coefficient for a fragment with significant motion. Controls the percentage of history sample blended into the final color.")]
+			[Range(0f, 0.99f)]
+			public float motionBlending;
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static AntialiasingModel.Settings defaultSettings
+			{
+				get
+				{
+					return new AntialiasingModel.Settings
+					{
+						method = AntialiasingModel.Method.Fxaa,
+						fxaaSettings = AntialiasingModel.FxaaSettings.defaultSettings,
+						taaSettings = AntialiasingModel.TaaSettings.defaultSettings
+					};
+				}
+			}
+
+			public AntialiasingModel.Method method;
+
+			public AntialiasingModel.FxaaSettings fxaaSettings;
+
+			public AntialiasingModel.TaaSettings taaSettings;
+		}
+	}
+}

+ 117 - 0
Assembly-CSharp/UnityEngine/PostProcessing/BloomComponent.cs

@@ -0,0 +1,117 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class BloomComponent : PostProcessingComponentRenderTexture<BloomModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && base.model.settings.bloom.intensity > 0f && !this.context.interrupted;
+			}
+		}
+
+		public void Prepare(RenderTexture source, Material uberMaterial, Texture autoExposure)
+		{
+			BloomModel.BloomSettings bloom = base.model.settings.bloom;
+			BloomModel.LensDirtSettings lensDirt = base.model.settings.lensDirt;
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Bloom");
+			material.shaderKeywords = null;
+			material.SetTexture(BloomComponent.Uniforms._AutoExposure, autoExposure);
+			int width = this.context.width / 2;
+			int num = this.context.height / 2;
+			bool isMobilePlatform = Application.isMobilePlatform;
+			RenderTextureFormat format = (!isMobilePlatform) ? RenderTextureFormat.DefaultHDR : RenderTextureFormat.Default;
+			float num2 = Mathf.Log((float)num, 2f) + bloom.radius - 8f;
+			int num3 = (int)num2;
+			int num4 = Mathf.Clamp(num3, 1, 16);
+			float thresholdLinear = bloom.thresholdLinear;
+			material.SetFloat(BloomComponent.Uniforms._Threshold, thresholdLinear);
+			float num5 = thresholdLinear * bloom.softKnee + 1E-05f;
+			Vector3 v = new Vector3(thresholdLinear - num5, num5 * 2f, 0.25f / num5);
+			material.SetVector(BloomComponent.Uniforms._Curve, v);
+			material.SetFloat(BloomComponent.Uniforms._PrefilterOffs, (!bloom.antiFlicker) ? 0f : -0.5f);
+			float num6 = 0.5f + num2 - (float)num3;
+			material.SetFloat(BloomComponent.Uniforms._SampleScale, num6);
+			if (bloom.antiFlicker)
+			{
+				material.EnableKeyword("ANTI_FLICKER");
+			}
+			RenderTexture renderTexture = this.context.renderTextureFactory.Get(width, num, 0, format, RenderTextureReadWrite.Default, FilterMode.Bilinear, TextureWrapMode.Clamp, "FactoryTempTexture");
+			Graphics.Blit(source, renderTexture, material, 0);
+			RenderTexture renderTexture2 = renderTexture;
+			for (int i = 0; i < num4; i++)
+			{
+				this.m_BlurBuffer1[i] = this.context.renderTextureFactory.Get(renderTexture2.width / 2, renderTexture2.height / 2, 0, format, RenderTextureReadWrite.Default, FilterMode.Bilinear, TextureWrapMode.Clamp, "FactoryTempTexture");
+				int pass = (i != 0) ? 2 : 1;
+				Graphics.Blit(renderTexture2, this.m_BlurBuffer1[i], material, pass);
+				renderTexture2 = this.m_BlurBuffer1[i];
+			}
+			for (int j = num4 - 2; j >= 0; j--)
+			{
+				RenderTexture renderTexture3 = this.m_BlurBuffer1[j];
+				material.SetTexture(BloomComponent.Uniforms._BaseTex, renderTexture3);
+				this.m_BlurBuffer2[j] = this.context.renderTextureFactory.Get(renderTexture3.width, renderTexture3.height, 0, format, RenderTextureReadWrite.Default, FilterMode.Bilinear, TextureWrapMode.Clamp, "FactoryTempTexture");
+				Graphics.Blit(renderTexture2, this.m_BlurBuffer2[j], material, 3);
+				renderTexture2 = this.m_BlurBuffer2[j];
+			}
+			RenderTexture renderTexture4 = renderTexture2;
+			for (int k = 0; k < 16; k++)
+			{
+				if (this.m_BlurBuffer1[k] != null)
+				{
+					this.context.renderTextureFactory.Release(this.m_BlurBuffer1[k]);
+				}
+				if (this.m_BlurBuffer2[k] != null && this.m_BlurBuffer2[k] != renderTexture4)
+				{
+					this.context.renderTextureFactory.Release(this.m_BlurBuffer2[k]);
+				}
+				this.m_BlurBuffer1[k] = null;
+				this.m_BlurBuffer2[k] = null;
+			}
+			this.context.renderTextureFactory.Release(renderTexture);
+			uberMaterial.SetTexture(BloomComponent.Uniforms._BloomTex, renderTexture4);
+			uberMaterial.SetVector(BloomComponent.Uniforms._Bloom_Settings, new Vector2(num6, bloom.intensity));
+			if (lensDirt.intensity > 0f && lensDirt.texture != null)
+			{
+				uberMaterial.SetTexture(BloomComponent.Uniforms._Bloom_DirtTex, lensDirt.texture);
+				uberMaterial.SetFloat(BloomComponent.Uniforms._Bloom_DirtIntensity, lensDirt.intensity);
+				uberMaterial.EnableKeyword("BLOOM_LENS_DIRT");
+			}
+			else
+			{
+				uberMaterial.EnableKeyword("BLOOM");
+			}
+		}
+
+		private const int k_MaxPyramidBlurLevel = 16;
+
+		private readonly RenderTexture[] m_BlurBuffer1 = new RenderTexture[16];
+
+		private readonly RenderTexture[] m_BlurBuffer2 = new RenderTexture[16];
+
+		private static class Uniforms
+		{
+			internal static readonly int _AutoExposure = Shader.PropertyToID("_AutoExposure");
+
+			internal static readonly int _Threshold = Shader.PropertyToID("_Threshold");
+
+			internal static readonly int _Curve = Shader.PropertyToID("_Curve");
+
+			internal static readonly int _PrefilterOffs = Shader.PropertyToID("_PrefilterOffs");
+
+			internal static readonly int _SampleScale = Shader.PropertyToID("_SampleScale");
+
+			internal static readonly int _BaseTex = Shader.PropertyToID("_BaseTex");
+
+			internal static readonly int _BloomTex = Shader.PropertyToID("_BloomTex");
+
+			internal static readonly int _Bloom_Settings = Shader.PropertyToID("_Bloom_Settings");
+
+			internal static readonly int _Bloom_DirtTex = Shader.PropertyToID("_Bloom_DirtTex");
+
+			internal static readonly int _Bloom_DirtIntensity = Shader.PropertyToID("_Bloom_DirtIntensity");
+		}
+	}
+}

+ 121 - 0
Assembly-CSharp/UnityEngine/PostProcessing/BloomModel.cs

@@ -0,0 +1,121 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class BloomModel : PostProcessingModel
+	{
+		public BloomModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = BloomModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private BloomModel.Settings m_Settings = BloomModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct BloomSettings
+		{
+			public float thresholdLinear
+			{
+				get
+				{
+					return Mathf.GammaToLinearSpace(this.threshold);
+				}
+				set
+				{
+					this.threshold = Mathf.LinearToGammaSpace(value);
+				}
+			}
+
+			public static BloomModel.BloomSettings defaultSettings
+			{
+				get
+				{
+					return new BloomModel.BloomSettings
+					{
+						intensity = 0.5f,
+						threshold = 1.1f,
+						softKnee = 0.5f,
+						radius = 4f,
+						antiFlicker = false
+					};
+				}
+			}
+
+			[Min(0f)]
+			[Tooltip("Strength of the bloom filter.")]
+			public float intensity;
+
+			[Min(0f)]
+			[Tooltip("Filters out pixels under this level of brightness.")]
+			public float threshold;
+
+			[Range(0f, 1f)]
+			[Tooltip("Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold).")]
+			public float softKnee;
+
+			[Range(1f, 7f)]
+			[Tooltip("Changes extent of veiling effects in a screen resolution-independent fashion.")]
+			public float radius;
+
+			[Tooltip("Reduces flashing noise with an additional filter.")]
+			public bool antiFlicker;
+		}
+
+		[Serializable]
+		public struct LensDirtSettings
+		{
+			public static BloomModel.LensDirtSettings defaultSettings
+			{
+				get
+				{
+					return new BloomModel.LensDirtSettings
+					{
+						texture = null,
+						intensity = 3f
+					};
+				}
+			}
+
+			[Tooltip("Dirtiness texture to add smudges or dust to the lens.")]
+			public Texture texture;
+
+			[Min(0f)]
+			[Tooltip("Amount of lens dirtiness.")]
+			public float intensity;
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static BloomModel.Settings defaultSettings
+			{
+				get
+				{
+					return new BloomModel.Settings
+					{
+						bloom = BloomModel.BloomSettings.defaultSettings,
+						lensDirt = BloomModel.LensDirtSettings.defaultSettings
+					};
+				}
+			}
+
+			public BloomModel.BloomSettings bloom;
+
+			public BloomModel.LensDirtSettings lensDirt;
+		}
+	}
+}

+ 244 - 0
Assembly-CSharp/UnityEngine/PostProcessing/BuiltinDebugViewsComponent.cs

@@ -0,0 +1,244 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine.Rendering;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class BuiltinDebugViewsComponent : PostProcessingComponentCommandBuffer<BuiltinDebugViewsModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.IsModeActive(BuiltinDebugViewsModel.Mode.Depth) || base.model.IsModeActive(BuiltinDebugViewsModel.Mode.Normals) || base.model.IsModeActive(BuiltinDebugViewsModel.Mode.MotionVectors);
+			}
+		}
+
+		public override DepthTextureMode GetCameraFlags()
+		{
+			BuiltinDebugViewsModel.Mode mode = base.model.settings.mode;
+			DepthTextureMode depthTextureMode = DepthTextureMode.None;
+			if (mode != BuiltinDebugViewsModel.Mode.Normals)
+			{
+				if (mode != BuiltinDebugViewsModel.Mode.MotionVectors)
+				{
+					if (mode == BuiltinDebugViewsModel.Mode.Depth)
+					{
+						depthTextureMode |= DepthTextureMode.Depth;
+					}
+				}
+				else
+				{
+					depthTextureMode |= (DepthTextureMode.Depth | DepthTextureMode.MotionVectors);
+				}
+			}
+			else
+			{
+				depthTextureMode |= DepthTextureMode.DepthNormals;
+			}
+			return depthTextureMode;
+		}
+
+		public override CameraEvent GetCameraEvent()
+		{
+			return (base.model.settings.mode != BuiltinDebugViewsModel.Mode.MotionVectors) ? CameraEvent.BeforeImageEffectsOpaque : CameraEvent.BeforeImageEffects;
+		}
+
+		public override string GetName()
+		{
+			return "Builtin Debug Views";
+		}
+
+		public override void PopulateCommandBuffer(CommandBuffer cb)
+		{
+			BuiltinDebugViewsModel.Settings settings = base.model.settings;
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views");
+			material.shaderKeywords = null;
+			if (this.context.isGBufferAvailable)
+			{
+				material.EnableKeyword("SOURCE_GBUFFER");
+			}
+			BuiltinDebugViewsModel.Mode mode = settings.mode;
+			if (mode != BuiltinDebugViewsModel.Mode.Depth)
+			{
+				if (mode != BuiltinDebugViewsModel.Mode.Normals)
+				{
+					if (mode == BuiltinDebugViewsModel.Mode.MotionVectors)
+					{
+						this.MotionVectorsPass(cb);
+					}
+				}
+				else
+				{
+					this.DepthNormalsPass(cb);
+				}
+			}
+			else
+			{
+				this.DepthPass(cb);
+			}
+			this.context.Interrupt();
+		}
+
+		private void DepthPass(CommandBuffer cb)
+		{
+			Material mat = this.context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views");
+			BuiltinDebugViewsModel.DepthSettings depth = base.model.settings.depth;
+			cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._DepthScale, 1f / depth.scale);
+			cb.Blit(null, BuiltinRenderTextureType.CameraTarget, mat, 0);
+		}
+
+		private void DepthNormalsPass(CommandBuffer cb)
+		{
+			Material mat = this.context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views");
+			cb.Blit(null, BuiltinRenderTextureType.CameraTarget, mat, 1);
+		}
+
+		private void MotionVectorsPass(CommandBuffer cb)
+		{
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views");
+			BuiltinDebugViewsModel.MotionVectorsSettings motionVectors = base.model.settings.motionVectors;
+			int nameID = BuiltinDebugViewsComponent.Uniforms._TempRT;
+			cb.GetTemporaryRT(nameID, this.context.width, this.context.height, 0, FilterMode.Bilinear);
+			cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Opacity, motionVectors.sourceOpacity);
+			cb.SetGlobalTexture(BuiltinDebugViewsComponent.Uniforms._MainTex, BuiltinRenderTextureType.CameraTarget);
+			cb.Blit(BuiltinRenderTextureType.CameraTarget, nameID, material, 2);
+			if (motionVectors.motionImageOpacity > 0f && motionVectors.motionImageAmplitude > 0f)
+			{
+				int tempRT = BuiltinDebugViewsComponent.Uniforms._TempRT2;
+				cb.GetTemporaryRT(tempRT, this.context.width, this.context.height, 0, FilterMode.Bilinear);
+				cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Opacity, motionVectors.motionImageOpacity);
+				cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Amplitude, motionVectors.motionImageAmplitude);
+				cb.SetGlobalTexture(BuiltinDebugViewsComponent.Uniforms._MainTex, nameID);
+				cb.Blit(nameID, tempRT, material, 3);
+				cb.ReleaseTemporaryRT(nameID);
+				nameID = tempRT;
+			}
+			if (motionVectors.motionVectorsOpacity > 0f && motionVectors.motionVectorsAmplitude > 0f)
+			{
+				this.PrepareArrows();
+				float num = 1f / (float)motionVectors.motionVectorsResolution;
+				float x = num * (float)this.context.height / (float)this.context.width;
+				cb.SetGlobalVector(BuiltinDebugViewsComponent.Uniforms._Scale, new Vector2(x, num));
+				cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Opacity, motionVectors.motionVectorsOpacity);
+				cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Amplitude, motionVectors.motionVectorsAmplitude);
+				cb.DrawMesh(this.m_Arrows.mesh, Matrix4x4.identity, material, 0, 4);
+			}
+			cb.SetGlobalTexture(BuiltinDebugViewsComponent.Uniforms._MainTex, nameID);
+			cb.Blit(nameID, BuiltinRenderTextureType.CameraTarget);
+			cb.ReleaseTemporaryRT(nameID);
+		}
+
+		private void PrepareArrows()
+		{
+			int motionVectorsResolution = base.model.settings.motionVectors.motionVectorsResolution;
+			int num = motionVectorsResolution * Screen.width / Screen.height;
+			if (this.m_Arrows == null)
+			{
+				this.m_Arrows = new BuiltinDebugViewsComponent.ArrowArray();
+			}
+			if (this.m_Arrows.columnCount != num || this.m_Arrows.rowCount != motionVectorsResolution)
+			{
+				this.m_Arrows.Release();
+				this.m_Arrows.BuildMesh(num, motionVectorsResolution);
+			}
+		}
+
+		public override void OnDisable()
+		{
+			if (this.m_Arrows != null)
+			{
+				this.m_Arrows.Release();
+			}
+			this.m_Arrows = null;
+		}
+
+		private const string k_ShaderString = "Hidden/Post FX/Builtin Debug Views";
+
+		private BuiltinDebugViewsComponent.ArrowArray m_Arrows;
+
+		private static class Uniforms
+		{
+			internal static readonly int _DepthScale = Shader.PropertyToID("_DepthScale");
+
+			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");
+
+			internal static readonly int _Opacity = Shader.PropertyToID("_Opacity");
+
+			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");
+
+			internal static readonly int _TempRT2 = Shader.PropertyToID("_TempRT2");
+
+			internal static readonly int _Amplitude = Shader.PropertyToID("_Amplitude");
+
+			internal static readonly int _Scale = Shader.PropertyToID("_Scale");
+		}
+
+		private enum Pass
+		{
+			Depth,
+			Normals,
+			MovecOpacity,
+			MovecImaging,
+			MovecArrows
+		}
+
+		private class ArrowArray
+		{
+			public Mesh mesh { get; private set; }
+
+			public int columnCount { get; private set; }
+
+			public int rowCount { get; private set; }
+
+			public void BuildMesh(int columns, int rows)
+			{
+				Vector3[] array = new Vector3[]
+				{
+					new Vector3(0f, 0f, 0f),
+					new Vector3(0f, 1f, 0f),
+					new Vector3(0f, 1f, 0f),
+					new Vector3(-1f, 1f, 0f),
+					new Vector3(0f, 1f, 0f),
+					new Vector3(1f, 1f, 0f)
+				};
+				int num = 6 * columns * rows;
+				List<Vector3> list = new List<Vector3>(num);
+				List<Vector2> list2 = new List<Vector2>(num);
+				for (int i = 0; i < rows; i++)
+				{
+					for (int j = 0; j < columns; j++)
+					{
+						Vector2 item = new Vector2((0.5f + (float)j) / (float)columns, (0.5f + (float)i) / (float)rows);
+						for (int k = 0; k < 6; k++)
+						{
+							list.Add(array[k]);
+							list2.Add(item);
+						}
+					}
+				}
+				int[] array2 = new int[num];
+				for (int l = 0; l < num; l++)
+				{
+					array2[l] = l;
+				}
+				this.mesh = new Mesh
+				{
+					hideFlags = HideFlags.DontSave
+				};
+				this.mesh.SetVertices(list);
+				this.mesh.SetUVs(0, list2);
+				this.mesh.SetIndices(array2, MeshTopology.Lines, 0);
+				this.mesh.UploadMeshData(true);
+				this.columnCount = columns;
+				this.rowCount = rows;
+			}
+
+			public void Release()
+			{
+				GraphicsUtils.Destroy(this.mesh);
+				this.mesh = null;
+			}
+		}
+	}
+}

+ 141 - 0
Assembly-CSharp/UnityEngine/PostProcessing/BuiltinDebugViewsModel.cs

@@ -0,0 +1,141 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class BuiltinDebugViewsModel : PostProcessingModel
+	{
+		public BuiltinDebugViewsModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public bool willInterrupt
+		{
+			get
+			{
+				return !this.IsModeActive(BuiltinDebugViewsModel.Mode.None) && !this.IsModeActive(BuiltinDebugViewsModel.Mode.EyeAdaptation) && !this.IsModeActive(BuiltinDebugViewsModel.Mode.PreGradingLog) && !this.IsModeActive(BuiltinDebugViewsModel.Mode.LogLut) && !this.IsModeActive(BuiltinDebugViewsModel.Mode.UserLut);
+			}
+		}
+
+		public override void Reset()
+		{
+			this.settings = BuiltinDebugViewsModel.Settings.defaultSettings;
+		}
+
+		public bool IsModeActive(BuiltinDebugViewsModel.Mode mode)
+		{
+			return this.m_Settings.mode == mode;
+		}
+
+		[SerializeField]
+		private BuiltinDebugViewsModel.Settings m_Settings = BuiltinDebugViewsModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct DepthSettings
+		{
+			public static BuiltinDebugViewsModel.DepthSettings defaultSettings
+			{
+				get
+				{
+					return new BuiltinDebugViewsModel.DepthSettings
+					{
+						scale = 1f
+					};
+				}
+			}
+
+			[Range(0f, 1f)]
+			[Tooltip("Scales the camera far plane before displaying the depth map.")]
+			public float scale;
+		}
+
+		[Serializable]
+		public struct MotionVectorsSettings
+		{
+			public static BuiltinDebugViewsModel.MotionVectorsSettings defaultSettings
+			{
+				get
+				{
+					return new BuiltinDebugViewsModel.MotionVectorsSettings
+					{
+						sourceOpacity = 1f,
+						motionImageOpacity = 0f,
+						motionImageAmplitude = 16f,
+						motionVectorsOpacity = 1f,
+						motionVectorsResolution = 24,
+						motionVectorsAmplitude = 64f
+					};
+				}
+			}
+
+			[Range(0f, 1f)]
+			[Tooltip("Opacity of the source render.")]
+			public float sourceOpacity;
+
+			[Range(0f, 1f)]
+			[Tooltip("Opacity of the per-pixel motion vector colors.")]
+			public float motionImageOpacity;
+
+			[Min(0f)]
+			[Tooltip("Because motion vectors are mainly very small vectors, you can use this setting to make them more visible.")]
+			public float motionImageAmplitude;
+
+			[Range(0f, 1f)]
+			[Tooltip("Opacity for the motion vector arrows.")]
+			public float motionVectorsOpacity;
+
+			[Range(8f, 64f)]
+			[Tooltip("The arrow density on screen.")]
+			public int motionVectorsResolution;
+
+			[Min(0f)]
+			[Tooltip("Tweaks the arrows length.")]
+			public float motionVectorsAmplitude;
+		}
+
+		public enum Mode
+		{
+			None,
+			Depth,
+			Normals,
+			MotionVectors,
+			AmbientOcclusion,
+			EyeAdaptation,
+			FocusPlane,
+			PreGradingLog,
+			LogLut,
+			UserLut
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static BuiltinDebugViewsModel.Settings defaultSettings
+			{
+				get
+				{
+					return new BuiltinDebugViewsModel.Settings
+					{
+						mode = BuiltinDebugViewsModel.Mode.None,
+						depth = BuiltinDebugViewsModel.DepthSettings.defaultSettings,
+						motionVectors = BuiltinDebugViewsModel.MotionVectorsSettings.defaultSettings
+					};
+				}
+			}
+
+			public BuiltinDebugViewsModel.Mode mode;
+
+			public BuiltinDebugViewsModel.DepthSettings depth;
+
+			public BuiltinDebugViewsModel.MotionVectorsSettings motionVectors;
+		}
+	}
+}

+ 62 - 0
Assembly-CSharp/UnityEngine/PostProcessing/ChromaticAberrationComponent.cs

@@ -0,0 +1,62 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class ChromaticAberrationComponent : PostProcessingComponentRenderTexture<ChromaticAberrationModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && base.model.settings.intensity > 0f && !this.context.interrupted;
+			}
+		}
+
+		public override void OnDisable()
+		{
+			GraphicsUtils.Destroy(this.m_SpectrumLut);
+			this.m_SpectrumLut = null;
+		}
+
+		public override void Prepare(Material uberMaterial)
+		{
+			ChromaticAberrationModel.Settings settings = base.model.settings;
+			Texture2D texture2D = settings.spectralTexture;
+			if (texture2D == null)
+			{
+				if (this.m_SpectrumLut == null)
+				{
+					this.m_SpectrumLut = new Texture2D(3, 1, TextureFormat.RGB24, false)
+					{
+						name = "Chromatic Aberration Spectrum Lookup",
+						filterMode = FilterMode.Bilinear,
+						wrapMode = TextureWrapMode.Clamp,
+						anisoLevel = 0,
+						hideFlags = HideFlags.DontSave
+					};
+					Color[] pixels = new Color[]
+					{
+						new Color(1f, 0f, 0f),
+						new Color(0f, 1f, 0f),
+						new Color(0f, 0f, 1f)
+					};
+					this.m_SpectrumLut.SetPixels(pixels);
+					this.m_SpectrumLut.Apply();
+				}
+				texture2D = this.m_SpectrumLut;
+			}
+			uberMaterial.EnableKeyword("CHROMATIC_ABERRATION");
+			uberMaterial.SetFloat(ChromaticAberrationComponent.Uniforms._ChromaticAberration_Amount, settings.intensity * 0.03f);
+			uberMaterial.SetTexture(ChromaticAberrationComponent.Uniforms._ChromaticAberration_Spectrum, texture2D);
+		}
+
+		private Texture2D m_SpectrumLut;
+
+		private static class Uniforms
+		{
+			internal static readonly int _ChromaticAberration_Amount = Shader.PropertyToID("_ChromaticAberration_Amount");
+
+			internal static readonly int _ChromaticAberration_Spectrum = Shader.PropertyToID("_ChromaticAberration_Spectrum");
+		}
+	}
+}

+ 51 - 0
Assembly-CSharp/UnityEngine/PostProcessing/ChromaticAberrationModel.cs

@@ -0,0 +1,51 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class ChromaticAberrationModel : PostProcessingModel
+	{
+		public ChromaticAberrationModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = ChromaticAberrationModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private ChromaticAberrationModel.Settings m_Settings = ChromaticAberrationModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct Settings
+		{
+			public static ChromaticAberrationModel.Settings defaultSettings
+			{
+				get
+				{
+					return new ChromaticAberrationModel.Settings
+					{
+						spectralTexture = null,
+						intensity = 0.1f
+					};
+				}
+			}
+
+			[Tooltip("Shift the hue of chromatic aberrations.")]
+			public Texture2D spectralTexture;
+
+			[Range(0f, 1f)]
+			[Tooltip("Amount of tangential distortion.")]
+			public float intensity;
+		}
+	}
+}

+ 356 - 0
Assembly-CSharp/UnityEngine/PostProcessing/ColorGradingComponent.cs

@@ -0,0 +1,356 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class ColorGradingComponent : PostProcessingComponentRenderTexture<ColorGradingModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && !this.context.interrupted;
+			}
+		}
+
+		private float StandardIlluminantY(float x)
+		{
+			return 2.87f * x - 3f * x * x - 0.275095075f;
+		}
+
+		private Vector3 CIExyToLMS(float x, float y)
+		{
+			float num = 1f;
+			float num2 = num * x / y;
+			float num3 = num * (1f - x - y) / y;
+			float x2 = 0.7328f * num2 + 0.4296f * num - 0.1624f * num3;
+			float y2 = -0.7036f * num2 + 1.6975f * num + 0.0061f * num3;
+			float z = 0.003f * num2 + 0.0136f * num + 0.9834f * num3;
+			return new Vector3(x2, y2, z);
+		}
+
+		private Vector3 CalculateColorBalance(float temperature, float tint)
+		{
+			float num = temperature / 55f;
+			float num2 = tint / 55f;
+			float x = 0.31271f - num * ((num >= 0f) ? 0.05f : 0.1f);
+			float y = this.StandardIlluminantY(x) + num2 * 0.05f;
+			Vector3 vector = new Vector3(0.949237f, 1.03542f, 1.08728f);
+			Vector3 vector2 = this.CIExyToLMS(x, y);
+			return new Vector3(vector.x / vector2.x, vector.y / vector2.y, vector.z / vector2.z);
+		}
+
+		private static Color NormalizeColor(Color c)
+		{
+			float num = (c.r + c.g + c.b) / 3f;
+			if (Mathf.Approximately(num, 0f))
+			{
+				return new Color(1f, 1f, 1f, c.a);
+			}
+			return new Color
+			{
+				r = c.r / num,
+				g = c.g / num,
+				b = c.b / num,
+				a = c.a
+			};
+		}
+
+		private static Vector3 ClampVector(Vector3 v, float min, float max)
+		{
+			return new Vector3(Mathf.Clamp(v.x, min, max), Mathf.Clamp(v.y, min, max), Mathf.Clamp(v.z, min, max));
+		}
+
+		public static Vector3 GetLiftValue(Color lift)
+		{
+			Color color = ColorGradingComponent.NormalizeColor(lift);
+			float num = (color.r + color.g + color.b) / 3f;
+			float x = (color.r - num) * 0.1f + lift.a;
+			float y = (color.g - num) * 0.1f + lift.a;
+			float z = (color.b - num) * 0.1f + lift.a;
+			return ColorGradingComponent.ClampVector(new Vector3(x, y, z), -1f, 1f);
+		}
+
+		public static Vector3 GetGammaValue(Color gamma)
+		{
+			Color color = ColorGradingComponent.NormalizeColor(gamma);
+			float num = (color.r + color.g + color.b) / 3f;
+			gamma.a *= ((gamma.a >= 0f) ? 5f : 0.8f);
+			float b = Mathf.Pow(2f, (color.r - num) * 0.5f) + gamma.a;
+			float b2 = Mathf.Pow(2f, (color.g - num) * 0.5f) + gamma.a;
+			float b3 = Mathf.Pow(2f, (color.b - num) * 0.5f) + gamma.a;
+			float x = 1f / Mathf.Max(0.01f, b);
+			float y = 1f / Mathf.Max(0.01f, b2);
+			float z = 1f / Mathf.Max(0.01f, b3);
+			return ColorGradingComponent.ClampVector(new Vector3(x, y, z), 0f, 5f);
+		}
+
+		public static Vector3 GetGainValue(Color gain)
+		{
+			Color color = ColorGradingComponent.NormalizeColor(gain);
+			float num = (color.r + color.g + color.b) / 3f;
+			gain.a *= ((gain.a <= 0f) ? 1f : 3f);
+			float x = Mathf.Pow(2f, (color.r - num) * 0.5f) + gain.a;
+			float y = Mathf.Pow(2f, (color.g - num) * 0.5f) + gain.a;
+			float z = Mathf.Pow(2f, (color.b - num) * 0.5f) + gain.a;
+			return ColorGradingComponent.ClampVector(new Vector3(x, y, z), 0f, 4f);
+		}
+
+		public static void CalculateLiftGammaGain(Color lift, Color gamma, Color gain, out Vector3 outLift, out Vector3 outGamma, out Vector3 outGain)
+		{
+			outLift = ColorGradingComponent.GetLiftValue(lift);
+			outGamma = ColorGradingComponent.GetGammaValue(gamma);
+			outGain = ColorGradingComponent.GetGainValue(gain);
+		}
+
+		public static Vector3 GetSlopeValue(Color slope)
+		{
+			Color color = ColorGradingComponent.NormalizeColor(slope);
+			float num = (color.r + color.g + color.b) / 3f;
+			slope.a *= 0.5f;
+			float x = (color.r - num) * 0.1f + slope.a + 1f;
+			float y = (color.g - num) * 0.1f + slope.a + 1f;
+			float z = (color.b - num) * 0.1f + slope.a + 1f;
+			return ColorGradingComponent.ClampVector(new Vector3(x, y, z), 0f, 2f);
+		}
+
+		public static Vector3 GetPowerValue(Color power)
+		{
+			Color color = ColorGradingComponent.NormalizeColor(power);
+			float num = (color.r + color.g + color.b) / 3f;
+			power.a *= 0.5f;
+			float b = (color.r - num) * 0.1f + power.a + 1f;
+			float b2 = (color.g - num) * 0.1f + power.a + 1f;
+			float b3 = (color.b - num) * 0.1f + power.a + 1f;
+			float x = 1f / Mathf.Max(0.01f, b);
+			float y = 1f / Mathf.Max(0.01f, b2);
+			float z = 1f / Mathf.Max(0.01f, b3);
+			return ColorGradingComponent.ClampVector(new Vector3(x, y, z), 0.5f, 2.5f);
+		}
+
+		public static Vector3 GetOffsetValue(Color offset)
+		{
+			Color color = ColorGradingComponent.NormalizeColor(offset);
+			float num = (color.r + color.g + color.b) / 3f;
+			offset.a *= 0.5f;
+			float x = (color.r - num) * 0.05f + offset.a;
+			float y = (color.g - num) * 0.05f + offset.a;
+			float z = (color.b - num) * 0.05f + offset.a;
+			return ColorGradingComponent.ClampVector(new Vector3(x, y, z), -0.8f, 0.8f);
+		}
+
+		public static void CalculateSlopePowerOffset(Color slope, Color power, Color offset, out Vector3 outSlope, out Vector3 outPower, out Vector3 outOffset)
+		{
+			outSlope = ColorGradingComponent.GetSlopeValue(slope);
+			outPower = ColorGradingComponent.GetPowerValue(power);
+			outOffset = ColorGradingComponent.GetOffsetValue(offset);
+		}
+
+		private TextureFormat GetCurveFormat()
+		{
+			if (SystemInfo.SupportsTextureFormat(TextureFormat.RGBAHalf))
+			{
+				return TextureFormat.RGBAHalf;
+			}
+			return TextureFormat.RGBA32;
+		}
+
+		private Texture2D GetCurveTexture()
+		{
+			if (this.m_GradingCurves == null)
+			{
+				this.m_GradingCurves = new Texture2D(128, 2, this.GetCurveFormat(), false, true)
+				{
+					name = "Internal Curves Texture",
+					hideFlags = HideFlags.DontSave,
+					anisoLevel = 0,
+					wrapMode = TextureWrapMode.Clamp,
+					filterMode = FilterMode.Bilinear
+				};
+			}
+			ColorGradingModel.CurvesSettings curves = base.model.settings.curves;
+			curves.hueVShue.Cache();
+			curves.hueVSsat.Cache();
+			for (int i = 0; i < 128; i++)
+			{
+				float t = (float)i * 0.0078125f;
+				float r = curves.hueVShue.Evaluate(t);
+				float g = curves.hueVSsat.Evaluate(t);
+				float b = curves.satVSsat.Evaluate(t);
+				float a = curves.lumVSsat.Evaluate(t);
+				this.m_pixels[i] = new Color(r, g, b, a);
+				float a2 = curves.master.Evaluate(t);
+				float r2 = curves.red.Evaluate(t);
+				float g2 = curves.green.Evaluate(t);
+				float b2 = curves.blue.Evaluate(t);
+				this.m_pixels[i + 128] = new Color(r2, g2, b2, a2);
+			}
+			this.m_GradingCurves.SetPixels(this.m_pixels);
+			this.m_GradingCurves.Apply(false, false);
+			return this.m_GradingCurves;
+		}
+
+		private bool IsLogLutValid(RenderTexture lut)
+		{
+			return lut != null && lut.IsCreated() && lut.height == 32;
+		}
+
+		private RenderTextureFormat GetLutFormat()
+		{
+			if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf))
+			{
+				return RenderTextureFormat.ARGBHalf;
+			}
+			return RenderTextureFormat.ARGB32;
+		}
+
+		private void GenerateLut()
+		{
+			ColorGradingModel.Settings settings = base.model.settings;
+			if (!this.IsLogLutValid(base.model.bakedLut))
+			{
+				GraphicsUtils.Destroy(base.model.bakedLut);
+				base.model.bakedLut = new RenderTexture(1024, 32, 0, this.GetLutFormat())
+				{
+					name = "Color Grading Log LUT",
+					hideFlags = HideFlags.DontSave,
+					filterMode = FilterMode.Bilinear,
+					wrapMode = TextureWrapMode.Clamp,
+					anisoLevel = 0
+				};
+			}
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Lut Generator");
+			material.SetVector(ColorGradingComponent.Uniforms._LutParams, new Vector4(32f, 0.00048828125f, 0.015625f, 1.032258f));
+			material.shaderKeywords = null;
+			ColorGradingModel.TonemappingSettings tonemapping = settings.tonemapping;
+			ColorGradingModel.Tonemapper tonemapper = tonemapping.tonemapper;
+			if (tonemapper != ColorGradingModel.Tonemapper.Neutral)
+			{
+				if (tonemapper == ColorGradingModel.Tonemapper.ACES)
+				{
+					material.EnableKeyword("TONEMAPPING_FILMIC");
+				}
+			}
+			else
+			{
+				material.EnableKeyword("TONEMAPPING_NEUTRAL");
+				float num = tonemapping.neutralBlackIn * 20f + 1f;
+				float num2 = tonemapping.neutralBlackOut * 10f + 1f;
+				float num3 = tonemapping.neutralWhiteIn / 20f;
+				float num4 = 1f - tonemapping.neutralWhiteOut / 20f;
+				float t = num / num2;
+				float t2 = num3 / num4;
+				float y = Mathf.Max(0f, Mathf.LerpUnclamped(0.57f, 0.37f, t));
+				float z = Mathf.LerpUnclamped(0.01f, 0.24f, t2);
+				float w = Mathf.Max(0f, Mathf.LerpUnclamped(0.02f, 0.2f, t));
+				material.SetVector(ColorGradingComponent.Uniforms._NeutralTonemapperParams1, new Vector4(0.2f, y, z, w));
+				material.SetVector(ColorGradingComponent.Uniforms._NeutralTonemapperParams2, new Vector4(0.02f, 0.3f, tonemapping.neutralWhiteLevel, tonemapping.neutralWhiteClip / 10f));
+			}
+			material.SetFloat(ColorGradingComponent.Uniforms._HueShift, settings.basic.hueShift / 360f);
+			material.SetFloat(ColorGradingComponent.Uniforms._Saturation, settings.basic.saturation);
+			material.SetFloat(ColorGradingComponent.Uniforms._Contrast, settings.basic.contrast);
+			material.SetVector(ColorGradingComponent.Uniforms._Balance, this.CalculateColorBalance(settings.basic.temperature, settings.basic.tint));
+			Vector3 v;
+			Vector3 v2;
+			Vector3 v3;
+			ColorGradingComponent.CalculateLiftGammaGain(settings.colorWheels.linear.lift, settings.colorWheels.linear.gamma, settings.colorWheels.linear.gain, out v, out v2, out v3);
+			material.SetVector(ColorGradingComponent.Uniforms._Lift, v);
+			material.SetVector(ColorGradingComponent.Uniforms._InvGamma, v2);
+			material.SetVector(ColorGradingComponent.Uniforms._Gain, v3);
+			Vector3 v4;
+			Vector3 v5;
+			Vector3 v6;
+			ColorGradingComponent.CalculateSlopePowerOffset(settings.colorWheels.log.slope, settings.colorWheels.log.power, settings.colorWheels.log.offset, out v4, out v5, out v6);
+			material.SetVector(ColorGradingComponent.Uniforms._Slope, v4);
+			material.SetVector(ColorGradingComponent.Uniforms._Power, v5);
+			material.SetVector(ColorGradingComponent.Uniforms._Offset, v6);
+			material.SetVector(ColorGradingComponent.Uniforms._ChannelMixerRed, settings.channelMixer.red);
+			material.SetVector(ColorGradingComponent.Uniforms._ChannelMixerGreen, settings.channelMixer.green);
+			material.SetVector(ColorGradingComponent.Uniforms._ChannelMixerBlue, settings.channelMixer.blue);
+			material.SetTexture(ColorGradingComponent.Uniforms._Curves, this.GetCurveTexture());
+			Graphics.Blit(null, base.model.bakedLut, material, 0);
+		}
+
+		public override void Prepare(Material uberMaterial)
+		{
+			if (base.model.isDirty || !this.IsLogLutValid(base.model.bakedLut))
+			{
+				this.GenerateLut();
+				base.model.isDirty = false;
+			}
+			uberMaterial.EnableKeyword((!this.context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.PreGradingLog)) ? "COLOR_GRADING" : "COLOR_GRADING_LOG_VIEW");
+			RenderTexture bakedLut = base.model.bakedLut;
+			uberMaterial.SetTexture(ColorGradingComponent.Uniforms._LogLut, bakedLut);
+			uberMaterial.SetVector(ColorGradingComponent.Uniforms._LogLut_Params, new Vector3(1f / (float)bakedLut.width, 1f / (float)bakedLut.height, (float)bakedLut.height - 1f));
+			float value = Mathf.Exp(base.model.settings.basic.postExposure * 0.6931472f);
+			uberMaterial.SetFloat(ColorGradingComponent.Uniforms._ExposureEV, value);
+		}
+
+		public void OnGUI()
+		{
+			RenderTexture bakedLut = base.model.bakedLut;
+			Rect position = new Rect(this.context.viewport.x * (float)Screen.width + 8f, 8f, (float)bakedLut.width, (float)bakedLut.height);
+			GUI.DrawTexture(position, bakedLut);
+		}
+
+		public override void OnDisable()
+		{
+			GraphicsUtils.Destroy(this.m_GradingCurves);
+			GraphicsUtils.Destroy(base.model.bakedLut);
+			this.m_GradingCurves = null;
+			base.model.bakedLut = null;
+		}
+
+		private const int k_InternalLogLutSize = 32;
+
+		private const int k_CurvePrecision = 128;
+
+		private const float k_CurveStep = 0.0078125f;
+
+		private Texture2D m_GradingCurves;
+
+		private Color[] m_pixels = new Color[256];
+
+		private static class Uniforms
+		{
+			internal static readonly int _LutParams = Shader.PropertyToID("_LutParams");
+
+			internal static readonly int _NeutralTonemapperParams1 = Shader.PropertyToID("_NeutralTonemapperParams1");
+
+			internal static readonly int _NeutralTonemapperParams2 = Shader.PropertyToID("_NeutralTonemapperParams2");
+
+			internal static readonly int _HueShift = Shader.PropertyToID("_HueShift");
+
+			internal static readonly int _Saturation = Shader.PropertyToID("_Saturation");
+
+			internal static readonly int _Contrast = Shader.PropertyToID("_Contrast");
+
+			internal static readonly int _Balance = Shader.PropertyToID("_Balance");
+
+			internal static readonly int _Lift = Shader.PropertyToID("_Lift");
+
+			internal static readonly int _InvGamma = Shader.PropertyToID("_InvGamma");
+
+			internal static readonly int _Gain = Shader.PropertyToID("_Gain");
+
+			internal static readonly int _Slope = Shader.PropertyToID("_Slope");
+
+			internal static readonly int _Power = Shader.PropertyToID("_Power");
+
+			internal static readonly int _Offset = Shader.PropertyToID("_Offset");
+
+			internal static readonly int _ChannelMixerRed = Shader.PropertyToID("_ChannelMixerRed");
+
+			internal static readonly int _ChannelMixerGreen = Shader.PropertyToID("_ChannelMixerGreen");
+
+			internal static readonly int _ChannelMixerBlue = Shader.PropertyToID("_ChannelMixerBlue");
+
+			internal static readonly int _Curves = Shader.PropertyToID("_Curves");
+
+			internal static readonly int _LogLut = Shader.PropertyToID("_LogLut");
+
+			internal static readonly int _LogLut_Params = Shader.PropertyToID("_LogLut_Params");
+
+			internal static readonly int _ExposureEV = Shader.PropertyToID("_ExposureEV");
+		}
+	}
+}

+ 66 - 0
Assembly-CSharp/UnityEngine/PostProcessing/ColorGradingCurve.cs

@@ -0,0 +1,66 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public sealed class ColorGradingCurve
+	{
+		public ColorGradingCurve(AnimationCurve curve, float zeroValue, bool loop, Vector2 bounds)
+		{
+			this.curve = curve;
+			this.m_ZeroValue = zeroValue;
+			this.m_Loop = loop;
+			this.m_Range = bounds.magnitude;
+		}
+
+		public void Cache()
+		{
+			if (!this.m_Loop)
+			{
+				return;
+			}
+			int length = this.curve.length;
+			if (length < 2)
+			{
+				return;
+			}
+			if (this.m_InternalLoopingCurve == null)
+			{
+				this.m_InternalLoopingCurve = new AnimationCurve();
+			}
+			Keyframe key = this.curve[length - 1];
+			key.time -= this.m_Range;
+			Keyframe key2 = this.curve[0];
+			key2.time += this.m_Range;
+			this.m_InternalLoopingCurve.keys = this.curve.keys;
+			this.m_InternalLoopingCurve.AddKey(key);
+			this.m_InternalLoopingCurve.AddKey(key2);
+		}
+
+		public float Evaluate(float t)
+		{
+			if (this.curve.length == 0)
+			{
+				return this.m_ZeroValue;
+			}
+			if (!this.m_Loop || this.curve.length == 1)
+			{
+				return this.curve.Evaluate(t);
+			}
+			return this.m_InternalLoopingCurve.Evaluate(t);
+		}
+
+		public AnimationCurve curve;
+
+		[SerializeField]
+		private bool m_Loop;
+
+		[SerializeField]
+		private float m_ZeroValue;
+
+		[SerializeField]
+		private float m_Range;
+
+		private AnimationCurve m_InternalLoopingCurve;
+	}
+}

+ 344 - 0
Assembly-CSharp/UnityEngine/PostProcessing/ColorGradingModel.cs

@@ -0,0 +1,344 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class ColorGradingModel : PostProcessingModel
+	{
+		public ColorGradingModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+				this.OnValidate();
+			}
+		}
+
+		public bool isDirty { get; internal set; }
+
+		public RenderTexture bakedLut { get; internal set; }
+
+		public override void Reset()
+		{
+			this.m_Settings = ColorGradingModel.Settings.defaultSettings;
+			this.OnValidate();
+		}
+
+		public override void OnValidate()
+		{
+			this.isDirty = true;
+		}
+
+		[SerializeField]
+		private ColorGradingModel.Settings m_Settings = ColorGradingModel.Settings.defaultSettings;
+
+		public enum Tonemapper
+		{
+			None,
+			ACES,
+			Neutral
+		}
+
+		[Serializable]
+		public struct TonemappingSettings
+		{
+			public static ColorGradingModel.TonemappingSettings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.TonemappingSettings
+					{
+						tonemapper = ColorGradingModel.Tonemapper.Neutral,
+						neutralBlackIn = 0.02f,
+						neutralWhiteIn = 10f,
+						neutralBlackOut = 0f,
+						neutralWhiteOut = 10f,
+						neutralWhiteLevel = 5.3f,
+						neutralWhiteClip = 10f
+					};
+				}
+			}
+
+			[Tooltip("Tonemapping algorithm to use at the end of the color grading process. Use \"Neutral\" if you need a customizable tonemapper or \"Filmic\" to give a standard filmic look to your scenes.")]
+			public ColorGradingModel.Tonemapper tonemapper;
+
+			[Range(-0.1f, 0.1f)]
+			public float neutralBlackIn;
+
+			[Range(1f, 20f)]
+			public float neutralWhiteIn;
+
+			[Range(-0.09f, 0.1f)]
+			public float neutralBlackOut;
+
+			[Range(1f, 19f)]
+			public float neutralWhiteOut;
+
+			[Range(0.1f, 20f)]
+			public float neutralWhiteLevel;
+
+			[Range(1f, 10f)]
+			public float neutralWhiteClip;
+		}
+
+		[Serializable]
+		public struct BasicSettings
+		{
+			public static ColorGradingModel.BasicSettings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.BasicSettings
+					{
+						postExposure = 0f,
+						temperature = 0f,
+						tint = 0f,
+						hueShift = 0f,
+						saturation = 1f,
+						contrast = 1f
+					};
+				}
+			}
+
+			[Tooltip("Adjusts the overall exposure of the scene in EV units. This is applied after HDR effect and right before tonemapping so it won't affect previous effects in the chain.")]
+			public float postExposure;
+
+			[Range(-100f, 100f)]
+			[Tooltip("Sets the white balance to a custom color temperature.")]
+			public float temperature;
+
+			[Range(-100f, 100f)]
+			[Tooltip("Sets the white balance to compensate for a green or magenta tint.")]
+			public float tint;
+
+			[Range(-180f, 180f)]
+			[Tooltip("Shift the hue of all colors.")]
+			public float hueShift;
+
+			[Range(0f, 2f)]
+			[Tooltip("Pushes the intensity of all colors.")]
+			public float saturation;
+
+			[Range(0f, 2f)]
+			[Tooltip("Expands or shrinks the overall range of tonal values.")]
+			public float contrast;
+		}
+
+		[Serializable]
+		public struct ChannelMixerSettings
+		{
+			public static ColorGradingModel.ChannelMixerSettings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.ChannelMixerSettings
+					{
+						red = new Vector3(1f, 0f, 0f),
+						green = new Vector3(0f, 1f, 0f),
+						blue = new Vector3(0f, 0f, 1f),
+						currentEditingChannel = 0
+					};
+				}
+			}
+
+			public Vector3 red;
+
+			public Vector3 green;
+
+			public Vector3 blue;
+
+			[HideInInspector]
+			public int currentEditingChannel;
+		}
+
+		[Serializable]
+		public struct LogWheelsSettings
+		{
+			public static ColorGradingModel.LogWheelsSettings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.LogWheelsSettings
+					{
+						slope = Color.clear,
+						power = Color.clear,
+						offset = Color.clear
+					};
+				}
+			}
+
+			[Trackball("GetSlopeValue")]
+			public Color slope;
+
+			[Trackball("GetPowerValue")]
+			public Color power;
+
+			[Trackball("GetOffsetValue")]
+			public Color offset;
+		}
+
+		[Serializable]
+		public struct LinearWheelsSettings
+		{
+			public static ColorGradingModel.LinearWheelsSettings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.LinearWheelsSettings
+					{
+						lift = Color.clear,
+						gamma = Color.clear,
+						gain = Color.clear
+					};
+				}
+			}
+
+			[Trackball("GetLiftValue")]
+			public Color lift;
+
+			[Trackball("GetGammaValue")]
+			public Color gamma;
+
+			[Trackball("GetGainValue")]
+			public Color gain;
+		}
+
+		public enum ColorWheelMode
+		{
+			Linear,
+			Log
+		}
+
+		[Serializable]
+		public struct ColorWheelsSettings
+		{
+			public static ColorGradingModel.ColorWheelsSettings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.ColorWheelsSettings
+					{
+						mode = ColorGradingModel.ColorWheelMode.Log,
+						log = ColorGradingModel.LogWheelsSettings.defaultSettings,
+						linear = ColorGradingModel.LinearWheelsSettings.defaultSettings
+					};
+				}
+			}
+
+			public ColorGradingModel.ColorWheelMode mode;
+
+			[TrackballGroup]
+			public ColorGradingModel.LogWheelsSettings log;
+
+			[TrackballGroup]
+			public ColorGradingModel.LinearWheelsSettings linear;
+		}
+
+		[Serializable]
+		public struct CurvesSettings
+		{
+			public static ColorGradingModel.CurvesSettings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.CurvesSettings
+					{
+						master = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
+						{
+							new Keyframe(0f, 0f, 1f, 1f),
+							new Keyframe(1f, 1f, 1f, 1f)
+						}), 0f, false, new Vector2(0f, 1f)),
+						red = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
+						{
+							new Keyframe(0f, 0f, 1f, 1f),
+							new Keyframe(1f, 1f, 1f, 1f)
+						}), 0f, false, new Vector2(0f, 1f)),
+						green = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
+						{
+							new Keyframe(0f, 0f, 1f, 1f),
+							new Keyframe(1f, 1f, 1f, 1f)
+						}), 0f, false, new Vector2(0f, 1f)),
+						blue = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
+						{
+							new Keyframe(0f, 0f, 1f, 1f),
+							new Keyframe(1f, 1f, 1f, 1f)
+						}), 0f, false, new Vector2(0f, 1f)),
+						hueVShue = new ColorGradingCurve(new AnimationCurve(), 0.5f, true, new Vector2(0f, 1f)),
+						hueVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, true, new Vector2(0f, 1f)),
+						satVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, false, new Vector2(0f, 1f)),
+						lumVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, false, new Vector2(0f, 1f)),
+						e_CurrentEditingCurve = 0,
+						e_CurveY = true,
+						e_CurveR = false,
+						e_CurveG = false,
+						e_CurveB = false
+					};
+				}
+			}
+
+			public ColorGradingCurve master;
+
+			public ColorGradingCurve red;
+
+			public ColorGradingCurve green;
+
+			public ColorGradingCurve blue;
+
+			public ColorGradingCurve hueVShue;
+
+			public ColorGradingCurve hueVSsat;
+
+			public ColorGradingCurve satVSsat;
+
+			public ColorGradingCurve lumVSsat;
+
+			[HideInInspector]
+			public int e_CurrentEditingCurve;
+
+			[HideInInspector]
+			public bool e_CurveY;
+
+			[HideInInspector]
+			public bool e_CurveR;
+
+			[HideInInspector]
+			public bool e_CurveG;
+
+			[HideInInspector]
+			public bool e_CurveB;
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static ColorGradingModel.Settings defaultSettings
+			{
+				get
+				{
+					return new ColorGradingModel.Settings
+					{
+						tonemapping = ColorGradingModel.TonemappingSettings.defaultSettings,
+						basic = ColorGradingModel.BasicSettings.defaultSettings,
+						channelMixer = ColorGradingModel.ChannelMixerSettings.defaultSettings,
+						colorWheels = ColorGradingModel.ColorWheelsSettings.defaultSettings,
+						curves = ColorGradingModel.CurvesSettings.defaultSettings
+					};
+				}
+			}
+
+			public ColorGradingModel.TonemappingSettings tonemapping;
+
+			public ColorGradingModel.BasicSettings basic;
+
+			public ColorGradingModel.ChannelMixerSettings channelMixer;
+
+			public ColorGradingModel.ColorWheelsSettings colorWheels;
+
+			public ColorGradingModel.CurvesSettings curves;
+		}
+	}
+}

+ 148 - 0
Assembly-CSharp/UnityEngine/PostProcessing/DepthOfFieldComponent.cs

@@ -0,0 +1,148 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class DepthOfFieldComponent : PostProcessingComponentRenderTexture<DepthOfFieldModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && !this.context.interrupted;
+			}
+		}
+
+		public override DepthTextureMode GetCameraFlags()
+		{
+			return DepthTextureMode.Depth;
+		}
+
+		private float CalculateFocalLength()
+		{
+			DepthOfFieldModel.Settings settings = base.model.settings;
+			if (!settings.useCameraFov)
+			{
+				return settings.focalLength / 1000f;
+			}
+			float num = this.context.camera.fieldOfView * 0.0174532924f;
+			return 0.012f / Mathf.Tan(0.5f * num);
+		}
+
+		private float CalculateMaxCoCRadius(int screenHeight)
+		{
+			float num = (float)base.model.settings.kernelSize * 4f + 6f;
+			return Mathf.Min(0.05f, num / (float)screenHeight);
+		}
+
+		private bool CheckHistory(int width, int height)
+		{
+			return this.m_CoCHistory != null && this.m_CoCHistory.IsCreated() && this.m_CoCHistory.width == width && this.m_CoCHistory.height == height;
+		}
+
+		private RenderTextureFormat SelectFormat(RenderTextureFormat primary, RenderTextureFormat secondary)
+		{
+			if (SystemInfo.SupportsRenderTextureFormat(primary))
+			{
+				return primary;
+			}
+			if (SystemInfo.SupportsRenderTextureFormat(secondary))
+			{
+				return secondary;
+			}
+			return RenderTextureFormat.Default;
+		}
+
+		public void Prepare(RenderTexture source, Material uberMaterial, bool antialiasCoC, Vector2 taaJitter, float taaBlending)
+		{
+			DepthOfFieldModel.Settings settings = base.model.settings;
+			RenderTextureFormat format = RenderTextureFormat.DefaultHDR;
+			RenderTextureFormat format2 = this.SelectFormat(RenderTextureFormat.R8, RenderTextureFormat.RHalf);
+			float num = this.CalculateFocalLength();
+			float num2 = Mathf.Max(settings.focusDistance, num);
+			float num3 = (float)source.width / (float)source.height;
+			float num4 = num * num / (settings.aperture * (num2 - num) * 0.024f * 2f);
+			float num5 = this.CalculateMaxCoCRadius(source.height);
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Depth Of Field");
+			material.SetFloat(DepthOfFieldComponent.Uniforms._Distance, num2);
+			material.SetFloat(DepthOfFieldComponent.Uniforms._LensCoeff, num4);
+			material.SetFloat(DepthOfFieldComponent.Uniforms._MaxCoC, num5);
+			material.SetFloat(DepthOfFieldComponent.Uniforms._RcpMaxCoC, 1f / num5);
+			material.SetFloat(DepthOfFieldComponent.Uniforms._RcpAspect, 1f / num3);
+			RenderTexture renderTexture = this.context.renderTextureFactory.Get(this.context.width, this.context.height, 0, format2, RenderTextureReadWrite.Linear, FilterMode.Bilinear, TextureWrapMode.Clamp, "FactoryTempTexture");
+			Graphics.Blit(null, renderTexture, material, 0);
+			if (antialiasCoC)
+			{
+				material.SetTexture(DepthOfFieldComponent.Uniforms._CoCTex, renderTexture);
+				float z = (!this.CheckHistory(this.context.width, this.context.height)) ? 0f : taaBlending;
+				material.SetVector(DepthOfFieldComponent.Uniforms._TaaParams, new Vector3(taaJitter.x, taaJitter.y, z));
+				RenderTexture temporary = RenderTexture.GetTemporary(this.context.width, this.context.height, 0, format2);
+				Graphics.Blit(this.m_CoCHistory, temporary, material, 1);
+				this.context.renderTextureFactory.Release(renderTexture);
+				if (this.m_CoCHistory != null)
+				{
+					RenderTexture.ReleaseTemporary(this.m_CoCHistory);
+				}
+				renderTexture = (this.m_CoCHistory = temporary);
+			}
+			RenderTexture renderTexture2 = this.context.renderTextureFactory.Get(this.context.width / 2, this.context.height / 2, 0, format, RenderTextureReadWrite.Default, FilterMode.Bilinear, TextureWrapMode.Clamp, "FactoryTempTexture");
+			material.SetTexture(DepthOfFieldComponent.Uniforms._CoCTex, renderTexture);
+			Graphics.Blit(source, renderTexture2, material, 2);
+			RenderTexture renderTexture3 = this.context.renderTextureFactory.Get(this.context.width / 2, this.context.height / 2, 0, format, RenderTextureReadWrite.Default, FilterMode.Bilinear, TextureWrapMode.Clamp, "FactoryTempTexture");
+			Graphics.Blit(renderTexture2, renderTexture3, material, (int)(3 + settings.kernelSize));
+			Graphics.Blit(renderTexture3, renderTexture2, material, 7);
+			uberMaterial.SetVector(DepthOfFieldComponent.Uniforms._DepthOfFieldParams, new Vector3(num2, num4, num5));
+			if (this.context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.FocusPlane))
+			{
+				uberMaterial.EnableKeyword("DEPTH_OF_FIELD_COC_VIEW");
+				this.context.Interrupt();
+			}
+			else
+			{
+				uberMaterial.SetTexture(DepthOfFieldComponent.Uniforms._DepthOfFieldTex, renderTexture2);
+				uberMaterial.SetTexture(DepthOfFieldComponent.Uniforms._DepthOfFieldCoCTex, renderTexture);
+				uberMaterial.EnableKeyword("DEPTH_OF_FIELD");
+			}
+			this.context.renderTextureFactory.Release(renderTexture3);
+		}
+
+		public override void OnDisable()
+		{
+			if (this.m_CoCHistory != null)
+			{
+				RenderTexture.ReleaseTemporary(this.m_CoCHistory);
+			}
+			this.m_CoCHistory = null;
+		}
+
+		private const string k_ShaderString = "Hidden/Post FX/Depth Of Field";
+
+		private RenderTexture m_CoCHistory;
+
+		private const float k_FilmHeight = 0.024f;
+
+		private static class Uniforms
+		{
+			internal static readonly int _DepthOfFieldTex = Shader.PropertyToID("_DepthOfFieldTex");
+
+			internal static readonly int _DepthOfFieldCoCTex = Shader.PropertyToID("_DepthOfFieldCoCTex");
+
+			internal static readonly int _Distance = Shader.PropertyToID("_Distance");
+
+			internal static readonly int _LensCoeff = Shader.PropertyToID("_LensCoeff");
+
+			internal static readonly int _MaxCoC = Shader.PropertyToID("_MaxCoC");
+
+			internal static readonly int _RcpMaxCoC = Shader.PropertyToID("_RcpMaxCoC");
+
+			internal static readonly int _RcpAspect = Shader.PropertyToID("_RcpAspect");
+
+			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");
+
+			internal static readonly int _CoCTex = Shader.PropertyToID("_CoCTex");
+
+			internal static readonly int _TaaParams = Shader.PropertyToID("_TaaParams");
+
+			internal static readonly int _DepthOfFieldParams = Shader.PropertyToID("_DepthOfFieldParams");
+		}
+	}
+}

+ 73 - 0
Assembly-CSharp/UnityEngine/PostProcessing/DepthOfFieldModel.cs

@@ -0,0 +1,73 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class DepthOfFieldModel : PostProcessingModel
+	{
+		public DepthOfFieldModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = DepthOfFieldModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private DepthOfFieldModel.Settings m_Settings = DepthOfFieldModel.Settings.defaultSettings;
+
+		public enum KernelSize
+		{
+			Small,
+			Medium,
+			Large,
+			VeryLarge
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static DepthOfFieldModel.Settings defaultSettings
+			{
+				get
+				{
+					return new DepthOfFieldModel.Settings
+					{
+						focusDistance = 10f,
+						aperture = 5.6f,
+						focalLength = 50f,
+						useCameraFov = false,
+						kernelSize = DepthOfFieldModel.KernelSize.Medium
+					};
+				}
+			}
+
+			[Min(0.1f)]
+			[Tooltip("Distance to the point of focus.")]
+			public float focusDistance;
+
+			[Range(0.05f, 32f)]
+			[Tooltip("Ratio of aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is.")]
+			public float aperture;
+
+			[Range(1f, 300f)]
+			[Tooltip("Distance between the lens and the film. The larger the value is, the shallower the depth of field is.")]
+			public float focalLength;
+
+			[Tooltip("Calculate the focal length automatically from the field-of-view value set on the camera. Using this setting isn't recommended.")]
+			public bool useCameraFov;
+
+			[Tooltip("Convolution kernel size of the bokeh filter, which determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required).")]
+			public DepthOfFieldModel.KernelSize kernelSize;
+		}
+	}
+}

+ 60 - 0
Assembly-CSharp/UnityEngine/PostProcessing/DitheringComponent.cs

@@ -0,0 +1,60 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class DitheringComponent : PostProcessingComponentRenderTexture<DitheringModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && !this.context.interrupted;
+			}
+		}
+
+		public override void OnDisable()
+		{
+			this.noiseTextures = null;
+		}
+
+		private void LoadNoiseTextures()
+		{
+			this.noiseTextures = new Texture2D[64];
+			for (int i = 0; i < 64; i++)
+			{
+				this.noiseTextures[i] = Resources.Load<Texture2D>("Bluenoise64/LDR_LLL1_" + i);
+			}
+		}
+
+		public override void Prepare(Material uberMaterial)
+		{
+			if (++this.textureIndex >= 64)
+			{
+				this.textureIndex = 0;
+			}
+			float value = Random.value;
+			float value2 = Random.value;
+			if (this.noiseTextures == null)
+			{
+				this.LoadNoiseTextures();
+			}
+			Texture2D texture2D = this.noiseTextures[this.textureIndex];
+			uberMaterial.EnableKeyword("DITHERING");
+			uberMaterial.SetTexture(DitheringComponent.Uniforms._DitheringTex, texture2D);
+			uberMaterial.SetVector(DitheringComponent.Uniforms._DitheringCoords, new Vector4((float)this.context.width / (float)texture2D.width, (float)this.context.height / (float)texture2D.height, value, value2));
+		}
+
+		private Texture2D[] noiseTextures;
+
+		private int textureIndex;
+
+		private const int k_TextureCount = 64;
+
+		private static class Uniforms
+		{
+			internal static readonly int _DitheringTex = Shader.PropertyToID("_DitheringTex");
+
+			internal static readonly int _DitheringCoords = Shader.PropertyToID("_DitheringCoords");
+		}
+	}
+}

+ 40 - 0
Assembly-CSharp/UnityEngine/PostProcessing/DitheringModel.cs

@@ -0,0 +1,40 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class DitheringModel : PostProcessingModel
+	{
+		public DitheringModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = DitheringModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private DitheringModel.Settings m_Settings = DitheringModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct Settings
+		{
+			public static DitheringModel.Settings defaultSettings
+			{
+				get
+				{
+					return default(DitheringModel.Settings);
+				}
+			}
+		}
+	}
+}

+ 177 - 0
Assembly-CSharp/UnityEngine/PostProcessing/EyeAdaptationComponent.cs

@@ -0,0 +1,177 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class EyeAdaptationComponent : PostProcessingComponentRenderTexture<EyeAdaptationModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && SystemInfo.supportsComputeShaders && !this.context.interrupted;
+			}
+		}
+
+		public void ResetHistory()
+		{
+			this.m_FirstFrame = true;
+		}
+
+		public override void OnEnable()
+		{
+			this.m_FirstFrame = true;
+		}
+
+		public override void OnDisable()
+		{
+			foreach (RenderTexture obj in this.m_AutoExposurePool)
+			{
+				GraphicsUtils.Destroy(obj);
+			}
+			if (this.m_HistogramBuffer != null)
+			{
+				this.m_HistogramBuffer.Release();
+			}
+			this.m_HistogramBuffer = null;
+			if (this.m_DebugHistogram != null)
+			{
+				this.m_DebugHistogram.Release();
+			}
+			this.m_DebugHistogram = null;
+		}
+
+		private Vector4 GetHistogramScaleOffsetRes()
+		{
+			EyeAdaptationModel.Settings settings = base.model.settings;
+			float num = (float)(settings.logMax - settings.logMin);
+			float num2 = 1f / num;
+			float y = (float)(-(float)settings.logMin) * num2;
+			return new Vector4(num2, y, Mathf.Floor((float)this.context.width / 2f), Mathf.Floor((float)this.context.height / 2f));
+		}
+
+		public Texture Prepare(RenderTexture source, Material uberMaterial)
+		{
+			EyeAdaptationModel.Settings settings = base.model.settings;
+			if (this.m_EyeCompute == null)
+			{
+				this.m_EyeCompute = Resources.Load<ComputeShader>("Shaders/EyeHistogram");
+			}
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Eye Adaptation");
+			material.shaderKeywords = null;
+			if (this.m_HistogramBuffer == null)
+			{
+				this.m_HistogramBuffer = new ComputeBuffer(64, 4);
+			}
+			if (EyeAdaptationComponent.s_EmptyHistogramBuffer == null)
+			{
+				EyeAdaptationComponent.s_EmptyHistogramBuffer = new uint[64];
+			}
+			Vector4 histogramScaleOffsetRes = this.GetHistogramScaleOffsetRes();
+			RenderTexture renderTexture = this.context.renderTextureFactory.Get((int)histogramScaleOffsetRes.z, (int)histogramScaleOffsetRes.w, 0, source.format, RenderTextureReadWrite.Default, FilterMode.Bilinear, TextureWrapMode.Clamp, "FactoryTempTexture");
+			Graphics.Blit(source, renderTexture);
+			if (this.m_AutoExposurePool[0] == null || !this.m_AutoExposurePool[0].IsCreated())
+			{
+				this.m_AutoExposurePool[0] = new RenderTexture(1, 1, 0, RenderTextureFormat.RFloat);
+			}
+			if (this.m_AutoExposurePool[1] == null || !this.m_AutoExposurePool[1].IsCreated())
+			{
+				this.m_AutoExposurePool[1] = new RenderTexture(1, 1, 0, RenderTextureFormat.RFloat);
+			}
+			this.m_HistogramBuffer.SetData(EyeAdaptationComponent.s_EmptyHistogramBuffer);
+			int kernelIndex = this.m_EyeCompute.FindKernel("KEyeHistogram");
+			this.m_EyeCompute.SetBuffer(kernelIndex, "_Histogram", this.m_HistogramBuffer);
+			this.m_EyeCompute.SetTexture(kernelIndex, "_Source", renderTexture);
+			this.m_EyeCompute.SetVector("_ScaleOffsetRes", histogramScaleOffsetRes);
+			this.m_EyeCompute.Dispatch(kernelIndex, Mathf.CeilToInt((float)renderTexture.width / 16f), Mathf.CeilToInt((float)renderTexture.height / 16f), 1);
+			this.context.renderTextureFactory.Release(renderTexture);
+			settings.highPercent = Mathf.Clamp(settings.highPercent, 1.01f, 99f);
+			settings.lowPercent = Mathf.Clamp(settings.lowPercent, 1f, settings.highPercent - 0.01f);
+			material.SetBuffer("_Histogram", this.m_HistogramBuffer);
+			material.SetVector(EyeAdaptationComponent.Uniforms._Params, new Vector4(settings.lowPercent * 0.01f, settings.highPercent * 0.01f, Mathf.Exp(settings.minLuminance * 0.6931472f), Mathf.Exp(settings.maxLuminance * 0.6931472f)));
+			material.SetVector(EyeAdaptationComponent.Uniforms._Speed, new Vector2(settings.speedDown, settings.speedUp));
+			material.SetVector(EyeAdaptationComponent.Uniforms._ScaleOffsetRes, histogramScaleOffsetRes);
+			material.SetFloat(EyeAdaptationComponent.Uniforms._ExposureCompensation, settings.keyValue);
+			if (settings.dynamicKeyValue)
+			{
+				material.EnableKeyword("AUTO_KEY_VALUE");
+			}
+			if (this.m_FirstFrame || !Application.isPlaying)
+			{
+				this.m_CurrentAutoExposure = this.m_AutoExposurePool[0];
+				Graphics.Blit(null, this.m_CurrentAutoExposure, material, 1);
+				Graphics.Blit(this.m_AutoExposurePool[0], this.m_AutoExposurePool[1]);
+			}
+			else
+			{
+				int num = this.m_AutoExposurePingPing;
+				RenderTexture source2 = this.m_AutoExposurePool[++num % 2];
+				RenderTexture renderTexture2 = this.m_AutoExposurePool[++num % 2];
+				Graphics.Blit(source2, renderTexture2, material, (int)settings.adaptationType);
+				this.m_AutoExposurePingPing = (num + 1) % 2;
+				this.m_CurrentAutoExposure = renderTexture2;
+			}
+			if (this.context.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.EyeAdaptation))
+			{
+				if (this.m_DebugHistogram == null || !this.m_DebugHistogram.IsCreated())
+				{
+					this.m_DebugHistogram = new RenderTexture(256, 128, 0, RenderTextureFormat.ARGB32)
+					{
+						filterMode = FilterMode.Point,
+						wrapMode = TextureWrapMode.Clamp
+					};
+				}
+				material.SetFloat(EyeAdaptationComponent.Uniforms._DebugWidth, (float)this.m_DebugHistogram.width);
+				Graphics.Blit(null, this.m_DebugHistogram, material, 2);
+			}
+			this.m_FirstFrame = false;
+			return this.m_CurrentAutoExposure;
+		}
+
+		public void OnGUI()
+		{
+			if (this.m_DebugHistogram == null || !this.m_DebugHistogram.IsCreated())
+			{
+				return;
+			}
+			Rect position = new Rect(this.context.viewport.x * (float)Screen.width + 8f, 8f, (float)this.m_DebugHistogram.width, (float)this.m_DebugHistogram.height);
+			GUI.DrawTexture(position, this.m_DebugHistogram);
+		}
+
+		private ComputeShader m_EyeCompute;
+
+		private ComputeBuffer m_HistogramBuffer;
+
+		private readonly RenderTexture[] m_AutoExposurePool = new RenderTexture[2];
+
+		private int m_AutoExposurePingPing;
+
+		private RenderTexture m_CurrentAutoExposure;
+
+		private RenderTexture m_DebugHistogram;
+
+		private static uint[] s_EmptyHistogramBuffer;
+
+		private bool m_FirstFrame = true;
+
+		private const int k_HistogramBins = 64;
+
+		private const int k_HistogramThreadX = 16;
+
+		private const int k_HistogramThreadY = 16;
+
+		private static class Uniforms
+		{
+			internal static readonly int _Params = Shader.PropertyToID("_Params");
+
+			internal static readonly int _Speed = Shader.PropertyToID("_Speed");
+
+			internal static readonly int _ScaleOffsetRes = Shader.PropertyToID("_ScaleOffsetRes");
+
+			internal static readonly int _ExposureCompensation = Shader.PropertyToID("_ExposureCompensation");
+
+			internal static readonly int _AutoExposure = Shader.PropertyToID("_AutoExposure");
+
+			internal static readonly int _DebugWidth = Shader.PropertyToID("_DebugWidth");
+		}
+	}
+}

+ 99 - 0
Assembly-CSharp/UnityEngine/PostProcessing/EyeAdaptationModel.cs

@@ -0,0 +1,99 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class EyeAdaptationModel : PostProcessingModel
+	{
+		public EyeAdaptationModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = EyeAdaptationModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private EyeAdaptationModel.Settings m_Settings = EyeAdaptationModel.Settings.defaultSettings;
+
+		public enum EyeAdaptationType
+		{
+			Progressive,
+			Fixed
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static EyeAdaptationModel.Settings defaultSettings
+			{
+				get
+				{
+					return new EyeAdaptationModel.Settings
+					{
+						lowPercent = 45f,
+						highPercent = 95f,
+						minLuminance = -5f,
+						maxLuminance = 1f,
+						keyValue = 0.25f,
+						dynamicKeyValue = true,
+						adaptationType = EyeAdaptationModel.EyeAdaptationType.Progressive,
+						speedUp = 2f,
+						speedDown = 1f,
+						logMin = -8,
+						logMax = 4
+					};
+				}
+			}
+
+			[Range(1f, 99f)]
+			[Tooltip("Filters the dark part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")]
+			public float lowPercent;
+
+			[Range(1f, 99f)]
+			[Tooltip("Filters the bright part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")]
+			public float highPercent;
+
+			[Tooltip("Minimum average luminance to consider for auto exposure (in EV).")]
+			public float minLuminance;
+
+			[Tooltip("Maximum average luminance to consider for auto exposure (in EV).")]
+			public float maxLuminance;
+
+			[Min(0f)]
+			[Tooltip("Exposure bias. Use this to offset the global exposure of the scene.")]
+			public float keyValue;
+
+			[Tooltip("Set this to true to let Unity handle the key value automatically based on average luminance.")]
+			public bool dynamicKeyValue;
+
+			[Tooltip("Use \"Progressive\" if you want the auto exposure to be animated. Use \"Fixed\" otherwise.")]
+			public EyeAdaptationModel.EyeAdaptationType adaptationType;
+
+			[Min(0f)]
+			[Tooltip("Adaptation speed from a dark to a light environment.")]
+			public float speedUp;
+
+			[Min(0f)]
+			[Tooltip("Adaptation speed from a light to a dark environment.")]
+			public float speedDown;
+
+			[Range(-16f, -1f)]
+			[Tooltip("Lower bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be.")]
+			public int logMin;
+
+			[Range(1f, 16f)]
+			[Tooltip("Upper bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be.")]
+			public int logMax;
+		}
+	}
+}

+ 82 - 0
Assembly-CSharp/UnityEngine/PostProcessing/FogComponent.cs

@@ -0,0 +1,82 @@
+using System;
+using UnityEngine.Rendering;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class FogComponent : PostProcessingComponentCommandBuffer<FogModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && this.context.isGBufferAvailable && RenderSettings.fog && !this.context.interrupted;
+			}
+		}
+
+		public override string GetName()
+		{
+			return "Fog";
+		}
+
+		public override DepthTextureMode GetCameraFlags()
+		{
+			return DepthTextureMode.Depth;
+		}
+
+		public override CameraEvent GetCameraEvent()
+		{
+			return CameraEvent.AfterImageEffectsOpaque;
+		}
+
+		public override void PopulateCommandBuffer(CommandBuffer cb)
+		{
+			FogModel.Settings settings = base.model.settings;
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Fog");
+			material.shaderKeywords = null;
+			Color value = (!GraphicsUtils.isLinearColorSpace) ? RenderSettings.fogColor : RenderSettings.fogColor.linear;
+			material.SetColor(FogComponent.Uniforms._FogColor, value);
+			material.SetFloat(FogComponent.Uniforms._Density, RenderSettings.fogDensity);
+			material.SetFloat(FogComponent.Uniforms._Start, RenderSettings.fogStartDistance);
+			material.SetFloat(FogComponent.Uniforms._End, RenderSettings.fogEndDistance);
+			FogMode fogMode = RenderSettings.fogMode;
+			if (fogMode != FogMode.Linear)
+			{
+				if (fogMode != FogMode.Exponential)
+				{
+					if (fogMode == FogMode.ExponentialSquared)
+					{
+						material.EnableKeyword("FOG_EXP2");
+					}
+				}
+				else
+				{
+					material.EnableKeyword("FOG_EXP");
+				}
+			}
+			else
+			{
+				material.EnableKeyword("FOG_LINEAR");
+			}
+			RenderTextureFormat format = (!this.context.isHdr) ? RenderTextureFormat.Default : RenderTextureFormat.DefaultHDR;
+			cb.GetTemporaryRT(FogComponent.Uniforms._TempRT, this.context.width, this.context.height, 24, FilterMode.Bilinear, format);
+			cb.Blit(BuiltinRenderTextureType.CameraTarget, FogComponent.Uniforms._TempRT);
+			cb.Blit(FogComponent.Uniforms._TempRT, BuiltinRenderTextureType.CameraTarget, material, (!settings.excludeSkybox) ? 0 : 1);
+			cb.ReleaseTemporaryRT(FogComponent.Uniforms._TempRT);
+		}
+
+		private const string k_ShaderString = "Hidden/Post FX/Fog";
+
+		private static class Uniforms
+		{
+			internal static readonly int _FogColor = Shader.PropertyToID("_FogColor");
+
+			internal static readonly int _Density = Shader.PropertyToID("_Density");
+
+			internal static readonly int _Start = Shader.PropertyToID("_Start");
+
+			internal static readonly int _End = Shader.PropertyToID("_End");
+
+			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");
+		}
+	}
+}

+ 46 - 0
Assembly-CSharp/UnityEngine/PostProcessing/FogModel.cs

@@ -0,0 +1,46 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class FogModel : PostProcessingModel
+	{
+		public FogModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = FogModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private FogModel.Settings m_Settings = FogModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct Settings
+		{
+			public static FogModel.Settings defaultSettings
+			{
+				get
+				{
+					return new FogModel.Settings
+					{
+						excludeSkybox = true
+					};
+				}
+			}
+
+			[Tooltip("Should the fog affect the skybox?")]
+			public bool excludeSkybox;
+		}
+	}
+}

+ 33 - 0
Assembly-CSharp/UnityEngine/PostProcessing/FxaaComponent.cs

@@ -0,0 +1,33 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class FxaaComponent : PostProcessingComponentRenderTexture<AntialiasingModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && base.model.settings.method == AntialiasingModel.Method.Fxaa && !this.context.interrupted;
+			}
+		}
+
+		public void Render(RenderTexture source, RenderTexture destination)
+		{
+			AntialiasingModel.FxaaSettings fxaaSettings = base.model.settings.fxaaSettings;
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/FXAA");
+			AntialiasingModel.FxaaQualitySettings fxaaQualitySettings = AntialiasingModel.FxaaQualitySettings.presets[(int)fxaaSettings.preset];
+			AntialiasingModel.FxaaConsoleSettings fxaaConsoleSettings = AntialiasingModel.FxaaConsoleSettings.presets[(int)fxaaSettings.preset];
+			material.SetVector(FxaaComponent.Uniforms._QualitySettings, new Vector3(fxaaQualitySettings.subpixelAliasingRemovalAmount, fxaaQualitySettings.edgeDetectionThreshold, fxaaQualitySettings.minimumRequiredLuminance));
+			material.SetVector(FxaaComponent.Uniforms._ConsoleSettings, new Vector4(fxaaConsoleSettings.subpixelSpreadAmount, fxaaConsoleSettings.edgeSharpnessAmount, fxaaConsoleSettings.edgeDetectionThreshold, fxaaConsoleSettings.minimumRequiredLuminance));
+			Graphics.Blit(source, destination, material, 0);
+		}
+
+		private static class Uniforms
+		{
+			internal static readonly int _QualitySettings = Shader.PropertyToID("_QualitySettings");
+
+			internal static readonly int _ConsoleSettings = Shader.PropertyToID("_ConsoleSettings");
+		}
+	}
+}

+ 16 - 0
Assembly-CSharp/UnityEngine/PostProcessing/GetSetAttribute.cs

@@ -0,0 +1,16 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class GetSetAttribute : PropertyAttribute
+	{
+		public GetSetAttribute(string name)
+		{
+			this.name = name;
+		}
+
+		public readonly string name;
+
+		public bool dirty;
+	}
+}

+ 61 - 0
Assembly-CSharp/UnityEngine/PostProcessing/GrainComponent.cs

@@ -0,0 +1,61 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class GrainComponent : PostProcessingComponentRenderTexture<GrainModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && base.model.settings.intensity > 0f && SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf) && !this.context.interrupted;
+			}
+		}
+
+		public override void OnDisable()
+		{
+			GraphicsUtils.Destroy(this.m_GrainLookupRT);
+			this.m_GrainLookupRT = null;
+		}
+
+		public override void Prepare(Material uberMaterial)
+		{
+			GrainModel.Settings settings = base.model.settings;
+			uberMaterial.EnableKeyword("GRAIN");
+			float realtimeSinceStartup = Time.realtimeSinceStartup;
+			float value = Random.value;
+			float value2 = Random.value;
+			if (this.m_GrainLookupRT == null || !this.m_GrainLookupRT.IsCreated())
+			{
+				GraphicsUtils.Destroy(this.m_GrainLookupRT);
+				this.m_GrainLookupRT = new RenderTexture(192, 192, 0, RenderTextureFormat.ARGBHalf)
+				{
+					filterMode = FilterMode.Bilinear,
+					wrapMode = TextureWrapMode.Repeat,
+					anisoLevel = 0,
+					name = "Grain Lookup Texture"
+				};
+				this.m_GrainLookupRT.Create();
+			}
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Grain Generator");
+			material.SetFloat(GrainComponent.Uniforms._Phase, realtimeSinceStartup / 20f);
+			Graphics.Blit(null, this.m_GrainLookupRT, material, (!settings.colored) ? 0 : 1);
+			uberMaterial.SetTexture(GrainComponent.Uniforms._GrainTex, this.m_GrainLookupRT);
+			uberMaterial.SetVector(GrainComponent.Uniforms._Grain_Params1, new Vector2(settings.luminanceContribution, settings.intensity * 20f));
+			uberMaterial.SetVector(GrainComponent.Uniforms._Grain_Params2, new Vector4((float)this.context.width / (float)this.m_GrainLookupRT.width / settings.size, (float)this.context.height / (float)this.m_GrainLookupRT.height / settings.size, value, value2));
+		}
+
+		private RenderTexture m_GrainLookupRT;
+
+		private static class Uniforms
+		{
+			internal static readonly int _Grain_Params1 = Shader.PropertyToID("_Grain_Params1");
+
+			internal static readonly int _Grain_Params2 = Shader.PropertyToID("_Grain_Params2");
+
+			internal static readonly int _GrainTex = Shader.PropertyToID("_GrainTex");
+
+			internal static readonly int _Phase = Shader.PropertyToID("_Phase");
+		}
+	}
+}

+ 61 - 0
Assembly-CSharp/UnityEngine/PostProcessing/GrainModel.cs

@@ -0,0 +1,61 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class GrainModel : PostProcessingModel
+	{
+		public GrainModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = GrainModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private GrainModel.Settings m_Settings = GrainModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct Settings
+		{
+			public static GrainModel.Settings defaultSettings
+			{
+				get
+				{
+					return new GrainModel.Settings
+					{
+						colored = true,
+						intensity = 0.5f,
+						size = 1f,
+						luminanceContribution = 0.8f
+					};
+				}
+			}
+
+			[Tooltip("Enable the use of colored grain.")]
+			public bool colored;
+
+			[Range(0f, 1f)]
+			[Tooltip("Grain strength. Higher means more visible grain.")]
+			public float intensity;
+
+			[Range(0.3f, 3f)]
+			[Tooltip("Grain particle size.")]
+			public float size;
+
+			[Range(0f, 1f)]
+			[Tooltip("Controls the noisiness response curve based on scene luminance. Lower values mean less noise in dark areas.")]
+			public float luminanceContribution;
+		}
+	}
+}

+ 139 - 0
Assembly-CSharp/UnityEngine/PostProcessing/GraphicsUtils.cs

@@ -0,0 +1,139 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public static class GraphicsUtils
+	{
+		public static bool isLinearColorSpace
+		{
+			get
+			{
+				return QualitySettings.activeColorSpace == ColorSpace.Linear;
+			}
+		}
+
+		public static bool supportsDX11
+		{
+			get
+			{
+				return SystemInfo.graphicsShaderLevel >= 50 && SystemInfo.supportsComputeShaders;
+			}
+		}
+
+		public static Texture2D whiteTexture
+		{
+			get
+			{
+				if (GraphicsUtils.s_WhiteTexture != null)
+				{
+					return GraphicsUtils.s_WhiteTexture;
+				}
+				GraphicsUtils.s_WhiteTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
+				GraphicsUtils.s_WhiteTexture.SetPixel(0, 0, new Color(1f, 1f, 1f, 1f));
+				GraphicsUtils.s_WhiteTexture.Apply();
+				return GraphicsUtils.s_WhiteTexture;
+			}
+		}
+
+		public static Mesh quad
+		{
+			get
+			{
+				if (GraphicsUtils.s_Quad != null)
+				{
+					return GraphicsUtils.s_Quad;
+				}
+				Vector3[] vertices = new Vector3[]
+				{
+					new Vector3(-1f, -1f, 0f),
+					new Vector3(1f, 1f, 0f),
+					new Vector3(1f, -1f, 0f),
+					new Vector3(-1f, 1f, 0f)
+				};
+				Vector2[] uv = new Vector2[]
+				{
+					new Vector2(0f, 0f),
+					new Vector2(1f, 1f),
+					new Vector2(1f, 0f),
+					new Vector2(0f, 1f)
+				};
+				int[] triangles = new int[]
+				{
+					0,
+					1,
+					2,
+					1,
+					0,
+					3
+				};
+				GraphicsUtils.s_Quad = new Mesh
+				{
+					vertices = vertices,
+					uv = uv,
+					triangles = triangles
+				};
+				GraphicsUtils.s_Quad.RecalculateNormals();
+				GraphicsUtils.s_Quad.RecalculateBounds();
+				return GraphicsUtils.s_Quad;
+			}
+		}
+
+		public static void Blit(Material material, int pass)
+		{
+			GL.PushMatrix();
+			GL.LoadOrtho();
+			material.SetPass(pass);
+			GL.Begin(5);
+			GL.TexCoord2(0f, 0f);
+			GL.Vertex3(0f, 0f, 0.1f);
+			GL.TexCoord2(1f, 0f);
+			GL.Vertex3(1f, 0f, 0.1f);
+			GL.TexCoord2(0f, 1f);
+			GL.Vertex3(0f, 1f, 0.1f);
+			GL.TexCoord2(1f, 1f);
+			GL.Vertex3(1f, 1f, 0.1f);
+			GL.End();
+			GL.PopMatrix();
+		}
+
+		public static void ClearAndBlit(Texture source, RenderTexture destination, Material material, int pass, bool clearColor = true, bool clearDepth = false)
+		{
+			RenderTexture active = RenderTexture.active;
+			RenderTexture.active = destination;
+			GL.Clear(false, clearColor, Color.clear);
+			GL.PushMatrix();
+			GL.LoadOrtho();
+			material.SetTexture("_MainTex", source);
+			material.SetPass(pass);
+			GL.Begin(5);
+			GL.TexCoord2(0f, 0f);
+			GL.Vertex3(0f, 0f, 0.1f);
+			GL.TexCoord2(1f, 0f);
+			GL.Vertex3(1f, 0f, 0.1f);
+			GL.TexCoord2(0f, 1f);
+			GL.Vertex3(0f, 1f, 0.1f);
+			GL.TexCoord2(1f, 1f);
+			GL.Vertex3(1f, 1f, 0.1f);
+			GL.End();
+			GL.PopMatrix();
+			RenderTexture.active = active;
+		}
+
+		public static void Destroy(Object obj)
+		{
+			if (obj != null)
+			{
+				Object.Destroy(obj);
+			}
+		}
+
+		public static void Dispose()
+		{
+			GraphicsUtils.Destroy(GraphicsUtils.s_Quad);
+		}
+
+		private static Texture2D s_WhiteTexture;
+
+		private static Mesh s_Quad;
+	}
+}

+ 45 - 0
Assembly-CSharp/UnityEngine/PostProcessing/MaterialFactory.cs

@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class MaterialFactory : IDisposable
+	{
+		public MaterialFactory()
+		{
+			this.m_Materials = new Dictionary<string, Material>();
+		}
+
+		public Material Get(string shaderName)
+		{
+			Material material;
+			if (!this.m_Materials.TryGetValue(shaderName, out material))
+			{
+				Shader shader = Shader.Find(shaderName);
+				if (shader == null)
+				{
+					throw new ArgumentException(string.Format("Shader not found ({0})", shaderName));
+				}
+				material = new Material(shader)
+				{
+					name = string.Format("PostFX - {0}", shaderName.Substring(shaderName.LastIndexOf("/") + 1)),
+					hideFlags = HideFlags.DontSave
+				};
+				this.m_Materials.Add(shaderName, material);
+			}
+			return material;
+		}
+
+		public void Dispose()
+		{
+			foreach (KeyValuePair<string, Material> keyValuePair in this.m_Materials)
+			{
+				Material value = keyValuePair.Value;
+				GraphicsUtils.Destroy(value);
+			}
+			this.m_Materials.Clear();
+		}
+
+		private Dictionary<string, Material> m_Materials;
+	}
+}

+ 14 - 0
Assembly-CSharp/UnityEngine/PostProcessing/MinAttribute.cs

@@ -0,0 +1,14 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class MinAttribute : PropertyAttribute
+	{
+		public MinAttribute(float min)
+		{
+			this.min = min;
+		}
+
+		public readonly float min;
+	}
+}

+ 418 - 0
Assembly-CSharp/UnityEngine/PostProcessing/MotionBlurComponent.cs

@@ -0,0 +1,418 @@
+using System;
+using System.Runtime.CompilerServices;
+using UnityEngine.Rendering;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class MotionBlurComponent : PostProcessingComponentCommandBuffer<MotionBlurModel>
+	{
+		public MotionBlurComponent.ReconstructionFilter reconstructionFilter
+		{
+			get
+			{
+				if (this.m_ReconstructionFilter == null)
+				{
+					this.m_ReconstructionFilter = new MotionBlurComponent.ReconstructionFilter();
+				}
+				return this.m_ReconstructionFilter;
+			}
+		}
+
+		public MotionBlurComponent.FrameBlendingFilter frameBlendingFilter
+		{
+			get
+			{
+				if (this.m_FrameBlendingFilter == null)
+				{
+					this.m_FrameBlendingFilter = new MotionBlurComponent.FrameBlendingFilter();
+				}
+				return this.m_FrameBlendingFilter;
+			}
+		}
+
+		public override bool active
+		{
+			get
+			{
+				MotionBlurModel.Settings settings = base.model.settings;
+				return base.model.enabled && ((settings.shutterAngle > 0f && this.reconstructionFilter.IsSupported()) || settings.frameBlending > 0f) && SystemInfo.graphicsDeviceType != GraphicsDeviceType.OpenGLES2 && !this.context.interrupted;
+			}
+		}
+
+		public override string GetName()
+		{
+			return "Motion Blur";
+		}
+
+		public void ResetHistory()
+		{
+			if (this.m_FrameBlendingFilter != null)
+			{
+				this.m_FrameBlendingFilter.Dispose();
+			}
+			this.m_FrameBlendingFilter = null;
+		}
+
+		public override DepthTextureMode GetCameraFlags()
+		{
+			return DepthTextureMode.Depth | DepthTextureMode.MotionVectors;
+		}
+
+		public override CameraEvent GetCameraEvent()
+		{
+			return CameraEvent.BeforeImageEffects;
+		}
+
+		public override void OnEnable()
+		{
+			this.m_FirstFrame = true;
+		}
+
+		public override void PopulateCommandBuffer(CommandBuffer cb)
+		{
+			if (this.m_FirstFrame)
+			{
+				this.m_FirstFrame = false;
+				return;
+			}
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Motion Blur");
+			Material mat = this.context.materialFactory.Get("Hidden/Post FX/Blit");
+			MotionBlurModel.Settings settings = base.model.settings;
+			RenderTextureFormat format = (!this.context.isHdr) ? RenderTextureFormat.Default : RenderTextureFormat.DefaultHDR;
+			int tempRT = MotionBlurComponent.Uniforms._TempRT;
+			cb.GetTemporaryRT(tempRT, this.context.width, this.context.height, 0, FilterMode.Point, format);
+			if (settings.shutterAngle > 0f && settings.frameBlending > 0f)
+			{
+				this.reconstructionFilter.ProcessImage(this.context, cb, ref settings, BuiltinRenderTextureType.CameraTarget, tempRT, material);
+				this.frameBlendingFilter.BlendFrames(cb, settings.frameBlending, tempRT, BuiltinRenderTextureType.CameraTarget, material);
+				this.frameBlendingFilter.PushFrame(cb, tempRT, this.context.width, this.context.height, material);
+			}
+			else if (settings.shutterAngle > 0f)
+			{
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, BuiltinRenderTextureType.CameraTarget);
+				cb.Blit(BuiltinRenderTextureType.CameraTarget, tempRT, mat, 0);
+				this.reconstructionFilter.ProcessImage(this.context, cb, ref settings, tempRT, BuiltinRenderTextureType.CameraTarget, material);
+			}
+			else if (settings.frameBlending > 0f)
+			{
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, BuiltinRenderTextureType.CameraTarget);
+				cb.Blit(BuiltinRenderTextureType.CameraTarget, tempRT, mat, 0);
+				this.frameBlendingFilter.BlendFrames(cb, settings.frameBlending, tempRT, BuiltinRenderTextureType.CameraTarget, material);
+				this.frameBlendingFilter.PushFrame(cb, tempRT, this.context.width, this.context.height, material);
+			}
+			cb.ReleaseTemporaryRT(tempRT);
+		}
+
+		public override void OnDisable()
+		{
+			if (this.m_FrameBlendingFilter != null)
+			{
+				this.m_FrameBlendingFilter.Dispose();
+			}
+		}
+
+		private MotionBlurComponent.ReconstructionFilter m_ReconstructionFilter;
+
+		private MotionBlurComponent.FrameBlendingFilter m_FrameBlendingFilter;
+
+		private bool m_FirstFrame = true;
+
+		private static class Uniforms
+		{
+			internal static readonly int _VelocityScale = Shader.PropertyToID("_VelocityScale");
+
+			internal static readonly int _MaxBlurRadius = Shader.PropertyToID("_MaxBlurRadius");
+
+			internal static readonly int _RcpMaxBlurRadius = Shader.PropertyToID("_RcpMaxBlurRadius");
+
+			internal static readonly int _VelocityTex = Shader.PropertyToID("_VelocityTex");
+
+			internal static readonly int _MainTex = Shader.PropertyToID("_MainTex");
+
+			internal static readonly int _Tile2RT = Shader.PropertyToID("_Tile2RT");
+
+			internal static readonly int _Tile4RT = Shader.PropertyToID("_Tile4RT");
+
+			internal static readonly int _Tile8RT = Shader.PropertyToID("_Tile8RT");
+
+			internal static readonly int _TileMaxOffs = Shader.PropertyToID("_TileMaxOffs");
+
+			internal static readonly int _TileMaxLoop = Shader.PropertyToID("_TileMaxLoop");
+
+			internal static readonly int _TileVRT = Shader.PropertyToID("_TileVRT");
+
+			internal static readonly int _NeighborMaxTex = Shader.PropertyToID("_NeighborMaxTex");
+
+			internal static readonly int _LoopCount = Shader.PropertyToID("_LoopCount");
+
+			internal static readonly int _TempRT = Shader.PropertyToID("_TempRT");
+
+			internal static readonly int _History1LumaTex = Shader.PropertyToID("_History1LumaTex");
+
+			internal static readonly int _History2LumaTex = Shader.PropertyToID("_History2LumaTex");
+
+			internal static readonly int _History3LumaTex = Shader.PropertyToID("_History3LumaTex");
+
+			internal static readonly int _History4LumaTex = Shader.PropertyToID("_History4LumaTex");
+
+			internal static readonly int _History1ChromaTex = Shader.PropertyToID("_History1ChromaTex");
+
+			internal static readonly int _History2ChromaTex = Shader.PropertyToID("_History2ChromaTex");
+
+			internal static readonly int _History3ChromaTex = Shader.PropertyToID("_History3ChromaTex");
+
+			internal static readonly int _History4ChromaTex = Shader.PropertyToID("_History4ChromaTex");
+
+			internal static readonly int _History1Weight = Shader.PropertyToID("_History1Weight");
+
+			internal static readonly int _History2Weight = Shader.PropertyToID("_History2Weight");
+
+			internal static readonly int _History3Weight = Shader.PropertyToID("_History3Weight");
+
+			internal static readonly int _History4Weight = Shader.PropertyToID("_History4Weight");
+		}
+
+		private enum Pass
+		{
+			VelocitySetup,
+			TileMax1,
+			TileMax2,
+			TileMaxV,
+			NeighborMax,
+			Reconstruction,
+			FrameCompression,
+			FrameBlendingChroma,
+			FrameBlendingRaw
+		}
+
+		public class ReconstructionFilter
+		{
+			public ReconstructionFilter()
+			{
+				this.CheckTextureFormatSupport();
+			}
+
+			private void CheckTextureFormatSupport()
+			{
+				if (!SystemInfo.SupportsRenderTextureFormat(this.m_PackedRTFormat))
+				{
+					this.m_PackedRTFormat = RenderTextureFormat.ARGB32;
+				}
+			}
+
+			public bool IsSupported()
+			{
+				return SystemInfo.supportsMotionVectors;
+			}
+
+			public void ProcessImage(PostProcessingContext context, CommandBuffer cb, ref MotionBlurModel.Settings settings, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material)
+			{
+				int num = (int)(5f * (float)context.height / 100f);
+				int num2 = ((num - 1) / 8 + 1) * 8;
+				float value = settings.shutterAngle / 360f;
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._VelocityScale, value);
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._MaxBlurRadius, (float)num);
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._RcpMaxBlurRadius, 1f / (float)num);
+				int velocityTex = MotionBlurComponent.Uniforms._VelocityTex;
+				cb.GetTemporaryRT(velocityTex, context.width, context.height, 0, FilterMode.Point, this.m_PackedRTFormat, RenderTextureReadWrite.Linear);
+				cb.Blit(null, velocityTex, material, 0);
+				int tile2RT = MotionBlurComponent.Uniforms._Tile2RT;
+				cb.GetTemporaryRT(tile2RT, context.width / 2, context.height / 2, 0, FilterMode.Point, this.m_VectorRTFormat, RenderTextureReadWrite.Linear);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, velocityTex);
+				cb.Blit(velocityTex, tile2RT, material, 1);
+				int tile4RT = MotionBlurComponent.Uniforms._Tile4RT;
+				cb.GetTemporaryRT(tile4RT, context.width / 4, context.height / 4, 0, FilterMode.Point, this.m_VectorRTFormat, RenderTextureReadWrite.Linear);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, tile2RT);
+				cb.Blit(tile2RT, tile4RT, material, 2);
+				cb.ReleaseTemporaryRT(tile2RT);
+				int tile8RT = MotionBlurComponent.Uniforms._Tile8RT;
+				cb.GetTemporaryRT(tile8RT, context.width / 8, context.height / 8, 0, FilterMode.Point, this.m_VectorRTFormat, RenderTextureReadWrite.Linear);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, tile4RT);
+				cb.Blit(tile4RT, tile8RT, material, 2);
+				cb.ReleaseTemporaryRT(tile4RT);
+				Vector2 v = Vector2.one * ((float)num2 / 8f - 1f) * -0.5f;
+				cb.SetGlobalVector(MotionBlurComponent.Uniforms._TileMaxOffs, v);
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._TileMaxLoop, (float)((int)((float)num2 / 8f)));
+				int tileVRT = MotionBlurComponent.Uniforms._TileVRT;
+				cb.GetTemporaryRT(tileVRT, context.width / num2, context.height / num2, 0, FilterMode.Point, this.m_VectorRTFormat, RenderTextureReadWrite.Linear);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, tile8RT);
+				cb.Blit(tile8RT, tileVRT, material, 3);
+				cb.ReleaseTemporaryRT(tile8RT);
+				int neighborMaxTex = MotionBlurComponent.Uniforms._NeighborMaxTex;
+				int width = context.width / num2;
+				int height = context.height / num2;
+				cb.GetTemporaryRT(neighborMaxTex, width, height, 0, FilterMode.Point, this.m_VectorRTFormat, RenderTextureReadWrite.Linear);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, tileVRT);
+				cb.Blit(tileVRT, neighborMaxTex, material, 4);
+				cb.ReleaseTemporaryRT(tileVRT);
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._LoopCount, (float)Mathf.Clamp(settings.sampleCount / 2, 1, 64));
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, source);
+				cb.Blit(source, destination, material, 5);
+				cb.ReleaseTemporaryRT(velocityTex);
+				cb.ReleaseTemporaryRT(neighborMaxTex);
+			}
+
+			private RenderTextureFormat m_VectorRTFormat = RenderTextureFormat.RGHalf;
+
+			private RenderTextureFormat m_PackedRTFormat = RenderTextureFormat.ARGB2101010;
+		}
+
+		public class FrameBlendingFilter
+		{
+			public FrameBlendingFilter()
+			{
+				this.m_UseCompression = MotionBlurComponent.FrameBlendingFilter.CheckSupportCompression();
+				this.m_RawTextureFormat = MotionBlurComponent.FrameBlendingFilter.GetPreferredRenderTextureFormat();
+				this.m_FrameList = new MotionBlurComponent.FrameBlendingFilter.Frame[4];
+			}
+
+			public void Dispose()
+			{
+				foreach (MotionBlurComponent.FrameBlendingFilter.Frame frame in this.m_FrameList)
+				{
+					frame.Release();
+				}
+			}
+
+			public void PushFrame(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, Material material)
+			{
+				int frameCount = Time.frameCount;
+				if (frameCount == this.m_LastFrameCount)
+				{
+					return;
+				}
+				int num = frameCount % this.m_FrameList.Length;
+				if (this.m_UseCompression)
+				{
+					this.m_FrameList[num].MakeRecord(cb, source, width, height, material);
+				}
+				else
+				{
+					this.m_FrameList[num].MakeRecordRaw(cb, source, width, height, this.m_RawTextureFormat);
+				}
+				this.m_LastFrameCount = frameCount;
+			}
+
+			public void BlendFrames(CommandBuffer cb, float strength, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material)
+			{
+				float time = Time.time;
+				MotionBlurComponent.FrameBlendingFilter.Frame frameRelative = this.GetFrameRelative(-1);
+				MotionBlurComponent.FrameBlendingFilter.Frame frameRelative2 = this.GetFrameRelative(-2);
+				MotionBlurComponent.FrameBlendingFilter.Frame frameRelative3 = this.GetFrameRelative(-3);
+				MotionBlurComponent.FrameBlendingFilter.Frame frameRelative4 = this.GetFrameRelative(-4);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History1LumaTex, frameRelative.lumaTexture);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History2LumaTex, frameRelative2.lumaTexture);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History3LumaTex, frameRelative3.lumaTexture);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History4LumaTex, frameRelative4.lumaTexture);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History1ChromaTex, frameRelative.chromaTexture);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History2ChromaTex, frameRelative2.chromaTexture);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History3ChromaTex, frameRelative3.chromaTexture);
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._History4ChromaTex, frameRelative4.chromaTexture);
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._History1Weight, frameRelative.CalculateWeight(strength, time));
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._History2Weight, frameRelative2.CalculateWeight(strength, time));
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._History3Weight, frameRelative3.CalculateWeight(strength, time));
+				cb.SetGlobalFloat(MotionBlurComponent.Uniforms._History4Weight, frameRelative4.CalculateWeight(strength, time));
+				cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, source);
+				cb.Blit(source, destination, material, (!this.m_UseCompression) ? 8 : 7);
+			}
+
+			private static bool CheckSupportCompression()
+			{
+				return SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.R8) && SystemInfo.supportedRenderTargetCount > 1;
+			}
+
+			private static RenderTextureFormat GetPreferredRenderTextureFormat()
+			{
+				RenderTextureFormat[] array = new RenderTextureFormat[3];
+				RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.$field-51A7A390CD6DE245186881400B18C9D822EFE240).FieldHandle);
+				RenderTextureFormat[] array2 = array;
+				foreach (RenderTextureFormat renderTextureFormat in array2)
+				{
+					if (SystemInfo.SupportsRenderTextureFormat(renderTextureFormat))
+					{
+						return renderTextureFormat;
+					}
+				}
+				return RenderTextureFormat.Default;
+			}
+
+			private MotionBlurComponent.FrameBlendingFilter.Frame GetFrameRelative(int offset)
+			{
+				int num = (Time.frameCount + this.m_FrameList.Length + offset) % this.m_FrameList.Length;
+				return this.m_FrameList[num];
+			}
+
+			private bool m_UseCompression;
+
+			private RenderTextureFormat m_RawTextureFormat;
+
+			private MotionBlurComponent.FrameBlendingFilter.Frame[] m_FrameList;
+
+			private int m_LastFrameCount;
+
+			private struct Frame
+			{
+				public float CalculateWeight(float strength, float currentTime)
+				{
+					if (Mathf.Approximately(this.m_Time, 0f))
+					{
+						return 0f;
+					}
+					float num = Mathf.Lerp(80f, 16f, strength);
+					return Mathf.Exp((this.m_Time - currentTime) * num);
+				}
+
+				public void Release()
+				{
+					if (this.lumaTexture != null)
+					{
+						RenderTexture.ReleaseTemporary(this.lumaTexture);
+					}
+					if (this.chromaTexture != null)
+					{
+						RenderTexture.ReleaseTemporary(this.chromaTexture);
+					}
+					this.lumaTexture = null;
+					this.chromaTexture = null;
+				}
+
+				public void MakeRecord(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, Material material)
+				{
+					this.Release();
+					this.lumaTexture = RenderTexture.GetTemporary(width, height, 0, RenderTextureFormat.R8, RenderTextureReadWrite.Linear);
+					this.chromaTexture = RenderTexture.GetTemporary(width, height, 0, RenderTextureFormat.R8, RenderTextureReadWrite.Linear);
+					this.lumaTexture.filterMode = FilterMode.Point;
+					this.chromaTexture.filterMode = FilterMode.Point;
+					if (this.m_MRT == null)
+					{
+						this.m_MRT = new RenderTargetIdentifier[2];
+					}
+					this.m_MRT[0] = this.lumaTexture;
+					this.m_MRT[1] = this.chromaTexture;
+					cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, source);
+					cb.SetRenderTarget(this.m_MRT, this.lumaTexture);
+					cb.DrawMesh(GraphicsUtils.quad, Matrix4x4.identity, material, 0, 6);
+					this.m_Time = Time.time;
+				}
+
+				public void MakeRecordRaw(CommandBuffer cb, RenderTargetIdentifier source, int width, int height, RenderTextureFormat format)
+				{
+					this.Release();
+					this.lumaTexture = RenderTexture.GetTemporary(width, height, 0, format);
+					this.lumaTexture.filterMode = FilterMode.Point;
+					cb.SetGlobalTexture(MotionBlurComponent.Uniforms._MainTex, source);
+					cb.Blit(source, this.lumaTexture);
+					this.m_Time = Time.time;
+				}
+
+				public RenderTexture lumaTexture;
+
+				public RenderTexture chromaTexture;
+
+				private float m_Time;
+
+				private RenderTargetIdentifier[] m_MRT;
+			}
+		}
+	}
+}

+ 57 - 0
Assembly-CSharp/UnityEngine/PostProcessing/MotionBlurModel.cs

@@ -0,0 +1,57 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class MotionBlurModel : PostProcessingModel
+	{
+		public MotionBlurModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = MotionBlurModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private MotionBlurModel.Settings m_Settings = MotionBlurModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct Settings
+		{
+			public static MotionBlurModel.Settings defaultSettings
+			{
+				get
+				{
+					return new MotionBlurModel.Settings
+					{
+						shutterAngle = 270f,
+						sampleCount = 10,
+						frameBlending = 0f
+					};
+				}
+			}
+
+			[Range(0f, 360f)]
+			[Tooltip("The angle of rotary shutter. Larger values give longer exposure.")]
+			public float shutterAngle;
+
+			[Range(4f, 32f)]
+			[Tooltip("The amount of sample points, which affects quality and performances.")]
+			public int sampleCount;
+
+			[Range(0f, 1f)]
+			[Tooltip("The strength of multiple frame blending. The opacity of preceding frames are determined from this coefficient and time differences.")]
+			public float frameBlending;
+		}
+	}
+}

+ 425 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingBehaviour.cs

@@ -0,0 +1,425 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine.Rendering;
+
+namespace UnityEngine.PostProcessing
+{
+	[ImageEffectAllowedInSceneView]
+	[RequireComponent(typeof(Camera))]
+	[DisallowMultipleComponent]
+	[ExecuteInEditMode]
+	[AddComponentMenu("Effects/Post-Processing Behaviour", -1)]
+	public class PostProcessingBehaviour : MonoBehaviour
+	{
+		private void OnEnable()
+		{
+			this.m_CommandBuffers = new Dictionary<Type, KeyValuePair<CameraEvent, CommandBuffer>>();
+			this.m_MaterialFactory = new MaterialFactory();
+			this.m_RenderTextureFactory = new RenderTextureFactory();
+			this.m_Context = new PostProcessingContext();
+			this.m_Components = new List<PostProcessingComponentBase>();
+			this.m_DebugViews = this.AddComponent<BuiltinDebugViewsComponent>(new BuiltinDebugViewsComponent());
+			this.m_AmbientOcclusion = this.AddComponent<AmbientOcclusionComponent>(new AmbientOcclusionComponent());
+			this.m_ScreenSpaceReflection = this.AddComponent<ScreenSpaceReflectionComponent>(new ScreenSpaceReflectionComponent());
+			this.m_FogComponent = this.AddComponent<FogComponent>(new FogComponent());
+			this.m_MotionBlur = this.AddComponent<MotionBlurComponent>(new MotionBlurComponent());
+			this.m_Taa = this.AddComponent<TaaComponent>(new TaaComponent());
+			this.m_EyeAdaptation = this.AddComponent<EyeAdaptationComponent>(new EyeAdaptationComponent());
+			this.m_DepthOfField = this.AddComponent<DepthOfFieldComponent>(new DepthOfFieldComponent());
+			this.m_Bloom = this.AddComponent<BloomComponent>(new BloomComponent());
+			this.m_ChromaticAberration = this.AddComponent<ChromaticAberrationComponent>(new ChromaticAberrationComponent());
+			this.m_ColorGrading = this.AddComponent<ColorGradingComponent>(new ColorGradingComponent());
+			this.m_UserLut = this.AddComponent<UserLutComponent>(new UserLutComponent());
+			this.m_Grain = this.AddComponent<GrainComponent>(new GrainComponent());
+			this.m_Vignette = this.AddComponent<VignetteComponent>(new VignetteComponent());
+			this.m_Dithering = this.AddComponent<DitheringComponent>(new DitheringComponent());
+			this.m_Fxaa = this.AddComponent<FxaaComponent>(new FxaaComponent());
+			this.m_ComponentStates = new Dictionary<PostProcessingComponentBase, bool>();
+			foreach (PostProcessingComponentBase key in this.m_Components)
+			{
+				this.m_ComponentStates.Add(key, false);
+			}
+			base.useGUILayout = false;
+		}
+
+		private void OnPreCull()
+		{
+			this.m_Camera = base.GetComponent<Camera>();
+			if (this.profile == null || this.m_Camera == null)
+			{
+				return;
+			}
+			PostProcessingContext postProcessingContext = this.m_Context.Reset();
+			postProcessingContext.profile = this.profile;
+			postProcessingContext.renderTextureFactory = this.m_RenderTextureFactory;
+			postProcessingContext.materialFactory = this.m_MaterialFactory;
+			postProcessingContext.camera = this.m_Camera;
+			this.m_DebugViews.Init(postProcessingContext, this.profile.debugViews);
+			this.m_AmbientOcclusion.Init(postProcessingContext, this.profile.ambientOcclusion);
+			this.m_ScreenSpaceReflection.Init(postProcessingContext, this.profile.screenSpaceReflection);
+			this.m_FogComponent.Init(postProcessingContext, this.profile.fog);
+			this.m_MotionBlur.Init(postProcessingContext, this.profile.motionBlur);
+			this.m_Taa.Init(postProcessingContext, this.profile.antialiasing);
+			this.m_EyeAdaptation.Init(postProcessingContext, this.profile.eyeAdaptation);
+			this.m_DepthOfField.Init(postProcessingContext, this.profile.depthOfField);
+			this.m_Bloom.Init(postProcessingContext, this.profile.bloom);
+			this.m_ChromaticAberration.Init(postProcessingContext, this.profile.chromaticAberration);
+			this.m_ColorGrading.Init(postProcessingContext, this.profile.colorGrading);
+			this.m_UserLut.Init(postProcessingContext, this.profile.userLut);
+			this.m_Grain.Init(postProcessingContext, this.profile.grain);
+			this.m_Vignette.Init(postProcessingContext, this.profile.vignette);
+			this.m_Dithering.Init(postProcessingContext, this.profile.dithering);
+			this.m_Fxaa.Init(postProcessingContext, this.profile.antialiasing);
+			if (this.m_PreviousProfile != this.profile)
+			{
+				this.DisableComponents();
+				this.m_PreviousProfile = this.profile;
+			}
+			this.CheckObservers();
+			DepthTextureMode depthTextureMode = postProcessingContext.camera.depthTextureMode;
+			foreach (PostProcessingComponentBase postProcessingComponentBase in this.m_Components)
+			{
+				if (postProcessingComponentBase.active)
+				{
+					depthTextureMode |= postProcessingComponentBase.GetCameraFlags();
+				}
+			}
+			postProcessingContext.camera.depthTextureMode = depthTextureMode;
+			if (!this.m_RenderingInSceneView && this.m_Taa.active && !this.profile.debugViews.willInterrupt)
+			{
+				this.m_Taa.SetProjectionMatrix(this.jitteredMatrixFunc);
+			}
+		}
+
+		private void OnPreRender()
+		{
+			if (this.profile == null)
+			{
+				return;
+			}
+			this.TryExecuteCommandBuffer<BuiltinDebugViewsModel>(this.m_DebugViews);
+			this.TryExecuteCommandBuffer<AmbientOcclusionModel>(this.m_AmbientOcclusion);
+			this.TryExecuteCommandBuffer<ScreenSpaceReflectionModel>(this.m_ScreenSpaceReflection);
+			this.TryExecuteCommandBuffer<FogModel>(this.m_FogComponent);
+			if (!this.m_RenderingInSceneView)
+			{
+				this.TryExecuteCommandBuffer<MotionBlurModel>(this.m_MotionBlur);
+			}
+		}
+
+		private void OnPostRender()
+		{
+			if (this.profile == null || this.m_Camera == null)
+			{
+				return;
+			}
+			if (!this.m_RenderingInSceneView && this.m_Taa.active && !this.profile.debugViews.willInterrupt)
+			{
+				this.m_Context.camera.ResetProjectionMatrix();
+			}
+		}
+
+		private void OnRenderImage(RenderTexture source, RenderTexture destination)
+		{
+			if (this.profile == null || this.m_Camera == null)
+			{
+				Graphics.Blit(source, destination);
+				return;
+			}
+			bool flag = false;
+			bool active = this.m_Fxaa.active;
+			bool flag2 = this.m_Taa.active && !this.m_RenderingInSceneView;
+			bool flag3 = this.m_DepthOfField.active && !this.m_RenderingInSceneView;
+			Material material = this.m_MaterialFactory.Get("Hidden/Post FX/Uber Shader");
+			material.shaderKeywords = null;
+			RenderTexture renderTexture = source;
+			if (flag2)
+			{
+				RenderTexture renderTexture2 = this.m_RenderTextureFactory.Get(renderTexture);
+				this.m_Taa.Render(renderTexture, renderTexture2);
+				renderTexture = renderTexture2;
+			}
+			Texture texture = GraphicsUtils.whiteTexture;
+			if (this.m_EyeAdaptation.active)
+			{
+				flag = true;
+				texture = this.m_EyeAdaptation.Prepare(renderTexture, material);
+			}
+			material.SetTexture("_AutoExposure", texture);
+			if (flag3)
+			{
+				flag = true;
+				this.m_DepthOfField.Prepare(renderTexture, material, flag2, this.m_Taa.jitterVector, this.m_Taa.model.settings.taaSettings.motionBlending);
+			}
+			if (this.m_Bloom.active)
+			{
+				flag = true;
+				this.m_Bloom.Prepare(renderTexture, material, texture);
+			}
+			flag |= this.TryPrepareUberImageEffect<ChromaticAberrationModel>(this.m_ChromaticAberration, material);
+			flag |= this.TryPrepareUberImageEffect<ColorGradingModel>(this.m_ColorGrading, material);
+			flag |= this.TryPrepareUberImageEffect<VignetteModel>(this.m_Vignette, material);
+			flag |= this.TryPrepareUberImageEffect<UserLutModel>(this.m_UserLut, material);
+			Material material2 = (!active) ? null : this.m_MaterialFactory.Get("Hidden/Post FX/FXAA");
+			if (active)
+			{
+				material2.shaderKeywords = null;
+				this.TryPrepareUberImageEffect<GrainModel>(this.m_Grain, material2);
+				this.TryPrepareUberImageEffect<DitheringModel>(this.m_Dithering, material2);
+				if (flag)
+				{
+					RenderTexture renderTexture3 = this.m_RenderTextureFactory.Get(renderTexture);
+					Graphics.Blit(renderTexture, renderTexture3, material, 0);
+					renderTexture = renderTexture3;
+				}
+				this.m_Fxaa.Render(renderTexture, destination);
+			}
+			else
+			{
+				flag |= this.TryPrepareUberImageEffect<GrainModel>(this.m_Grain, material);
+				flag |= this.TryPrepareUberImageEffect<DitheringModel>(this.m_Dithering, material);
+				if (flag)
+				{
+					if (!GraphicsUtils.isLinearColorSpace)
+					{
+						material.EnableKeyword("UNITY_COLORSPACE_GAMMA");
+					}
+					Graphics.Blit(renderTexture, destination, material, 0);
+				}
+			}
+			if (!flag && !active)
+			{
+				Graphics.Blit(renderTexture, destination);
+			}
+			this.m_RenderTextureFactory.ReleaseAll();
+		}
+
+		private void OnGUI()
+		{
+			if (Event.current.type != EventType.Repaint)
+			{
+				return;
+			}
+			if (this.profile == null || this.m_Camera == null)
+			{
+				return;
+			}
+			if (this.m_EyeAdaptation.active && this.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.EyeAdaptation))
+			{
+				this.m_EyeAdaptation.OnGUI();
+			}
+			else if (this.m_ColorGrading.active && this.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.LogLut))
+			{
+				this.m_ColorGrading.OnGUI();
+			}
+			else if (this.m_UserLut.active && this.profile.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.UserLut))
+			{
+				this.m_UserLut.OnGUI();
+			}
+		}
+
+		private void OnDisable()
+		{
+			foreach (KeyValuePair<CameraEvent, CommandBuffer> keyValuePair in this.m_CommandBuffers.Values)
+			{
+				this.m_Camera.RemoveCommandBuffer(keyValuePair.Key, keyValuePair.Value);
+				keyValuePair.Value.Dispose();
+			}
+			this.m_CommandBuffers.Clear();
+			if (this.profile != null)
+			{
+				this.DisableComponents();
+			}
+			this.m_Components.Clear();
+			this.m_MaterialFactory.Dispose();
+			this.m_RenderTextureFactory.Dispose();
+			GraphicsUtils.Dispose();
+		}
+
+		public void ResetTemporalEffects()
+		{
+			this.m_Taa.ResetHistory();
+			this.m_MotionBlur.ResetHistory();
+			this.m_EyeAdaptation.ResetHistory();
+		}
+
+		private void CheckObservers()
+		{
+			foreach (KeyValuePair<PostProcessingComponentBase, bool> keyValuePair in this.m_ComponentStates)
+			{
+				PostProcessingComponentBase key = keyValuePair.Key;
+				bool enabled = key.GetModel().enabled;
+				if (enabled != keyValuePair.Value)
+				{
+					if (enabled)
+					{
+						this.m_ComponentsToEnable.Add(key);
+					}
+					else
+					{
+						this.m_ComponentsToDisable.Add(key);
+					}
+				}
+			}
+			for (int i = 0; i < this.m_ComponentsToDisable.Count; i++)
+			{
+				PostProcessingComponentBase postProcessingComponentBase = this.m_ComponentsToDisable[i];
+				this.m_ComponentStates[postProcessingComponentBase] = false;
+				postProcessingComponentBase.OnDisable();
+			}
+			for (int j = 0; j < this.m_ComponentsToEnable.Count; j++)
+			{
+				PostProcessingComponentBase postProcessingComponentBase2 = this.m_ComponentsToEnable[j];
+				this.m_ComponentStates[postProcessingComponentBase2] = true;
+				postProcessingComponentBase2.OnEnable();
+			}
+			this.m_ComponentsToDisable.Clear();
+			this.m_ComponentsToEnable.Clear();
+		}
+
+		private void DisableComponents()
+		{
+			foreach (PostProcessingComponentBase postProcessingComponentBase in this.m_Components)
+			{
+				PostProcessingModel model = postProcessingComponentBase.GetModel();
+				if (model != null && model.enabled)
+				{
+					postProcessingComponentBase.OnDisable();
+				}
+			}
+		}
+
+		private CommandBuffer AddCommandBuffer<T>(CameraEvent evt, string name) where T : PostProcessingModel
+		{
+			CommandBuffer value = new CommandBuffer
+			{
+				name = name
+			};
+			KeyValuePair<CameraEvent, CommandBuffer> value2 = new KeyValuePair<CameraEvent, CommandBuffer>(evt, value);
+			this.m_CommandBuffers.Add(typeof(T), value2);
+			this.m_Camera.AddCommandBuffer(evt, value2.Value);
+			return value2.Value;
+		}
+
+		private void RemoveCommandBuffer<T>() where T : PostProcessingModel
+		{
+			Type typeFromHandle = typeof(T);
+			KeyValuePair<CameraEvent, CommandBuffer> keyValuePair;
+			if (!this.m_CommandBuffers.TryGetValue(typeFromHandle, out keyValuePair))
+			{
+				return;
+			}
+			this.m_Camera.RemoveCommandBuffer(keyValuePair.Key, keyValuePair.Value);
+			this.m_CommandBuffers.Remove(typeFromHandle);
+			keyValuePair.Value.Dispose();
+		}
+
+		private CommandBuffer GetCommandBuffer<T>(CameraEvent evt, string name) where T : PostProcessingModel
+		{
+			KeyValuePair<CameraEvent, CommandBuffer> keyValuePair;
+			CommandBuffer result;
+			if (!this.m_CommandBuffers.TryGetValue(typeof(T), out keyValuePair))
+			{
+				result = this.AddCommandBuffer<T>(evt, name);
+			}
+			else if (keyValuePair.Key != evt)
+			{
+				this.RemoveCommandBuffer<T>();
+				result = this.AddCommandBuffer<T>(evt, name);
+			}
+			else
+			{
+				result = keyValuePair.Value;
+			}
+			return result;
+		}
+
+		private void TryExecuteCommandBuffer<T>(PostProcessingComponentCommandBuffer<T> component) where T : PostProcessingModel
+		{
+			if (component.active)
+			{
+				CommandBuffer commandBuffer = this.GetCommandBuffer<T>(component.GetCameraEvent(), component.GetName());
+				commandBuffer.Clear();
+				component.PopulateCommandBuffer(commandBuffer);
+			}
+			else
+			{
+				this.RemoveCommandBuffer<T>();
+			}
+		}
+
+		private bool TryPrepareUberImageEffect<T>(PostProcessingComponentRenderTexture<T> component, Material material) where T : PostProcessingModel
+		{
+			if (!component.active)
+			{
+				return false;
+			}
+			component.Prepare(material);
+			return true;
+		}
+
+		private T AddComponent<T>(T component) where T : PostProcessingComponentBase
+		{
+			this.m_Components.Add(component);
+			return component;
+		}
+
+		public PostProcessingProfile profile;
+
+		public Func<Vector2, Matrix4x4> jitteredMatrixFunc;
+
+		private Dictionary<Type, KeyValuePair<CameraEvent, CommandBuffer>> m_CommandBuffers;
+
+		private List<PostProcessingComponentBase> m_Components;
+
+		private Dictionary<PostProcessingComponentBase, bool> m_ComponentStates;
+
+		private MaterialFactory m_MaterialFactory;
+
+		private RenderTextureFactory m_RenderTextureFactory;
+
+		private PostProcessingContext m_Context;
+
+		private Camera m_Camera;
+
+		private PostProcessingProfile m_PreviousProfile;
+
+		private bool m_RenderingInSceneView;
+
+		private BuiltinDebugViewsComponent m_DebugViews;
+
+		private AmbientOcclusionComponent m_AmbientOcclusion;
+
+		private ScreenSpaceReflectionComponent m_ScreenSpaceReflection;
+
+		private FogComponent m_FogComponent;
+
+		private MotionBlurComponent m_MotionBlur;
+
+		private TaaComponent m_Taa;
+
+		private EyeAdaptationComponent m_EyeAdaptation;
+
+		private DepthOfFieldComponent m_DepthOfField;
+
+		private BloomComponent m_Bloom;
+
+		private ChromaticAberrationComponent m_ChromaticAberration;
+
+		private ColorGradingComponent m_ColorGrading;
+
+		private UserLutComponent m_UserLut;
+
+		private GrainComponent m_Grain;
+
+		private VignetteComponent m_Vignette;
+
+		private DitheringComponent m_Dithering;
+
+		private FxaaComponent m_Fxaa;
+
+		private List<PostProcessingComponentBase> m_ComponentsToEnable = new List<PostProcessingComponentBase>();
+
+		private List<PostProcessingComponentBase> m_ComponentsToDisable = new List<PostProcessingComponentBase>();
+	}
+}

+ 20 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponent.cs

@@ -0,0 +1,20 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public abstract class PostProcessingComponent<T> : PostProcessingComponentBase where T : PostProcessingModel
+	{
+		public T model { get; internal set; }
+
+		public virtual void Init(PostProcessingContext pcontext, T pmodel)
+		{
+			this.context = pcontext;
+			this.model = pmodel;
+		}
+
+		public override PostProcessingModel GetModel()
+		{
+			return this.model;
+		}
+	}
+}

+ 26 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponentBase.cs

@@ -0,0 +1,26 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public abstract class PostProcessingComponentBase
+	{
+		public virtual DepthTextureMode GetCameraFlags()
+		{
+			return DepthTextureMode.None;
+		}
+
+		public abstract bool active { get; }
+
+		public virtual void OnEnable()
+		{
+		}
+
+		public virtual void OnDisable()
+		{
+		}
+
+		public abstract PostProcessingModel GetModel();
+
+		public PostProcessingContext context;
+	}
+}

+ 14 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponentCommandBuffer.cs

@@ -0,0 +1,14 @@
+using System;
+using UnityEngine.Rendering;
+
+namespace UnityEngine.PostProcessing
+{
+	public abstract class PostProcessingComponentCommandBuffer<T> : PostProcessingComponent<T> where T : PostProcessingModel
+	{
+		public abstract CameraEvent GetCameraEvent();
+
+		public abstract string GetName();
+
+		public abstract void PopulateCommandBuffer(CommandBuffer cb);
+	}
+}

+ 11 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingComponentRenderTexture.cs

@@ -0,0 +1,11 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public abstract class PostProcessingComponentRenderTexture<T> : PostProcessingComponent<T> where T : PostProcessingModel
+	{
+		public virtual void Prepare(Material material)
+		{
+		}
+	}
+}

+ 72 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingContext.cs

@@ -0,0 +1,72 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public class PostProcessingContext
+	{
+		public bool interrupted { get; private set; }
+
+		public void Interrupt()
+		{
+			this.interrupted = true;
+		}
+
+		public PostProcessingContext Reset()
+		{
+			this.profile = null;
+			this.camera = null;
+			this.materialFactory = null;
+			this.renderTextureFactory = null;
+			this.interrupted = false;
+			return this;
+		}
+
+		public bool isGBufferAvailable
+		{
+			get
+			{
+				return this.camera.actualRenderingPath == RenderingPath.DeferredShading;
+			}
+		}
+
+		public bool isHdr
+		{
+			get
+			{
+				return this.camera.allowHDR;
+			}
+		}
+
+		public int width
+		{
+			get
+			{
+				return this.camera.pixelWidth;
+			}
+		}
+
+		public int height
+		{
+			get
+			{
+				return this.camera.pixelHeight;
+			}
+		}
+
+		public Rect viewport
+		{
+			get
+			{
+				return this.camera.rect;
+			}
+		}
+
+		public PostProcessingProfile profile;
+
+		public Camera camera;
+
+		public MaterialFactory materialFactory;
+
+		public RenderTextureFactory renderTextureFactory;
+	}
+}

+ 34 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingModel.cs

@@ -0,0 +1,34 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public abstract class PostProcessingModel
+	{
+		public bool enabled
+		{
+			get
+			{
+				return this.m_Enabled;
+			}
+			set
+			{
+				this.m_Enabled = value;
+				if (value)
+				{
+					this.OnValidate();
+				}
+			}
+		}
+
+		public abstract void Reset();
+
+		public virtual void OnValidate()
+		{
+		}
+
+		[SerializeField]
+		[GetSet("enabled")]
+		private bool m_Enabled;
+	}
+}

+ 37 - 0
Assembly-CSharp/UnityEngine/PostProcessing/PostProcessingProfile.cs

@@ -0,0 +1,37 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public class PostProcessingProfile : ScriptableObject
+	{
+		public BuiltinDebugViewsModel debugViews = new BuiltinDebugViewsModel();
+
+		public FogModel fog = new FogModel();
+
+		public AntialiasingModel antialiasing = new AntialiasingModel();
+
+		public AmbientOcclusionModel ambientOcclusion = new AmbientOcclusionModel();
+
+		public ScreenSpaceReflectionModel screenSpaceReflection = new ScreenSpaceReflectionModel();
+
+		public DepthOfFieldModel depthOfField = new DepthOfFieldModel();
+
+		public MotionBlurModel motionBlur = new MotionBlurModel();
+
+		public EyeAdaptationModel eyeAdaptation = new EyeAdaptationModel();
+
+		public BloomModel bloom = new BloomModel();
+
+		public ColorGradingModel colorGrading = new ColorGradingModel();
+
+		public UserLutModel userLut = new UserLutModel();
+
+		public ChromaticAberrationModel chromaticAberration = new ChromaticAberrationModel();
+
+		public GrainModel grain = new GrainModel();
+
+		public VignetteModel vignette = new VignetteModel();
+
+		public DitheringModel dithering = new DitheringModel();
+	}
+}

+ 58 - 0
Assembly-CSharp/UnityEngine/PostProcessing/RenderTextureFactory.cs

@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class RenderTextureFactory : IDisposable
+	{
+		public RenderTextureFactory()
+		{
+			this.m_TemporaryRTs = new HashSet<RenderTexture>();
+		}
+
+		public RenderTexture Get(RenderTexture baseRenderTexture)
+		{
+			return this.Get(baseRenderTexture.width, baseRenderTexture.height, baseRenderTexture.depth, baseRenderTexture.format, (!baseRenderTexture.sRGB) ? RenderTextureReadWrite.Linear : RenderTextureReadWrite.sRGB, baseRenderTexture.filterMode, baseRenderTexture.wrapMode, "FactoryTempTexture");
+		}
+
+		public RenderTexture Get(int width, int height, int depthBuffer = 0, RenderTextureFormat format = RenderTextureFormat.ARGBHalf, RenderTextureReadWrite rw = RenderTextureReadWrite.Default, FilterMode filterMode = FilterMode.Bilinear, TextureWrapMode wrapMode = TextureWrapMode.Clamp, string name = "FactoryTempTexture")
+		{
+			RenderTexture temporary = RenderTexture.GetTemporary(width, height, depthBuffer, format, rw);
+			temporary.filterMode = filterMode;
+			temporary.wrapMode = wrapMode;
+			temporary.name = name;
+			this.m_TemporaryRTs.Add(temporary);
+			return temporary;
+		}
+
+		public void Release(RenderTexture rt)
+		{
+			if (rt == null)
+			{
+				return;
+			}
+			if (!this.m_TemporaryRTs.Contains(rt))
+			{
+				throw new ArgumentException(string.Format("Attempting to remove a RenderTexture that was not allocated: {0}", rt));
+			}
+			this.m_TemporaryRTs.Remove(rt);
+			RenderTexture.ReleaseTemporary(rt);
+		}
+
+		public void ReleaseAll()
+		{
+			foreach (RenderTexture temp in this.m_TemporaryRTs)
+			{
+				RenderTexture.ReleaseTemporary(temp);
+			}
+			this.m_TemporaryRTs.Clear();
+		}
+
+		public void Dispose()
+		{
+			this.ReleaseAll();
+		}
+
+		private HashSet<RenderTexture> m_TemporaryRTs;
+	}
+}

+ 224 - 0
Assembly-CSharp/UnityEngine/PostProcessing/ScreenSpaceReflectionComponent.cs

@@ -0,0 +1,224 @@
+using System;
+using UnityEngine.Rendering;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class ScreenSpaceReflectionComponent : PostProcessingComponentCommandBuffer<ScreenSpaceReflectionModel>
+	{
+		public override DepthTextureMode GetCameraFlags()
+		{
+			return DepthTextureMode.Depth;
+		}
+
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && this.context.isGBufferAvailable && !this.context.interrupted;
+			}
+		}
+
+		public override void OnEnable()
+		{
+			this.m_ReflectionTextures[0] = Shader.PropertyToID("_ReflectionTexture0");
+			this.m_ReflectionTextures[1] = Shader.PropertyToID("_ReflectionTexture1");
+			this.m_ReflectionTextures[2] = Shader.PropertyToID("_ReflectionTexture2");
+			this.m_ReflectionTextures[3] = Shader.PropertyToID("_ReflectionTexture3");
+			this.m_ReflectionTextures[4] = Shader.PropertyToID("_ReflectionTexture4");
+		}
+
+		public override string GetName()
+		{
+			return "Screen Space Reflection";
+		}
+
+		public override CameraEvent GetCameraEvent()
+		{
+			return CameraEvent.AfterFinalPass;
+		}
+
+		public override void PopulateCommandBuffer(CommandBuffer cb)
+		{
+			ScreenSpaceReflectionModel.Settings settings = base.model.settings;
+			Camera camera = this.context.camera;
+			int num = (settings.reflection.reflectionQuality != ScreenSpaceReflectionModel.SSRResolution.High) ? 2 : 1;
+			int num2 = this.context.width / num;
+			int num3 = this.context.height / num;
+			float num4 = (float)this.context.width;
+			float num5 = (float)this.context.height;
+			float num6 = num4 / 2f;
+			float num7 = num5 / 2f;
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Screen Space Reflection");
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._RayStepSize, settings.reflection.stepSize);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._AdditiveReflection, (settings.reflection.blendType != ScreenSpaceReflectionModel.SSRReflectionBlendType.Additive) ? 0 : 1);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._BilateralUpsampling, (!this.k_BilateralUpsample) ? 0 : 1);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._TreatBackfaceHitAsMiss, (!this.k_TreatBackfaceHitAsMiss) ? 0 : 1);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._AllowBackwardsRays, (!settings.reflection.reflectBackfaces) ? 0 : 1);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._TraceBehindObjects, (!this.k_TraceBehindObjects) ? 0 : 1);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._MaxSteps, settings.reflection.iterationCount);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._FullResolutionFiltering, 0);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._HalfResolution, (settings.reflection.reflectionQuality == ScreenSpaceReflectionModel.SSRResolution.High) ? 0 : 1);
+			material.SetInt(ScreenSpaceReflectionComponent.Uniforms._HighlightSuppression, (!this.k_HighlightSuppression) ? 0 : 1);
+			float value = num4 / (-2f * Mathf.Tan(camera.fieldOfView / 180f * 3.14159274f * 0.5f));
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._PixelsPerMeterAtOneMeter, value);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._ScreenEdgeFading, settings.screenEdgeMask.intensity);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._ReflectionBlur, settings.reflection.reflectionBlur);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._MaxRayTraceDistance, settings.reflection.maxDistance);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._FadeDistance, settings.intensity.fadeDistance);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._LayerThickness, settings.reflection.widthModifier);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._SSRMultiplier, settings.intensity.reflectionMultiplier);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._FresnelFade, settings.intensity.fresnelFade);
+			material.SetFloat(ScreenSpaceReflectionComponent.Uniforms._FresnelFadePower, settings.intensity.fresnelFadePower);
+			Matrix4x4 projectionMatrix = camera.projectionMatrix;
+			Vector4 value2 = new Vector4(-2f / (num4 * projectionMatrix[0]), -2f / (num5 * projectionMatrix[5]), (1f - projectionMatrix[2]) / projectionMatrix[0], (1f + projectionMatrix[6]) / projectionMatrix[5]);
+			Vector3 v = (!float.IsPositiveInfinity(camera.farClipPlane)) ? new Vector3(camera.nearClipPlane * camera.farClipPlane, camera.nearClipPlane - camera.farClipPlane, camera.farClipPlane) : new Vector3(camera.nearClipPlane, -1f, 1f);
+			material.SetVector(ScreenSpaceReflectionComponent.Uniforms._ReflectionBufferSize, new Vector2((float)num2, (float)num3));
+			material.SetVector(ScreenSpaceReflectionComponent.Uniforms._ScreenSize, new Vector2(num4, num5));
+			material.SetVector(ScreenSpaceReflectionComponent.Uniforms._InvScreenSize, new Vector2(1f / num4, 1f / num5));
+			material.SetVector(ScreenSpaceReflectionComponent.Uniforms._ProjInfo, value2);
+			material.SetVector(ScreenSpaceReflectionComponent.Uniforms._CameraClipInfo, v);
+			Matrix4x4 lhs = default(Matrix4x4);
+			lhs.SetRow(0, new Vector4(num6, 0f, 0f, num6));
+			lhs.SetRow(1, new Vector4(0f, num7, 0f, num7));
+			lhs.SetRow(2, new Vector4(0f, 0f, 1f, 0f));
+			lhs.SetRow(3, new Vector4(0f, 0f, 0f, 1f));
+			Matrix4x4 value3 = lhs * projectionMatrix;
+			material.SetMatrix(ScreenSpaceReflectionComponent.Uniforms._ProjectToPixelMatrix, value3);
+			material.SetMatrix(ScreenSpaceReflectionComponent.Uniforms._WorldToCameraMatrix, camera.worldToCameraMatrix);
+			material.SetMatrix(ScreenSpaceReflectionComponent.Uniforms._CameraToWorldMatrix, camera.worldToCameraMatrix.inverse);
+			RenderTextureFormat format = (!this.context.isHdr) ? RenderTextureFormat.ARGB32 : RenderTextureFormat.ARGBHalf;
+			int normalAndRoughnessTexture = ScreenSpaceReflectionComponent.Uniforms._NormalAndRoughnessTexture;
+			int hitPointTexture = ScreenSpaceReflectionComponent.Uniforms._HitPointTexture;
+			int blurTexture = ScreenSpaceReflectionComponent.Uniforms._BlurTexture;
+			int filteredReflections = ScreenSpaceReflectionComponent.Uniforms._FilteredReflections;
+			int finalReflectionTexture = ScreenSpaceReflectionComponent.Uniforms._FinalReflectionTexture;
+			int tempTexture = ScreenSpaceReflectionComponent.Uniforms._TempTexture;
+			cb.GetTemporaryRT(normalAndRoughnessTexture, -1, -1, 0, FilterMode.Point, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
+			cb.GetTemporaryRT(hitPointTexture, num2, num3, 0, FilterMode.Bilinear, RenderTextureFormat.ARGBHalf, RenderTextureReadWrite.Linear);
+			for (int i = 0; i < 5; i++)
+			{
+				cb.GetTemporaryRT(this.m_ReflectionTextures[i], num2 >> i, num3 >> i, 0, FilterMode.Bilinear, format);
+			}
+			cb.GetTemporaryRT(filteredReflections, num2, num3, 0, (!this.k_BilateralUpsample) ? FilterMode.Bilinear : FilterMode.Point, format);
+			cb.GetTemporaryRT(finalReflectionTexture, num2, num3, 0, FilterMode.Point, format);
+			cb.Blit(BuiltinRenderTextureType.CameraTarget, normalAndRoughnessTexture, material, 6);
+			cb.Blit(BuiltinRenderTextureType.CameraTarget, hitPointTexture, material, 0);
+			cb.Blit(BuiltinRenderTextureType.CameraTarget, filteredReflections, material, 5);
+			cb.Blit(filteredReflections, this.m_ReflectionTextures[0], material, 8);
+			for (int j = 1; j < 5; j++)
+			{
+				int nameID = this.m_ReflectionTextures[j - 1];
+				int num8 = j;
+				cb.GetTemporaryRT(blurTexture, num2 >> num8, num3 >> num8, 0, FilterMode.Bilinear, format);
+				cb.SetGlobalVector(ScreenSpaceReflectionComponent.Uniforms._Axis, new Vector4(1f, 0f, 0f, 0f));
+				cb.SetGlobalFloat(ScreenSpaceReflectionComponent.Uniforms._CurrentMipLevel, (float)j - 1f);
+				cb.Blit(nameID, blurTexture, material, 2);
+				cb.SetGlobalVector(ScreenSpaceReflectionComponent.Uniforms._Axis, new Vector4(0f, 1f, 0f, 0f));
+				nameID = this.m_ReflectionTextures[j];
+				cb.Blit(blurTexture, nameID, material, 2);
+				cb.ReleaseTemporaryRT(blurTexture);
+			}
+			cb.Blit(this.m_ReflectionTextures[0], finalReflectionTexture, material, 3);
+			cb.GetTemporaryRT(tempTexture, camera.pixelWidth, camera.pixelHeight, 0, FilterMode.Bilinear, format);
+			cb.Blit(BuiltinRenderTextureType.CameraTarget, tempTexture, material, 1);
+			cb.Blit(tempTexture, BuiltinRenderTextureType.CameraTarget);
+			cb.ReleaseTemporaryRT(tempTexture);
+		}
+
+		private bool k_HighlightSuppression;
+
+		private bool k_TraceBehindObjects = true;
+
+		private bool k_TreatBackfaceHitAsMiss;
+
+		private bool k_BilateralUpsample = true;
+
+		private readonly int[] m_ReflectionTextures = new int[5];
+
+		private static class Uniforms
+		{
+			internal static readonly int _RayStepSize = Shader.PropertyToID("_RayStepSize");
+
+			internal static readonly int _AdditiveReflection = Shader.PropertyToID("_AdditiveReflection");
+
+			internal static readonly int _BilateralUpsampling = Shader.PropertyToID("_BilateralUpsampling");
+
+			internal static readonly int _TreatBackfaceHitAsMiss = Shader.PropertyToID("_TreatBackfaceHitAsMiss");
+
+			internal static readonly int _AllowBackwardsRays = Shader.PropertyToID("_AllowBackwardsRays");
+
+			internal static readonly int _TraceBehindObjects = Shader.PropertyToID("_TraceBehindObjects");
+
+			internal static readonly int _MaxSteps = Shader.PropertyToID("_MaxSteps");
+
+			internal static readonly int _FullResolutionFiltering = Shader.PropertyToID("_FullResolutionFiltering");
+
+			internal static readonly int _HalfResolution = Shader.PropertyToID("_HalfResolution");
+
+			internal static readonly int _HighlightSuppression = Shader.PropertyToID("_HighlightSuppression");
+
+			internal static readonly int _PixelsPerMeterAtOneMeter = Shader.PropertyToID("_PixelsPerMeterAtOneMeter");
+
+			internal static readonly int _ScreenEdgeFading = Shader.PropertyToID("_ScreenEdgeFading");
+
+			internal static readonly int _ReflectionBlur = Shader.PropertyToID("_ReflectionBlur");
+
+			internal static readonly int _MaxRayTraceDistance = Shader.PropertyToID("_MaxRayTraceDistance");
+
+			internal static readonly int _FadeDistance = Shader.PropertyToID("_FadeDistance");
+
+			internal static readonly int _LayerThickness = Shader.PropertyToID("_LayerThickness");
+
+			internal static readonly int _SSRMultiplier = Shader.PropertyToID("_SSRMultiplier");
+
+			internal static readonly int _FresnelFade = Shader.PropertyToID("_FresnelFade");
+
+			internal static readonly int _FresnelFadePower = Shader.PropertyToID("_FresnelFadePower");
+
+			internal static readonly int _ReflectionBufferSize = Shader.PropertyToID("_ReflectionBufferSize");
+
+			internal static readonly int _ScreenSize = Shader.PropertyToID("_ScreenSize");
+
+			internal static readonly int _InvScreenSize = Shader.PropertyToID("_InvScreenSize");
+
+			internal static readonly int _ProjInfo = Shader.PropertyToID("_ProjInfo");
+
+			internal static readonly int _CameraClipInfo = Shader.PropertyToID("_CameraClipInfo");
+
+			internal static readonly int _ProjectToPixelMatrix = Shader.PropertyToID("_ProjectToPixelMatrix");
+
+			internal static readonly int _WorldToCameraMatrix = Shader.PropertyToID("_WorldToCameraMatrix");
+
+			internal static readonly int _CameraToWorldMatrix = Shader.PropertyToID("_CameraToWorldMatrix");
+
+			internal static readonly int _Axis = Shader.PropertyToID("_Axis");
+
+			internal static readonly int _CurrentMipLevel = Shader.PropertyToID("_CurrentMipLevel");
+
+			internal static readonly int _NormalAndRoughnessTexture = Shader.PropertyToID("_NormalAndRoughnessTexture");
+
+			internal static readonly int _HitPointTexture = Shader.PropertyToID("_HitPointTexture");
+
+			internal static readonly int _BlurTexture = Shader.PropertyToID("_BlurTexture");
+
+			internal static readonly int _FilteredReflections = Shader.PropertyToID("_FilteredReflections");
+
+			internal static readonly int _FinalReflectionTexture = Shader.PropertyToID("_FinalReflectionTexture");
+
+			internal static readonly int _TempTexture = Shader.PropertyToID("_TempTexture");
+		}
+
+		private enum PassIndex
+		{
+			RayTraceStep,
+			CompositeFinal,
+			Blur,
+			CompositeSSR,
+			MinMipGeneration,
+			HitPointToReflections,
+			BilateralKeyPack,
+			BlitDepthAsCSZ,
+			PoissonBlur
+		}
+	}
+}

+ 143 - 0
Assembly-CSharp/UnityEngine/PostProcessing/ScreenSpaceReflectionModel.cs

@@ -0,0 +1,143 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class ScreenSpaceReflectionModel : PostProcessingModel
+	{
+		public ScreenSpaceReflectionModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = ScreenSpaceReflectionModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private ScreenSpaceReflectionModel.Settings m_Settings = ScreenSpaceReflectionModel.Settings.defaultSettings;
+
+		public enum SSRResolution
+		{
+			High,
+			Low = 2
+		}
+
+		public enum SSRReflectionBlendType
+		{
+			PhysicallyBased,
+			Additive
+		}
+
+		[Serializable]
+		public struct IntensitySettings
+		{
+			[Tooltip("Nonphysical multiplier for the SSR reflections. 1.0 is physically based.")]
+			[Range(0f, 2f)]
+			public float reflectionMultiplier;
+
+			[Tooltip("How far away from the maxDistance to begin fading SSR.")]
+			[Range(0f, 1000f)]
+			public float fadeDistance;
+
+			[Tooltip("Amplify Fresnel fade out. Increase if floor reflections look good close to the surface and bad farther 'under' the floor.")]
+			[Range(0f, 1f)]
+			public float fresnelFade;
+
+			[Tooltip("Higher values correspond to a faster Fresnel fade as the reflection changes from the grazing angle.")]
+			[Range(0.1f, 10f)]
+			public float fresnelFadePower;
+		}
+
+		[Serializable]
+		public struct ReflectionSettings
+		{
+			[Tooltip("How the reflections are blended into the render.")]
+			public ScreenSpaceReflectionModel.SSRReflectionBlendType blendType;
+
+			[Tooltip("Half resolution SSRR is much faster, but less accurate.")]
+			public ScreenSpaceReflectionModel.SSRResolution reflectionQuality;
+
+			[Tooltip("Maximum reflection distance in world units.")]
+			[Range(0.1f, 300f)]
+			public float maxDistance;
+
+			[Tooltip("Max raytracing length.")]
+			[Range(16f, 1024f)]
+			public int iterationCount;
+
+			[Tooltip("Log base 2 of ray tracing coarse step size. Higher traces farther, lower gives better quality silhouettes.")]
+			[Range(1f, 16f)]
+			public int stepSize;
+
+			[Tooltip("Typical thickness of columns, walls, furniture, and other objects that reflection rays might pass behind.")]
+			[Range(0.01f, 10f)]
+			public float widthModifier;
+
+			[Tooltip("Blurriness of reflections.")]
+			[Range(0.1f, 8f)]
+			public float reflectionBlur;
+
+			[Tooltip("Disable for a performance gain in scenes where most glossy objects are horizontal, like floors, water, and tables. Leave on for scenes with glossy vertical objects.")]
+			public bool reflectBackfaces;
+		}
+
+		[Serializable]
+		public struct ScreenEdgeMask
+		{
+			[Tooltip("Higher = fade out SSRR near the edge of the screen so that reflections don't pop under camera motion.")]
+			[Range(0f, 1f)]
+			public float intensity;
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static ScreenSpaceReflectionModel.Settings defaultSettings
+			{
+				get
+				{
+					return new ScreenSpaceReflectionModel.Settings
+					{
+						reflection = new ScreenSpaceReflectionModel.ReflectionSettings
+						{
+							blendType = ScreenSpaceReflectionModel.SSRReflectionBlendType.PhysicallyBased,
+							reflectionQuality = ScreenSpaceReflectionModel.SSRResolution.Low,
+							maxDistance = 100f,
+							iterationCount = 256,
+							stepSize = 3,
+							widthModifier = 0.5f,
+							reflectionBlur = 1f,
+							reflectBackfaces = false
+						},
+						intensity = new ScreenSpaceReflectionModel.IntensitySettings
+						{
+							reflectionMultiplier = 1f,
+							fadeDistance = 100f,
+							fresnelFade = 1f,
+							fresnelFadePower = 1f
+						},
+						screenEdgeMask = new ScreenSpaceReflectionModel.ScreenEdgeMask
+						{
+							intensity = 0.03f
+						}
+					};
+				}
+			}
+
+			public ScreenSpaceReflectionModel.ReflectionSettings reflection;
+
+			public ScreenSpaceReflectionModel.IntensitySettings intensity;
+
+			public ScreenSpaceReflectionModel.ScreenEdgeMask screenEdgeMask;
+		}
+	}
+}

+ 181 - 0
Assembly-CSharp/UnityEngine/PostProcessing/TaaComponent.cs

@@ -0,0 +1,181 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class TaaComponent : PostProcessingComponentRenderTexture<AntialiasingModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && base.model.settings.method == AntialiasingModel.Method.Taa && SystemInfo.supportsMotionVectors && SystemInfo.supportedRenderTargetCount >= 2 && !this.context.interrupted;
+			}
+		}
+
+		public override DepthTextureMode GetCameraFlags()
+		{
+			return DepthTextureMode.Depth | DepthTextureMode.MotionVectors;
+		}
+
+		public Vector2 jitterVector { get; private set; }
+
+		public void ResetHistory()
+		{
+			this.m_ResetHistory = true;
+		}
+
+		public void SetProjectionMatrix(Func<Vector2, Matrix4x4> jitteredFunc)
+		{
+			AntialiasingModel.TaaSettings taaSettings = base.model.settings.taaSettings;
+			Vector2 vector = this.GenerateRandomOffset();
+			vector *= taaSettings.jitterSpread;
+			this.context.camera.nonJitteredProjectionMatrix = this.context.camera.projectionMatrix;
+			if (jitteredFunc != null)
+			{
+				this.context.camera.projectionMatrix = jitteredFunc(vector);
+			}
+			else
+			{
+				this.context.camera.projectionMatrix = ((!this.context.camera.orthographic) ? this.GetPerspectiveProjectionMatrix(vector) : this.GetOrthographicProjectionMatrix(vector));
+			}
+			this.context.camera.useJitteredProjectionMatrixForTransparentRendering = false;
+			vector.x /= (float)this.context.width;
+			vector.y /= (float)this.context.height;
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Temporal Anti-aliasing");
+			material.SetVector(TaaComponent.Uniforms._Jitter, vector);
+			this.jitterVector = vector;
+		}
+
+		public void Render(RenderTexture source, RenderTexture destination)
+		{
+			Material material = this.context.materialFactory.Get("Hidden/Post FX/Temporal Anti-aliasing");
+			material.shaderKeywords = null;
+			AntialiasingModel.TaaSettings taaSettings = base.model.settings.taaSettings;
+			if (this.m_ResetHistory || this.m_HistoryTexture == null || this.m_HistoryTexture.width != source.width || this.m_HistoryTexture.height != source.height)
+			{
+				if (this.m_HistoryTexture)
+				{
+					RenderTexture.ReleaseTemporary(this.m_HistoryTexture);
+				}
+				this.m_HistoryTexture = RenderTexture.GetTemporary(source.width, source.height, 0, source.format);
+				this.m_HistoryTexture.name = "TAA History";
+				Graphics.Blit(source, this.m_HistoryTexture, material, 2);
+			}
+			material.SetVector(TaaComponent.Uniforms._SharpenParameters, new Vector4(taaSettings.sharpen, 0f, 0f, 0f));
+			material.SetVector(TaaComponent.Uniforms._FinalBlendParameters, new Vector4(taaSettings.stationaryBlending, taaSettings.motionBlending, 6000f, 0f));
+			material.SetTexture(TaaComponent.Uniforms._MainTex, source);
+			material.SetTexture(TaaComponent.Uniforms._HistoryTex, this.m_HistoryTexture);
+			RenderTexture temporary = RenderTexture.GetTemporary(source.width, source.height, 0, source.format);
+			temporary.name = "TAA History";
+			this.m_MRT[0] = destination.colorBuffer;
+			this.m_MRT[1] = temporary.colorBuffer;
+			Graphics.SetRenderTarget(this.m_MRT, source.depthBuffer);
+			GraphicsUtils.Blit(material, (!this.context.camera.orthographic) ? 0 : 1);
+			RenderTexture.ReleaseTemporary(this.m_HistoryTexture);
+			this.m_HistoryTexture = temporary;
+			this.m_ResetHistory = false;
+		}
+
+		private float GetHaltonValue(int index, int radix)
+		{
+			float num = 0f;
+			float num2 = 1f / (float)radix;
+			while (index > 0)
+			{
+				num += (float)(index % radix) * num2;
+				index /= radix;
+				num2 /= (float)radix;
+			}
+			return num;
+		}
+
+		private Vector2 GenerateRandomOffset()
+		{
+			Vector2 result = new Vector2(this.GetHaltonValue(this.m_SampleIndex & 1023, 2), this.GetHaltonValue(this.m_SampleIndex & 1023, 3));
+			if (++this.m_SampleIndex >= 8)
+			{
+				this.m_SampleIndex = 0;
+			}
+			return result;
+		}
+
+		private Matrix4x4 GetPerspectiveProjectionMatrix(Vector2 offset)
+		{
+			float num = Mathf.Tan(0.008726646f * this.context.camera.fieldOfView);
+			float num2 = num * this.context.camera.aspect;
+			offset.x *= num2 / (0.5f * (float)this.context.width);
+			offset.y *= num / (0.5f * (float)this.context.height);
+			float num3 = (offset.x - num2) * this.context.camera.nearClipPlane;
+			float num4 = (offset.x + num2) * this.context.camera.nearClipPlane;
+			float num5 = (offset.y + num) * this.context.camera.nearClipPlane;
+			float num6 = (offset.y - num) * this.context.camera.nearClipPlane;
+			Matrix4x4 result = default(Matrix4x4);
+			result[0, 0] = 2f * this.context.camera.nearClipPlane / (num4 - num3);
+			result[0, 1] = 0f;
+			result[0, 2] = (num4 + num3) / (num4 - num3);
+			result[0, 3] = 0f;
+			result[1, 0] = 0f;
+			result[1, 1] = 2f * this.context.camera.nearClipPlane / (num5 - num6);
+			result[1, 2] = (num5 + num6) / (num5 - num6);
+			result[1, 3] = 0f;
+			result[2, 0] = 0f;
+			result[2, 1] = 0f;
+			result[2, 2] = -(this.context.camera.farClipPlane + this.context.camera.nearClipPlane) / (this.context.camera.farClipPlane - this.context.camera.nearClipPlane);
+			result[2, 3] = -(2f * this.context.camera.farClipPlane * this.context.camera.nearClipPlane) / (this.context.camera.farClipPlane - this.context.camera.nearClipPlane);
+			result[3, 0] = 0f;
+			result[3, 1] = 0f;
+			result[3, 2] = -1f;
+			result[3, 3] = 0f;
+			return result;
+		}
+
+		private Matrix4x4 GetOrthographicProjectionMatrix(Vector2 offset)
+		{
+			float orthographicSize = this.context.camera.orthographicSize;
+			float num = orthographicSize * this.context.camera.aspect;
+			offset.x *= num / (0.5f * (float)this.context.width);
+			offset.y *= orthographicSize / (0.5f * (float)this.context.height);
+			float left = offset.x - num;
+			float right = offset.x + num;
+			float top = offset.y + orthographicSize;
+			float bottom = offset.y - orthographicSize;
+			return Matrix4x4.Ortho(left, right, bottom, top, this.context.camera.nearClipPlane, this.context.camera.farClipPlane);
+		}
+
+		public override void OnDisable()
+		{
+			if (this.m_HistoryTexture != null)
+			{
+				RenderTexture.ReleaseTemporary(this.m_HistoryTexture);
+			}
+			this.m_HistoryTexture = null;
+			this.m_SampleIndex = 0;
+			this.ResetHistory();
+		}
+
+		private const string k_ShaderString = "Hidden/Post FX/Temporal Anti-aliasing";
+
+		private const int k_SampleCount = 8;
+
+		private readonly RenderBuffer[] m_MRT = new RenderBuffer[2];
+
+		private int m_SampleIndex;
+
+		private bool m_ResetHistory = true;
+
+		private RenderTexture m_HistoryTexture;
+
+		private static class Uniforms
+		{
+			internal static int _Jitter = Shader.PropertyToID("_Jitter");
+
+			internal static int _SharpenParameters = Shader.PropertyToID("_SharpenParameters");
+
+			internal static int _FinalBlendParameters = Shader.PropertyToID("_FinalBlendParameters");
+
+			internal static int _HistoryTex = Shader.PropertyToID("_HistoryTex");
+
+			internal static int _MainTex = Shader.PropertyToID("_MainTex");
+		}
+	}
+}

+ 14 - 0
Assembly-CSharp/UnityEngine/PostProcessing/TrackballAttribute.cs

@@ -0,0 +1,14 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class TrackballAttribute : PropertyAttribute
+	{
+		public TrackballAttribute(string method)
+		{
+			this.method = method;
+		}
+
+		public readonly string method;
+	}
+}

+ 8 - 0
Assembly-CSharp/UnityEngine/PostProcessing/TrackballGroupAttribute.cs

@@ -0,0 +1,8 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class TrackballGroupAttribute : PropertyAttribute
+	{
+	}
+}

+ 38 - 0
Assembly-CSharp/UnityEngine/PostProcessing/UserLutComponent.cs

@@ -0,0 +1,38 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class UserLutComponent : PostProcessingComponentRenderTexture<UserLutModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				UserLutModel.Settings settings = base.model.settings;
+				return base.model.enabled && settings.lut != null && settings.contribution > 0f && settings.lut.height == (int)Mathf.Sqrt((float)settings.lut.width) && !this.context.interrupted;
+			}
+		}
+
+		public override void Prepare(Material uberMaterial)
+		{
+			UserLutModel.Settings settings = base.model.settings;
+			uberMaterial.EnableKeyword("USER_LUT");
+			uberMaterial.SetTexture(UserLutComponent.Uniforms._UserLut, settings.lut);
+			uberMaterial.SetVector(UserLutComponent.Uniforms._UserLut_Params, new Vector4(1f / (float)settings.lut.width, 1f / (float)settings.lut.height, (float)settings.lut.height - 1f, settings.contribution));
+		}
+
+		public void OnGUI()
+		{
+			UserLutModel.Settings settings = base.model.settings;
+			Rect position = new Rect(this.context.viewport.x * (float)Screen.width + 8f, 8f, (float)settings.lut.width, (float)settings.lut.height);
+			GUI.DrawTexture(position, settings.lut);
+		}
+
+		private static class Uniforms
+		{
+			internal static readonly int _UserLut = Shader.PropertyToID("_UserLut");
+
+			internal static readonly int _UserLut_Params = Shader.PropertyToID("_UserLut_Params");
+		}
+	}
+}

+ 51 - 0
Assembly-CSharp/UnityEngine/PostProcessing/UserLutModel.cs

@@ -0,0 +1,51 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class UserLutModel : PostProcessingModel
+	{
+		public UserLutModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = UserLutModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private UserLutModel.Settings m_Settings = UserLutModel.Settings.defaultSettings;
+
+		[Serializable]
+		public struct Settings
+		{
+			public static UserLutModel.Settings defaultSettings
+			{
+				get
+				{
+					return new UserLutModel.Settings
+					{
+						lut = null,
+						contribution = 1f
+					};
+				}
+			}
+
+			[Tooltip("Custom lookup texture (strip format, e.g. 256x16).")]
+			public Texture2D lut;
+
+			[Range(0f, 1f)]
+			[Tooltip("Blending factor.")]
+			public float contribution;
+		}
+	}
+}

+ 47 - 0
Assembly-CSharp/UnityEngine/PostProcessing/VignetteComponent.cs

@@ -0,0 +1,47 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	public sealed class VignetteComponent : PostProcessingComponentRenderTexture<VignetteModel>
+	{
+		public override bool active
+		{
+			get
+			{
+				return base.model.enabled && !this.context.interrupted;
+			}
+		}
+
+		public override void Prepare(Material uberMaterial)
+		{
+			VignetteModel.Settings settings = base.model.settings;
+			uberMaterial.SetColor(VignetteComponent.Uniforms._Vignette_Color, settings.color);
+			if (settings.mode == VignetteModel.Mode.Classic)
+			{
+				uberMaterial.SetVector(VignetteComponent.Uniforms._Vignette_Center, settings.center);
+				uberMaterial.EnableKeyword("VIGNETTE_CLASSIC");
+				float z = (1f - settings.roundness) * 6f + settings.roundness;
+				uberMaterial.SetVector(VignetteComponent.Uniforms._Vignette_Settings, new Vector4(settings.intensity * 3f, settings.smoothness * 5f, z, (!settings.rounded) ? 0f : 1f));
+			}
+			else if (settings.mode == VignetteModel.Mode.Masked && settings.mask != null && settings.opacity > 0f)
+			{
+				uberMaterial.EnableKeyword("VIGNETTE_MASKED");
+				uberMaterial.SetTexture(VignetteComponent.Uniforms._Vignette_Mask, settings.mask);
+				uberMaterial.SetFloat(VignetteComponent.Uniforms._Vignette_Opacity, settings.opacity);
+			}
+		}
+
+		private static class Uniforms
+		{
+			internal static readonly int _Vignette_Color = Shader.PropertyToID("_Vignette_Color");
+
+			internal static readonly int _Vignette_Center = Shader.PropertyToID("_Vignette_Center");
+
+			internal static readonly int _Vignette_Settings = Shader.PropertyToID("_Vignette_Settings");
+
+			internal static readonly int _Vignette_Mask = Shader.PropertyToID("_Vignette_Mask");
+
+			internal static readonly int _Vignette_Opacity = Shader.PropertyToID("_Vignette_Opacity");
+		}
+	}
+}

+ 89 - 0
Assembly-CSharp/UnityEngine/PostProcessing/VignetteModel.cs

@@ -0,0 +1,89 @@
+using System;
+
+namespace UnityEngine.PostProcessing
+{
+	[Serializable]
+	public class VignetteModel : PostProcessingModel
+	{
+		public VignetteModel.Settings settings
+		{
+			get
+			{
+				return this.m_Settings;
+			}
+			set
+			{
+				this.m_Settings = value;
+			}
+		}
+
+		public override void Reset()
+		{
+			this.m_Settings = VignetteModel.Settings.defaultSettings;
+		}
+
+		[SerializeField]
+		private VignetteModel.Settings m_Settings = VignetteModel.Settings.defaultSettings;
+
+		public enum Mode
+		{
+			Classic,
+			Masked
+		}
+
+		[Serializable]
+		public struct Settings
+		{
+			public static VignetteModel.Settings defaultSettings
+			{
+				get
+				{
+					return new VignetteModel.Settings
+					{
+						mode = VignetteModel.Mode.Classic,
+						color = new Color(0f, 0f, 0f, 1f),
+						center = new Vector2(0.5f, 0.5f),
+						intensity = 0.45f,
+						smoothness = 0.2f,
+						roundness = 1f,
+						mask = null,
+						opacity = 1f,
+						rounded = false
+					};
+				}
+			}
+
+			[Tooltip("Use the \"Classic\" mode for parametric controls. Use the \"Masked\" mode to use your own texture mask.")]
+			public VignetteModel.Mode mode;
+
+			[ColorUsage(false)]
+			[Tooltip("Vignette color. Use the alpha channel for transparency.")]
+			public Color color;
+
+			[Tooltip("Sets the vignette center point (screen center is [0.5,0.5]).")]
+			public Vector2 center;
+
+			[Range(0f, 1f)]
+			[Tooltip("Amount of vignetting on screen.")]
+			public float intensity;
+
+			[Range(0.01f, 1f)]
+			[Tooltip("Smoothness of the vignette borders.")]
+			public float smoothness;
+
+			[Range(0f, 1f)]
+			[Tooltip("Lower values will make a square-ish vignette.")]
+			public float roundness;
+
+			[Tooltip("A black and white mask to use as a vignette.")]
+			public Texture mask;
+
+			[Range(0f, 1f)]
+			[Tooltip("Mask opacity.")]
+			public float opacity;
+
+			[Tooltip("Should the vignette be perfectly round or be dependent on the current aspect ratio?")]
+			public bool rounded;
+		}
+	}
+}

+ 2 - 2
Assembly-CSharp/VRExternalFileLoader.cs

@@ -247,7 +247,7 @@ public class VRExternalFileLoader : MonoBehaviour
 	{
 		VRExternalFileLoader.m_LoadingCount = 0;
 		VRExternalFileLoader.m_IsEndLoad = true;
-		this.m_MediaFilePath = Path.GetFullPath(".\\");
+		this.m_MediaFilePath = UTY.gameProjectPath + "\\";
 		if (VRExternalFileLoader.m_PtrMediaPlayerObject == null)
 		{
 			VRExternalFileLoader.m_PtrMediaPlayerObject = (UnityEngine.Object.Instantiate(Resources.Load("SceneVRCommunication\\Tablet\\Media Outputer (Music And Movie)")) as GameObject);
@@ -879,7 +879,7 @@ public class VRExternalFileLoader : MonoBehaviour
 		}
 		mediaPlayer.CloseVideo();
 		applyToMaterial.GetComponent<MeshRenderer>().enabled = true;
-		string path = Path.GetFullPath(".\\") + "GameData/movie_vrcom/" + Path.ChangeExtension(movieName, ".ine");
+		string path = UTY.gameProjectPath + "\\GameData/movie_vrcom/" + Path.ChangeExtension(movieName, ".ine");
 		NDebug.Assert(File.Exists(path), "動画「" + movieName + "」が見つかりません");
 		mediaPlayer.OpenVideoFromFile(MediaPlayer.FileLocation.AbsolutePathOrURL, path, true);
 	}

+ 1 - 1
Assembly-CSharp/VRPhotoMenu.cs

@@ -30,7 +30,7 @@ public class VRPhotoMenu : MonoBehaviour
 
 	public void Refresh()
 	{
-		this.m_ScreenShotPath = Path.GetFullPath(".\\") + "ScreenShot\\VRPhotoThumb\\";
+		this.m_ScreenShotPath = UTY.gameProjectPath + "\\ScreenShot\\VRPhotoThumb\\";
 		string screenShotPath = this.m_ScreenShotPath;
 		DirectoryInfo directoryInfo = new DirectoryInfo(screenShotPath);
 		if (!directoryInfo.Exists)

+ 2 - 2
Assembly-CSharp/Webs.cs

@@ -179,8 +179,8 @@ public class Webs : MonoBehaviour
 					}
 					text7 = text2.Substring(num2, num3 - num2);
 				}
-				string fullPath = Path.GetFullPath(".\\");
-				string text8 = fullPath + "COM3D2.exe";
+				string str = UTY.gameProjectPath + "\\";
+				string text8 = str + "COM3D2.exe";
 				if (File.Exists(text8))
 				{
 					new Process

+ 1 - 1
Assembly-CSharp/WindowPartsFingerPreset.cs

@@ -182,7 +182,7 @@ public class WindowPartsFingerPreset : MonoBehaviour
 	{
 		WindowPartsFingerBlend.Type blendType = tareget_blend.BlendType;
 		FingerBlend.BaseFinger baseFingerClass = tareget_blend.GetBaseFingerClass(tareget_blend.mgr.select_maid, blendType);
-		XElement xelement = new XElement("GameVersion", 1310);
+		XElement xelement = new XElement("GameVersion", 1320);
 		XElement xelement2 = new XElement("RightData", blendType == WindowPartsFingerBlend.Type.RightArm || blendType == WindowPartsFingerBlend.Type.RightLeg);
 		XElement xelement3 = new XElement("BinaryData", Convert.ToBase64String(baseFingerClass.GetBinary()));
 		XNode[] contents = new XNode[]

+ 4 - 4
Assembly-CSharp/YotogiManager.cs

@@ -452,8 +452,8 @@ public class YotogiManager : WfScreenManager
 			{
 				stockMaid.body0.MuneYureL(1f);
 				stockMaid.body0.MuneYureR(1f);
-				stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-				stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+				stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+				stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 				TBodySkin tbodySkin = stockMaid.body0.goSlot[0];
 				if (tbodySkin != null && tbodySkin.kupaCtrl != null)
 				{
@@ -466,8 +466,8 @@ public class YotogiManager : WfScreenManager
 			Maid stockMan = characterMgr.GetStockMan(j);
 			if (stockMan != null && stockMan.body0 != null && stockMan.body0.isLoadedBody)
 			{
-				stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-				stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+				stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+				stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 				TBodySkin tbodySkin2 = this.maid.body0.goSlot[0];
 				if (tbodySkin2 != null && tbodySkin2.kupaCtrl != null)
 				{

+ 4 - 4
Assembly-CSharp/YotogiOldManager.cs

@@ -302,8 +302,8 @@ public class YotogiOldManager : WfScreenManager
 			{
 				stockMaid.body0.MuneYureL(1f);
 				stockMaid.body0.MuneYureR(1f);
-				stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-				stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+				stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+				stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 			}
 		}
 		for (int j = 0; j < characterMgr.GetStockManCount(); j++)
@@ -311,8 +311,8 @@ public class YotogiOldManager : WfScreenManager
 			Maid stockMan = characterMgr.GetStockMan(j);
 			if (stockMan != null && stockMan.body0 != null && stockMan.body0.isLoadedBody)
 			{
-				stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
-				stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
+				stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
+				stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
 			}
 		}
 		string[] array = new string[]

+ 1 - 1
Assembly-CSharp/uGUITutorialPanel.cs

@@ -85,7 +85,7 @@ public class uGUITutorialPanel : MonoBehaviour
 		uGUITutorialPanel.SetTutorialFlag(sceneName);
 		if (uGUITutorialPanel.m_Instance.m_TopTitle != null && sceneName.ToLower() == "WordDictionary".ToLower())
 		{
-			uGUITutorialPanel.m_Instance.m_TopTitle.text = "Grocery";
+			uGUITutorialPanel.m_Instance.m_TopTitle.text = "Glossary";
 		}
 	}