Browse Source

DoF Basics

Muhammad Zohaib Zahid 3 years ago
parent
commit
8d96cd1345

+ 3 - 0
.idea/.idea.VRCyling/.idea/contentModel.xml

@@ -662,6 +662,9 @@
               <e p="DataBroker.cs" t="Include" />
             </e>
             <e p="Visual" t="Include">
+              <e p="DoF" t="Include">
+                <e p="DynamicDoF.cs" t="Include" />
+              </e>
               <e p="Rendering" t="Include">
                 <e p="MaterialBlitFeature.cs" t="Include" />
                 <e p="MaterialBlitRenderPass.cs" t="Include" />

+ 0 - 1
.idea/.idea.VRCyling/.idea/indexLayout.xml

@@ -42,7 +42,6 @@
       <Path>Integrations</Path>
       <Path>Library</Path>
       <Path>Logs</Path>
-      <Path>Temp</Path>
       <Path>UserSettings</Path>
       <Path>obj</Path>
     </explicitExcludes>

+ 73 - 42
.idea/.idea.VRCyling/.idea/workspace.xml

@@ -23,23 +23,18 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="ae9d46da-fd77-45ea-9287-d8d155f44bcf" name="Default Changelist" comment="fixes">
+      <change afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/DoF.meta" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/DoF/DynamicDoF.cs" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/DoF/DynamicDoF.cs.meta" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/contentModel.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/indexLayout.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/indexLayout.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assembly-CSharp-Editor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Assembly-CSharp-Editor.csproj" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Assembly-CSharp.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Assembly-CSharp.csproj" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Assets/Materials/Vignette.mat" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Materials/Vignette.mat" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Scenes/MainScene.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/MainScene.unity" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Scripts/Sensors/ANT/PowerMeterReceiver.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Sensors/ANT/PowerMeterReceiver.cs" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/Vignetting/DynamicVignetting.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/Vignetting/DynamicVignetting.cs" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Scripts/SlopeCollider.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SlopeCollider.cs" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Scripts/Tracking/FrontWheelTracker.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Tracking/FrontWheelTracker.cs" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR.csproj" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR_Editor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR_Editor.csproj" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR_Input_Editor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR_Input_Editor.csproj" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR_Windows_EditorHelper.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR_Windows_EditorHelper.csproj" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Scenes/MainScene_Profiles/Post-process Volume Profile.asset" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Scenes/MainScene_Profiles/Post-process Volume Profile.asset.meta" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Settings/SampleSceneProfile.asset" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Settings/SampleSceneProfile.asset.meta" beforeDir="false" />
       <change beforePath="$PROJECT_DIR$/obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/obj/Debug/SteamVR_Windows_EditorHelper.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/obj/Debug/SteamVR_Windows_EditorHelper.csprojAssemblyReference.cache" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -52,11 +47,15 @@
   <component name="HighlightingSettingsPerFile">
     <setting file="file://$PROJECT_DIR$/Assets/Scripts/Animation/BikeAnimation.cs" root0="FORCE_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Assets/Scripts/Tracking/KineticLegTracker.cs" root0="FORCE_HIGHLIGHTING" />
+    <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1A3A5801-6E2C-4FF1-B975-52B718793608/65/0ec761f4/DepthOfFieldModeParameter.cs" root0="SKIP_HIGHLIGHTING" />
+    <setting file="mock://C:/Users/student/Desktop/VRCyling/Assets/Scripts/SicknessReduction/Visual/Vignetting/DynamicVignetting.cs" root0="SKIP_HIGHLIGHTING" />
+    <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1A3A5801-6E2C-4FF1-B975-52B718793608/5a/7e36ae17/DepthOfField.cs" root0="SKIP_HIGHLIGHTING" />
+    <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/F352B6B8-9F0F-458F-8952-E62C7DE1DBFE/f4/b5ba078b/VolumeParameter`1.cs" root0="SKIP_HIGHLIGHTING" />
+    <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/F8918D0C-C5FC-41A1-BABA-01B207A4C016/1a/773d1d3a/Physics.cs" root0="SKIP_HIGHLIGHTING" />
   </component>
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/Assets/Scripts/Logging/LogData.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/GameManager.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Logging/Logable.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Logging/AsyncLogFileWriter.cs" />
@@ -107,6 +106,7 @@
         <option value="$PROJECT_DIR$/Assets/Scripts/Sensors/ANT/PowerMeterReceiver.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Animation/BikeAnimation.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Tracking/FrontWheelTracker.cs" />
+        <option value="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/DoF/DynamicDoF.cs" />
       </list>
     </option>
   </component>
@@ -120,8 +120,8 @@
   </component>
   <component name="PropertiesComponent">
     <property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
-    <property name="DebuggerViewTab_PTCS_FirstProportionKey" value="0.32719395" />
-    <property name="DebuggerViewTab_PTCS_LastProportionKey" value="0.14247021" />
+    <property name="DebuggerViewTab_PTCS_FirstProportionKey" value="0.3272543" />
+    <property name="DebuggerViewTab_PTCS_LastProportionKey" value="0.14235055" />
     <property name="Discover.Launch.Via.Unity" value="true" />
     <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
@@ -131,10 +131,10 @@
     <property name="vue.rearranger.settings.migration" value="true" />
   </component>
   <component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor &amp; Play">
-    <configuration name="Attach to Unity Editor &amp; Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost">
+    <configuration name="Attach to Unity Editor &amp; Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="12636">
       <option name="allowRunningInParallel" value="false" />
       <option name="listenPortForConnections" value="false" />
-      <option name="pid" />
+      <option name="pid" value="12636" />
       <option name="selectedOptions">
         <set />
       </option>
@@ -172,7 +172,7 @@
       <workItem from="1610431786853" duration="1170000" />
       <workItem from="1610530755101" duration="4080000" />
       <workItem from="1611143576284" duration="1554000" />
-      <workItem from="1611305064694" duration="4285000" />
+      <workItem from="1611305064694" duration="8917000" />
     </task>
     <task id="LOCAL-00001" summary="VR Stuff, Bicycle Animations">
       <created>1606399745852</created>
@@ -251,7 +251,14 @@
       <option name="project" value="LOCAL" />
       <updated>1610531922101</updated>
     </task>
-    <option name="localTasksCounter" value="12" />
+    <task id="LOCAL-00012" summary="Removed logs and added additional steering options">
+      <created>1611309529519</created>
+      <option name="number" value="00012" />
+      <option name="presentableId" value="LOCAL-00012" />
+      <option name="project" value="LOCAL" />
+      <updated>1611309529519</updated>
+    </task>
+    <option name="localTasksCounter" value="13" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -284,7 +291,8 @@
     <MESSAGE value="More logging" />
     <MESSAGE value="Start and Finish events" />
     <MESSAGE value="fixes" />
-    <option name="LAST_COMMIT_MESSAGE" value="fixes" />
+    <MESSAGE value="Removed logs and added additional steering options" />
+    <option name="LAST_COMMIT_MESSAGE" value="Removed logs and added additional steering options" />
   </component>
   <component name="WindowStateProjectService">
     <state x="188" y="243" key="#xdebugger.evaluate" timestamp="1608637186447">
@@ -292,59 +300,68 @@
     </state>
     <state x="476" y="134" key="#xdebugger.evaluate/0.0.1440.860@0.0.1440.860" timestamp="1608570995081" />
     <state x="188" y="243" key="#xdebugger.evaluate/0.0.1440.900@0.0.1440.900" timestamp="1608637186447" />
-    <state width="478" height="402" key="DebuggerActiveHint" timestamp="1608636244835">
-      <screen x="0" y="0" width="1440" height="900" />
+    <state width="680" height="497" key="DebuggerActiveHint" timestamp="1611319259442">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="478" height="402" key="DebuggerActiveHint/0.0.1440.900@0.0.1440.900" timestamp="1608636244835" />
     <state width="463" height="464" key="DebuggerActiveHint/0.0.1920.1040@0.0.1920.1040" timestamp="1608205291466" />
-    <state width="1877" height="385" key="GridCell.Tab.0.bottom" timestamp="1610538449594">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="680" height="497" key="DebuggerActiveHint/0.0.2048.1112@0.0.2048.1112" timestamp="1611319259442" />
+    <state width="2005" height="414" key="GridCell.Tab.0.bottom" timestamp="1611319177899">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.bottom/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.0.bottom/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449594" />
-    <state width="1877" height="385" key="GridCell.Tab.0.center" timestamp="1610538449593">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="2005" height="414" key="GridCell.Tab.0.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1611319177899" />
+    <state width="2005" height="414" key="GridCell.Tab.0.center" timestamp="1611319177899">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.center/0.0.1440.860@0.0.1440.860" timestamp="1608571659056" />
     <state width="1398" height="320" key="GridCell.Tab.0.center/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449593" />
-    <state width="1877" height="385" key="GridCell.Tab.0.left" timestamp="1610538449593">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="2005" height="414" key="GridCell.Tab.0.center/0.0.2048.1112@0.0.2048.1112" timestamp="1611319177899" />
+    <state width="2005" height="414" key="GridCell.Tab.0.left" timestamp="1611319177899">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.left/0.0.1440.860@0.0.1440.860" timestamp="1608571659056" />
     <state width="1398" height="320" key="GridCell.Tab.0.left/0.0.1440.900@0.0.1440.900" timestamp="1608637304835" />
     <state width="1877" height="385" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449593" />
-    <state width="1877" height="385" key="GridCell.Tab.0.right" timestamp="1610538449594">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="2005" height="414" key="GridCell.Tab.0.left/0.0.2048.1112@0.0.2048.1112" timestamp="1611319177899" />
+    <state width="2005" height="414" key="GridCell.Tab.0.right" timestamp="1611319177899">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.right/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.0.right/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449594" />
-    <state width="1877" height="385" key="GridCell.Tab.1.bottom" timestamp="1610538457610">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="2005" height="414" key="GridCell.Tab.0.right/0.0.2048.1112@0.0.2048.1112" timestamp="1611319177899" />
+    <state width="2005" height="414" key="GridCell.Tab.1.bottom" timestamp="1611319236653">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.bottom/0.0.1440.860@0.0.1440.860" timestamp="1608571659058" />
     <state width="1398" height="320" key="GridCell.Tab.1.bottom/0.0.1440.900@0.0.1440.900" timestamp="1608637304837" />
     <state width="1877" height="385" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457610" />
-    <state width="1877" height="385" key="GridCell.Tab.1.center" timestamp="1610538457610">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="2005" height="414" key="GridCell.Tab.1.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1611319236653" />
+    <state width="2005" height="414" key="GridCell.Tab.1.center" timestamp="1611319236653">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.center/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.1.center/0.0.1440.900@0.0.1440.900" timestamp="1608637304837" />
     <state width="1877" height="385" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457610" />
-    <state width="1877" height="385" key="GridCell.Tab.1.left" timestamp="1610538457609">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="2005" height="414" key="GridCell.Tab.1.center/0.0.2048.1112@0.0.2048.1112" timestamp="1611319236653" />
+    <state width="2005" height="414" key="GridCell.Tab.1.left" timestamp="1611319236653">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.left/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.1.left/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457609" />
-    <state width="1877" height="385" key="GridCell.Tab.1.right" timestamp="1610538457610">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="2005" height="414" key="GridCell.Tab.1.left/0.0.2048.1112@0.0.2048.1112" timestamp="1611319236653" />
+    <state width="2005" height="414" key="GridCell.Tab.1.right" timestamp="1611319236653">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.right/0.0.1440.860@0.0.1440.860" timestamp="1608571659058" />
     <state width="1398" height="320" key="GridCell.Tab.1.right/0.0.1440.900@0.0.1440.900" timestamp="1608637304837" />
     <state width="1877" height="385" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457610" />
+    <state width="2005" height="414" key="GridCell.Tab.1.right/0.0.2048.1112@0.0.2048.1112" timestamp="1611319236653" />
     <state width="1877" height="385" key="GridCell.Tab.2.bottom" timestamp="1609933996568">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
@@ -409,12 +426,13 @@
     <state x="69" y="76" width="1302" height="708" key="VCS.FileHistoryDialog/0.0.1440.860@0.0.1440.860" timestamp="1610365025117" />
     <state x="69" y="80" width="1302" height="741" key="VCS.FileHistoryDialog/0.0.1440.900@0.0.1440.900" timestamp="1608635342446" />
     <state x="92" y="92" width="1736" height="856" key="VCS.FileHistoryDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1607591027227" />
-    <state x="552" y="252" key="Vcs.Push.Dialog.v2" timestamp="1610531923390">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state x="589" y="269" key="Vcs.Push.Dialog.v2" timestamp="1611309563735">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state x="414" y="208" key="Vcs.Push.Dialog.v2/0.0.1440.860@0.0.1440.860" timestamp="1610362459013" />
     <state x="414" y="218" key="Vcs.Push.Dialog.v2/0.0.1440.900@0.0.1440.900" timestamp="1608628624093" />
     <state x="552" y="252" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1610531923390" />
+    <state x="589" y="269" key="Vcs.Push.Dialog.v2/0.0.2048.1112@0.0.2048.1112" timestamp="1611309563735" />
     <state width="726" height="436" key="XDebugger.FullValuePopup" timestamp="1608570184149">
       <screen x="0" y="0" width="1440" height="860" />
     </state>
@@ -437,12 +455,12 @@
     </state>
     <state x="300" y="85" width="1140" height="689" key="editAsTableFormatDialogDimension/0.0.1440.860@0.0.1440.860" timestamp="1610362422263" />
     <state x="400" y="103" key="editAsTableFormatDialogDimension/0.0.1920.1040@0.0.1920.1040" timestamp="1610533263726" />
-    <state x="524" y="37" width="1001" height="1037" key="find.popup" timestamp="1611305100140">
+    <state x="524" y="37" width="1001" height="1037" key="find.popup" timestamp="1611316586014">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state x="368" y="29" width="703" height="801" key="find.popup/0.0.1440.860@0.0.1440.860" timestamp="1610363676930" />
     <state x="491" y="35" width="938" height="969" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1610533618773" />
-    <state x="524" y="37" width="1001" height="1037" key="find.popup/0.0.2048.1112@0.0.2048.1112" timestamp="1611305100140" />
+    <state x="524" y="37" width="1001" height="1037" key="find.popup/0.0.2048.1112@0.0.2048.1112" timestamp="1611316586014" />
     <state x="379" y="197" key="run.anything.popup" timestamp="1610374243030">
       <screen x="0" y="0" width="1440" height="860" />
     </state>
@@ -495,6 +513,19 @@
           </properties>
           <option name="timeStamp" value="22" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" type="DotNet Breakpoints">
+          <url>file://$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/DoF/DynamicDoF.cs</url>
+          <line>21</line>
+          <properties documentPath="C:\Users\student\Desktop\VRCyling\Assets\Scripts\SicknessReduction\Visual\DoF\DynamicDoF.cs" initialLine="20">
+            <startOffsets>
+              <option value="556" />
+            </startOffsets>
+            <endOffsets>
+              <option value="646" />
+            </endOffsets>
+          </properties>
+          <option name="timeStamp" value="23" />
+        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
     <pin-to-top-manager>

+ 1 - 0
Assembly-CSharp.csproj

@@ -312,6 +312,7 @@
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\Fit\Profile\Types\StrokeType.cs" />
      <Compile Include="Assets\AdvancedAnt\Scripts\SpeedDisplay.cs" />
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\Fit\Mesg.cs" />
+     <Compile Include="Assets\Scripts\SicknessReduction\Visual\DoF\DynamicDoF.cs" />
      <None Include="Assets\TextMesh Pro\Shaders\TMPro.cginc" />
      <None Include="Assets\TextMesh Pro\Shaders\TMP_SDF-Mobile Overlay.shader" />
      <None Include="Assets\AdvancedAnt\Plugins\Ant\License.txt" />

+ 2 - 2
Assets/Materials/Vignette.mat

@@ -58,10 +58,10 @@ Material:
     - _GlossMapScale: 0
     - _Glossiness: 0
     - _GlossyReflections: 0
-    - _IFOV: 0.9492177
+    - _IFOV: 0.9435109
     - _InnerRadius: 0.15
     - _Metallic: 0
-    - _OFOV: 0.9992177
+    - _OFOV: 0.9935109
     - _OcclusionStrength: 1
     - _QueueOffset: 0
     - _ReceiveShadows: 1

+ 21 - 0
Assets/Scenes/MainScene.unity

@@ -20055,6 +20055,12 @@ Transform:
     type: 3}
   m_PrefabInstance: {fileID: 82077831}
   m_PrefabAsset: {fileID: 0}
+--- !u!20 &82271104 stripped
+Camera:
+  m_CorrespondingSourceObject: {fileID: 4988978072740620642, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
+    type: 3}
+  m_PrefabInstance: {fileID: 1929752190}
+  m_PrefabAsset: {fileID: 0}
 --- !u!1001 &82428526
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -208510,6 +208516,7 @@ GameObject:
   m_Component:
   - component: {fileID: 868699605}
   - component: {fileID: 868699604}
+  - component: {fileID: 868699606}
   m_Layer: 0
   m_Name: VisualSicknessMeasures
   m_TagString: Untagged
@@ -208552,6 +208559,20 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 9
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &868699606
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 868699603}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: aa2123de9a044612afdcd36b95b61a51, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  playerCamera: {fileID: 82271104}
+  postProcessProfile: {fileID: 11400000, guid: 10fc4df2da32a41aaa32d77bc913491c, type: 2}
 --- !u!1001 &868867311
 PrefabInstance:
   m_ObjectHideFlags: 0

+ 0 - 127
Assets/Scenes/MainScene_Profiles/Post-process Volume Profile.asset

@@ -1,127 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &-6501224375746375409
-MonoBehaviour:
-  m_ObjectHideFlags: 3
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 0}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: b3f6f3f7c722b4544b97e3c75840aa33, type: 3}
-  m_Name: AutoExposure
-  m_EditorClassIdentifier: 
-  active: 0
-  enabled:
-    overrideState: 1
-    value: 1
-  filtering:
-    overrideState: 1
-    value: {x: 53.999996, y: 99}
-  minLuminance:
-    overrideState: 1
-    value: 2.84
-  maxLuminance:
-    overrideState: 1
-    value: 4.17
-  keyValue:
-    overrideState: 1
-    value: 1
-  eyeAdaptation:
-    overrideState: 1
-    value: 0
-  speedUp:
-    overrideState: 1
-    value: 2
-  speedDown:
-    overrideState: 1
-    value: 1
---- !u!114 &-5635165772831660972
-MonoBehaviour:
-  m_ObjectHideFlags: 3
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 0}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 556797029e73b2347956b6579e77e05b, type: 3}
-  m_Name: DepthOfField
-  m_EditorClassIdentifier: 
-  active: 0
-  enabled:
-    overrideState: 1
-    value: 1
-  focusDistance:
-    overrideState: 1
-    value: 10
-  aperture:
-    overrideState: 1
-    value: 13.5
-  focalLength:
-    overrideState: 1
-    value: 162
-  kernelSize:
-    overrideState: 1
-    value: 1
---- !u!114 &11400000
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 0}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3}
-  m_Name: Post-process Volume Profile
-  m_EditorClassIdentifier: 
-  settings:
-  - {fileID: 2238651405884094269}
-  - {fileID: -6501224375746375409}
-  - {fileID: -5635165772831660972}
---- !u!114 &2238651405884094269
-MonoBehaviour:
-  m_ObjectHideFlags: 3
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 0}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 40b924e2dad56384a8df2a1e111bb675, type: 3}
-  m_Name: Vignette
-  m_EditorClassIdentifier: 
-  active: 1
-  enabled:
-    overrideState: 1
-    value: 1
-  mode:
-    overrideState: 1
-    value: 0
-  color:
-    overrideState: 1
-    value: {r: 0, g: 0, b: 0, a: 1}
-  center:
-    overrideState: 1
-    value: {x: 0.5, y: 0.5}
-  intensity:
-    overrideState: 1
-    value: 1
-  smoothness:
-    overrideState: 1
-    value: 0.382
-  roundness:
-    overrideState: 1
-    value: 1
-  rounded:
-    overrideState: 1
-    value: 0
-  mask:
-    overrideState: 0
-    value: {fileID: 0}
-    defaultState: 1
-  opacity:
-    overrideState: 0
-    value: 1

+ 0 - 8
Assets/Scenes/MainScene_Profiles/Post-process Volume Profile.asset.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: a4793ff60243ab34ba013fe0b9868575
-NativeFormatImporter:
-  externalObjects: {}
-  mainObjectFileID: 0
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 3 - 0
Assets/Scripts/SicknessReduction/Visual/DoF.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 9b2fec006c1e4817936fa036c312744f
+timeCreated: 1611315755

+ 71 - 0
Assets/Scripts/SicknessReduction/Visual/DoF/DynamicDoF.cs

@@ -0,0 +1,71 @@
+using System;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.Rendering;
+using UnityEngine.Rendering.Universal;
+
+namespace SicknessReduction.Visual.DoF
+{
+    public class DynamicDoF : MonoBehaviour
+    {
+        public Camera playerCamera;
+        public VolumeProfile postProcessProfile;
+        
+        private Transform cameraTransform;
+        private DepthOfField doF;
+        private bool doFAvailable;
+
+        private void Start()
+        {
+            cameraTransform = playerCamera.transform;
+            doF = (DepthOfField) postProcessProfile.components.FirstOrDefault(c => c is DepthOfField);
+            doFAvailable = doF != null;
+            if (doFAvailable)
+            {
+                // ReSharper disable once PossibleNullReferenceException
+                doF.mode.value = DepthOfFieldMode.Bokeh;
+            }
+            else
+            {
+                Debug.LogWarning("No DepthOfField found in PostProcessing Profile!");
+            }
+           
+        }
+
+        private void Update()
+        {
+            if(!doFAvailable) return;
+            var focalDistance = CastRay();
+            if (focalDistance < 0)
+            {
+                doF.active = false;
+                return;
+            }
+
+            doF.active = true;
+            doF.focusDistance.value = focalDistance;
+            doF.focalLength.value = focalDistance * 10;
+        }
+
+        private float CastRay()
+        {
+            var position = cameraTransform.position;
+            var forward = cameraTransform.forward;
+            var start = position + forward * playerCamera.nearClipPlane;
+            var end = position + forward * playerCamera.farClipPlane;
+
+            if (Physics.Linecast(start, end, out var hit, Physics.DefaultRaycastLayers))
+            {
+                Debug.DrawLine(start, end, Color.green);
+                Debug.Log("DoF - Hit, Distance = "+hit.distance);
+                return hit.distance;
+            }
+
+            Debug.DrawRay(position, position + forward * playerCamera.farClipPlane, Color.red);
+            Debug.Log("DoF - No hit");
+            return -1f;
+
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/SicknessReduction/Visual/DoF/DynamicDoF.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: aa2123de9a044612afdcd36b95b61a51
+timeCreated: 1611315765

+ 15 - 15
Assets/Settings/SampleSceneProfile.asset → Assets/Settings/PPProfile.asset

@@ -16,11 +16,11 @@ MonoBehaviour:
   m_AdvancedMode: 0
   threshold:
     m_OverrideState: 1
-    m_Value: 1
+    m_Value: 0
     min: 0
   intensity:
     m_OverrideState: 1
-    m_Value: 1
+    m_Value: 11.52
     min: 0
   scatter:
     m_OverrideState: 0
@@ -59,7 +59,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: c01700fd266d6914ababb731e09af2eb, type: 3}
   m_Name: DepthOfField
   m_EditorClassIdentifier: 
-  active: 0
+  active: 1
   m_AdvancedMode: 0
   mode:
     m_OverrideState: 1
@@ -70,28 +70,28 @@ MonoBehaviour:
     min: 0
   gaussianEnd:
     m_OverrideState: 1
-    m_Value: 75.3
+    m_Value: 1111
     min: 0
   gaussianMaxRadius:
-    m_OverrideState: 0
-    m_Value: 1
+    m_OverrideState: 1
+    m_Value: 0.5
     min: 0.5
     max: 1.5
   highQualitySampling:
-    m_OverrideState: 0
-    m_Value: 0
+    m_OverrideState: 1
+    m_Value: 1
   focusDistance:
     m_OverrideState: 1
-    m_Value: 0.65
+    m_Value: 0.9476174
     min: 0.1
   aperture:
-    m_OverrideState: 0
-    m_Value: 2.2
+    m_OverrideState: 1
+    m_Value: 2.8
     min: 1
     max: 32
   focalLength:
     m_OverrideState: 1
-    m_Value: 26
+    m_Value: 9.476174
     min: 1
     max: 300
   bladeCount:
@@ -101,12 +101,12 @@ MonoBehaviour:
     max: 9
   bladeCurvature:
     m_OverrideState: 0
-    m_Value: 1
+    m_Value: 0.736
     min: 0
     max: 1
   bladeRotation:
     m_OverrideState: 0
-    m_Value: 0
+    m_Value: 10
     min: -180
     max: 180
 --- !u!114 &11400000
@@ -119,7 +119,7 @@ MonoBehaviour:
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
-  m_Name: SampleSceneProfile
+  m_Name: PPProfile
   m_EditorClassIdentifier: 
   components:
   - {fileID: 849379129802519247}

+ 0 - 0
Assets/Settings/SampleSceneProfile.asset.meta → Assets/Settings/PPProfile.asset.meta


+ 1 - 1
ProjectSettings/DynamicsManager.asset

@@ -13,7 +13,7 @@ PhysicsManager:
   m_DefaultSolverIterations: 6
   m_DefaultSolverVelocityIterations: 1
   m_QueriesHitBackfaces: 0
-  m_QueriesHitTriggers: 1
+  m_QueriesHitTriggers: 0
   m_EnableAdaptiveForce: 0
   m_ClothInterCollisionDistance: 0.1
   m_ClothInterCollisionStiffness: 0.2

BIN
obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache