diff --git a/Frozen.avc b/Frozen.avc
index 79ee819..116d54a 100644
--- a/Frozen.avc
+++ b/Frozen.avc
@@ -15,19 +15,10 @@
-
-
-
-
-
-
-
-
-
-
+
@@ -40,165 +31,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
-
+
+
+
@@ -212,20 +59,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -320,7 +153,7 @@
-
+
diff --git a/Unity_2018_Frozen/Assets/Frozen/Frozen.unity b/Unity_2018_Frozen/Assets/Frozen/Frozen.unity
index 1607386..6c59f1d 100644
--- a/Unity_2018_Frozen/Assets/Frozen/Frozen.unity
+++ b/Unity_2018_Frozen/Assets/Frozen/Frozen.unity
@@ -204,7 +204,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 9
+ m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &151858420
GameObject:
@@ -410,7 +410,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 3
+ m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &338663764
GameObject:
@@ -439,7 +439,7 @@ Transform:
m_Children:
- {fileID: 917676528}
m_Father: {fileID: 0}
- m_RootOrder: 14
+ m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &343589998
GameObject:
@@ -622,7 +622,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 10
+ m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &386695295
GameObject:
@@ -653,7 +653,7 @@ Transform:
- {fileID: 850228141}
- {fileID: 1848145250}
m_Father: {fileID: 0}
- m_RootOrder: 7
+ m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &401185750
GameObject:
@@ -685,7 +685,7 @@ Transform:
- {fileID: 1579390333}
- {fileID: 343589999}
m_Father: {fileID: 0}
- m_RootOrder: 5
+ m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &432509337
GameObject:
@@ -713,7 +713,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 19
+ m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &438615021
GameObject:
@@ -844,7 +844,7 @@ RectTransform:
- {fileID: 770059767}
- {fileID: 1774693142}
m_Father: {fileID: 0}
- m_RootOrder: 18
+ m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -906,64 +906,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
bufferName: uniform_buffer
uniform: {fileID: 11400000, guid: 43a114cac50c03e4ea881a51dbb6e7bd, type: 2}
---- !u!1 &499091830
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 499091833}
- - component: {fileID: 499091832}
- - component: {fileID: 499091831}
- m_Layer: 5
- m_Name: Post-process Volume
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 0
---- !u!114 &499091831
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 499091830}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- sharedProfile: {fileID: 11400000, guid: 79182fbaf32faca4ca265d09dbd05840, type: 2}
- isGlobal: 0
- blendDistance: 0
- weight: 1
- priority: 0
---- !u!65 &499091832
-BoxCollider:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 499091830}
- m_Material: {fileID: 0}
- m_IsTrigger: 1
- m_Enabled: 1
- serializedVersion: 2
- m_Size: {x: 1, y: 1, z: 1}
- m_Center: {x: 0, y: 0, z: 0}
---- !u!4 &499091833
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 499091830}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: -1.5566128}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &528715328
GameObject:
m_ObjectHideFlags: 0
@@ -1288,65 +1230,7 @@ Transform:
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 8
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &618046638
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 618046641}
- - component: {fileID: 618046640}
- - component: {fileID: 618046639}
- m_Layer: 5
- m_Name: Post-process Volume
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 0
---- !u!114 &618046639
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 618046638}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- sharedProfile: {fileID: 11400000, guid: 79182fbaf32faca4ca265d09dbd05840, type: 2}
- isGlobal: 1
- blendDistance: 0
- weight: 1
- priority: 0
---- !u!65 &618046640
-BoxCollider:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 618046638}
- m_Material: {fileID: 0}
- m_IsTrigger: 1
- m_Enabled: 1
- serializedVersion: 2
- m_Size: {x: 1, y: 1, z: 1}
- m_Center: {x: 0, y: 0, z: 0}
---- !u!4 &618046641
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 618046638}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: -1.5566128}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 16
+ m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &658720283
GameObject:
@@ -1374,7 +1258,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 12
+ m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &732632614
GameObject:
@@ -1407,7 +1291,7 @@ Transform:
- {fileID: 1035960134}
- {fileID: 441718964}
m_Father: {fileID: 0}
- m_RootOrder: 11
+ m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &764073633
GameObject:
@@ -1435,7 +1319,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 15
+ m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &770059766
GameObject:
@@ -2169,7 +2053,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 2
+ m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &1196719910
GameObject:
@@ -2328,57 +2212,12 @@ MonoBehaviour:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1283180266}
- m_Enabled: 0
+ m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3}
+ m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3}
m_Name:
m_EditorClassIdentifier:
- volumeTrigger: {fileID: 1283180270}
- volumeLayer:
- serializedVersion: 2
- m_Bits: 32
- stopNaNPropagation: 1
- antialiasingMode: 2
- temporalAntialiasing:
- jitterSpread: 0.75
- sharpness: 0.25
- stationaryBlending: 0.95
- motionBlending: 0.85
- subpixelMorphologicalAntialiasing:
- quality: 0
- fastApproximateAntialiasing:
- fastMode: 0
- keepAlpha: 0
- fog:
- enabled: 1
- excludeSkybox: 1
- debugLayer:
- lightMeter:
- width: 512
- height: 256
- showCurves: 1
- histogram:
- width: 512
- height: 256
- channel: 3
- waveform:
- exposure: 0.12
- height: 256
- vectorscope:
- size: 256
- exposure: 0.12
- overlaySettings:
- motionColorIntensity: 4
- motionGridSize: 64
- colorBlindnessType: 0
- colorBlindnessStrength: 1
- m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2}
- m_ShowToolkit: 1
- m_ShowCustomSorter: 1
- breakBeforeColorGrading: 0
- m_BeforeTransparentBundles: []
- m_BeforeStackBundles: []
- m_AfterStackBundles: []
+ profile: {fileID: 11400000, guid: ff44c5fab81a8cc4daf9eff6f4695c47, type: 2}
--- !u!4 &1283180270
Transform:
m_ObjectHideFlags: 0
@@ -2390,7 +2229,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 17
+ m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1283180271
MonoBehaviour:
@@ -2431,7 +2270,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 6
+ m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1390635889
MonoBehaviour:
@@ -2566,7 +2405,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 13
+ m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &1579390332
GameObject:
@@ -2712,7 +2551,7 @@ RectTransform:
- {fileID: 957254313}
- {fileID: 2084135710}
m_Father: {fileID: 0}
- m_RootOrder: 20
+ m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -3077,5 +2916,5 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 4
+ m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
diff --git a/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset b/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset
index f7bec5a..28e1523 100644
--- a/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset
+++ b/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset
@@ -8,303 +8,313 @@ MonoBehaviour:
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3}
+ m_Script: {fileID: 11500000, guid: 8a3bdb2cd68f901469e7cc149151eb49, type: 3}
m_Name: PostProcessingProfile
m_EditorClassIdentifier:
- settings:
- - {fileID: 114067151945234240}
- - {fileID: 114157877957889540}
---- !u!114 &114067151945234240
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 48a79b01ea5641d4aa6daa2e23605641, type: 3}
- m_Name: Bloom
- m_EditorClassIdentifier:
- active: 1
- enabled:
- overrideState: 1
- value: 1
- intensity:
- overrideState: 1
- value: 20
- threshold:
- overrideState: 1
- value: 1.1
- softKnee:
- overrideState: 0
- value: 0.5
- diffusion:
- overrideState: 0
- value: 7
- anamorphicRatio:
- overrideState: 0
- value: 0
- color:
- overrideState: 0
- value: {r: 1, g: 1, b: 1, a: 1}
- fastMode:
- overrideState: 0
- value: 0
- dirtTexture:
- overrideState: 0
- value: {fileID: 2800000, guid: 3884f7a2d04ffe8409ad9200b275896f, type: 3}
- dirtIntensity:
- overrideState: 0
- value: 1
---- !u!114 &114157877957889540
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: adb84e30e02715445aeb9959894e3b4d, type: 3}
- m_Name: ColorGrading
- m_EditorClassIdentifier:
- active: 1
- enabled:
- overrideState: 1
- value: 1
- gradingMode:
- overrideState: 1
- value: 1
- externalLut:
- overrideState: 0
- value: {fileID: 0}
- tonemapper:
- overrideState: 1
- value: 2
- toneCurveToeStrength:
- overrideState: 0
- value: 0
- toneCurveToeLength:
- overrideState: 0
- value: 0.5
- toneCurveShoulderStrength:
- overrideState: 0
- value: 0
- toneCurveShoulderLength:
- overrideState: 0
- value: 0.5
- toneCurveShoulderAngle:
- overrideState: 0
- value: 0
- toneCurveGamma:
- overrideState: 0
- value: 1
- logLut:
- overrideState: 0
- value: {fileID: 0}
- ldrLut:
- overrideState: 0
- value: {fileID: 0}
- temperature:
- overrideState: 0
- value: 0
- tint:
- overrideState: 0
- value: 0
- colorFilter:
- overrideState: 0
- value: {r: 1, g: 1, b: 1, a: 1}
- hueShift:
- overrideState: 0
- value: 0
- saturation:
- overrideState: 0
- value: 0
- brightness:
- overrideState: 0
- value: 0
- postExposure:
- overrideState: 0
- value: 0
- contrast:
- overrideState: 0
- value: 17
- mixerRedOutRedIn:
- overrideState: 0
- value: 100
- mixerRedOutGreenIn:
- overrideState: 0
- value: 0
- mixerRedOutBlueIn:
- overrideState: 0
- value: 0
- mixerGreenOutRedIn:
- overrideState: 0
- value: 0
- mixerGreenOutGreenIn:
- overrideState: 0
- value: 100
- mixerGreenOutBlueIn:
- overrideState: 0
- value: 0
- mixerBlueOutRedIn:
- overrideState: 0
- value: 0
- mixerBlueOutGreenIn:
- overrideState: 0
- value: 0
- mixerBlueOutBlueIn:
- overrideState: 0
- value: 100
- lift:
- overrideState: 0
- value: {x: 1, y: 1, z: 1, w: 0}
- gamma:
- overrideState: 0
- value: {x: 1, y: 1, z: 1, w: 0}
- gain:
- overrideState: 0
- value: {x: 1, y: 1, z: 1, w: 0}
- masterCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 2
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- - serializedVersion: 2
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- redCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 2
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- - serializedVersion: 2
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- greenCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 2
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- - serializedVersion: 2
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- blueCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 2
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- - serializedVersion: 2
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- hueVsHueCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 0
- m_Loop: 1
- m_ZeroValue: 0.5
- m_Range: 1
- hueVsSatCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 1
- m_ZeroValue: 0.5
- m_Range: 1
- satVsSatCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0.5
- m_Range: 1
- lumVsSatCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0.5
- m_Range: 1
+ debugViews:
+ m_Enabled: 1
+ m_Settings:
+ mode: 0
+ depth:
+ scale: 1
+ motionVectors:
+ sourceOpacity: 1
+ motionImageOpacity: 0
+ motionImageAmplitude: 16
+ motionVectorsOpacity: 1
+ motionVectorsResolution: 24
+ motionVectorsAmplitude: 64
+ fog:
+ m_Enabled: 0
+ m_Settings:
+ excludeSkybox: 1
+ antialiasing:
+ m_Enabled: 0
+ m_Settings:
+ method: 1
+ fxaaSettings:
+ preset: 2
+ taaSettings:
+ jitterSpread: 0.75
+ sharpen: 0.3
+ stationaryBlending: 0.95
+ motionBlending: 0.85
+ ambientOcclusion:
+ m_Enabled: 0
+ m_Settings:
+ intensity: 1
+ radius: 0.3
+ sampleCount: 10
+ downsampling: 1
+ forceForwardCompatibility: 0
+ ambientOnly: 0
+ highPrecision: 0
+ screenSpaceReflection:
+ m_Enabled: 0
+ m_Settings:
+ reflection:
+ blendType: 0
+ reflectionQuality: 2
+ maxDistance: 100
+ iterationCount: 256
+ stepSize: 3
+ widthModifier: 0.5
+ reflectionBlur: 1
+ reflectBackfaces: 0
+ intensity:
+ reflectionMultiplier: 1
+ fadeDistance: 100
+ fresnelFade: 1
+ fresnelFadePower: 1
+ screenEdgeMask:
+ intensity: 0.03
+ depthOfField:
+ m_Enabled: 0
+ m_Settings:
+ focusDistance: 10
+ aperture: 5.6
+ focalLength: 50
+ useCameraFov: 0
+ kernelSize: 1
+ motionBlur:
+ m_Enabled: 0
+ m_Settings:
+ shutterAngle: 270
+ sampleCount: 10
+ frameBlending: 0
+ eyeAdaptation:
+ m_Enabled: 0
+ m_Settings:
+ lowPercent: 45
+ highPercent: 95
+ minLuminance: -5
+ maxLuminance: 1
+ keyValue: 0.25
+ dynamicKeyValue: 1
+ adaptationType: 0
+ speedUp: 2
+ speedDown: 1
+ logMin: -8
+ logMax: 4
+ bloom:
+ m_Enabled: 1
+ m_Settings:
+ bloom:
+ intensity: 2.17
+ threshold: 1
+ softKnee: 0.5
+ radius: 4
+ antiFlicker: 0
+ lensDirt:
+ texture: {fileID: 0}
+ intensity: 3
+ colorGrading:
+ m_Enabled: 1
+ m_Settings:
+ tonemapping:
+ tonemapper: 1
+ neutralBlackIn: 0.02
+ neutralWhiteIn: 10
+ neutralBlackOut: 0
+ neutralWhiteOut: 10
+ neutralWhiteLevel: 5.3
+ neutralWhiteClip: 10
+ basic:
+ postExposure: 0
+ temperature: 0
+ tint: 0
+ hueShift: 0
+ saturation: 1
+ contrast: 1
+ channelMixer:
+ red: {x: 1, y: 0, z: 0}
+ green: {x: 0, y: 1, z: 0}
+ blue: {x: 0, y: 0, z: 1}
+ currentEditingChannel: 0
+ colorWheels:
+ mode: 1
+ log:
+ slope: {r: 1, g: 1, b: 1, a: 0}
+ power: {r: 1, g: 1, b: 1, a: 0}
+ offset: {r: 1, g: 1, b: 1, a: 0}
+ linear:
+ lift: {r: 0, g: 0, b: 0, a: 0}
+ gamma: {r: 0, g: 0, b: 0, a: 0}
+ gain: {r: 0, g: 0, b: 0, a: 0}
+ curves:
+ master:
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 2
+ time: 0
+ value: 0
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ - serializedVersion: 2
+ time: 1
+ value: 1
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 0
+ m_Loop: 0
+ m_ZeroValue: 0
+ m_Range: 1
+ red:
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 2
+ time: 0
+ value: 0
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ - serializedVersion: 2
+ time: 1
+ value: 1
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ m_Loop: 0
+ m_ZeroValue: 0
+ m_Range: 1
+ green:
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 2
+ time: 0
+ value: 0
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ - serializedVersion: 2
+ time: 1
+ value: 1
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ m_Loop: 0
+ m_ZeroValue: 0
+ m_Range: 1
+ blue:
+ curve:
+ serializedVersion: 2
+ m_Curve:
+ - serializedVersion: 2
+ time: 0
+ value: 0
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ - serializedVersion: 2
+ time: 1
+ value: 1
+ inSlope: 1
+ outSlope: 1
+ tangentMode: 0
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ m_Loop: 0
+ m_ZeroValue: 0
+ m_Range: 1
+ hueVShue:
+ curve:
+ serializedVersion: 2
+ m_Curve: []
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ m_Loop: 1
+ m_ZeroValue: 0.5
+ m_Range: 1
+ hueVSsat:
+ curve:
+ serializedVersion: 2
+ m_Curve: []
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ m_Loop: 1
+ m_ZeroValue: 0.5
+ m_Range: 1
+ satVSsat:
+ curve:
+ serializedVersion: 2
+ m_Curve: []
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ m_Loop: 0
+ m_ZeroValue: 0.5
+ m_Range: 1
+ lumVSsat:
+ curve:
+ serializedVersion: 2
+ m_Curve: []
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 4
+ m_Loop: 0
+ m_ZeroValue: 0.5
+ m_Range: 1
+ e_CurrentEditingCurve: 0
+ e_CurveY: 1
+ e_CurveR: 0
+ e_CurveG: 0
+ e_CurveB: 0
+ userLut:
+ m_Enabled: 0
+ m_Settings:
+ lut: {fileID: 0}
+ contribution: 1
+ chromaticAberration:
+ m_Enabled: 0
+ m_Settings:
+ spectralTexture: {fileID: 0}
+ intensity: 0.1
+ grain:
+ m_Enabled: 0
+ m_Settings:
+ colored: 1
+ intensity: 0.5
+ size: 1
+ luminanceContribution: 0.8
+ vignette:
+ m_Enabled: 0
+ m_Settings:
+ mode: 0
+ color: {r: 0, g: 0, b: 0, a: 1}
+ center: {x: 0.5, y: 0.5}
+ intensity: 0.45
+ smoothness: 0.2
+ roundness: 1
+ mask: {fileID: 0}
+ opacity: 1
+ rounded: 0
+ dithering:
+ m_Enabled: 0
+ monitors:
+ currentMonitorID: 0
+ refreshOnPlay: 0
+ histogramMode: 3
+ waveformExposure: 0.12
+ waveformY: 0
+ waveformR: 1
+ waveformG: 1
+ waveformB: 1
+ paradeExposure: 0.12
+ vectorscopeExposure: 0.12
+ vectorscopeShowBackground: 1
diff --git a/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset.meta b/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset.meta
index 59f49c7..e0d373f 100644
--- a/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset.meta
+++ b/Unity_2018_Frozen/Assets/Frozen/PostProcessingProfile.asset.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 79182fbaf32faca4ca265d09dbd05840
-timeCreated: 1519744123
+guid: ff44c5fab81a8cc4daf9eff6f4695c47
+timeCreated: 1523612465
licenseType: Free
NativeFormatImporter:
externalObjects: {}
diff --git a/Unity_2018_Frozen/Assets/Frozen/Shader/SpaceMapping.shader b/Unity_2018_Frozen/Assets/Frozen/Shader/SpaceMapping.shader
index 081efa3..43a4395 100644
--- a/Unity_2018_Frozen/Assets/Frozen/Shader/SpaceMapping.shader
+++ b/Unity_2018_Frozen/Assets/Frozen/Shader/SpaceMapping.shader
@@ -73,9 +73,6 @@
float4 homo_pos = mul(homography[0], float4(pos, 0, 1));
pos = homo_pos.xy / homo_pos.w;
}
-
-
- //if (pos.x < space.z || pos.x > space.z + space.x) pos = float2(0, 0);
}
else if (pos.x <= space.z)
{
diff --git a/Unity_2018_Frozen/Assets/ParticleWorks/PostProcessingProfile.asset b/Unity_2018_Frozen/Assets/ParticleWorks/PostProcessingProfile.asset
deleted file mode 100644
index 7f0802e..0000000
--- a/Unity_2018_Frozen/Assets/ParticleWorks/PostProcessingProfile.asset
+++ /dev/null
@@ -1,515 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3}
- m_Name: PostProcessingProfile
- m_EditorClassIdentifier:
- settings:
- - {fileID: 114833496269074576}
- - {fileID: 114319687773204480}
- - {fileID: 114757437605629214}
- - {fileID: 114751192064109246}
- - {fileID: 114455859145519820}
- - {fileID: 114238086573610688}
---- !u!114 &114238086573610688
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: c1cb7e9e120078f43bce4f0b1be547a7, type: 3}
- m_Name: AmbientOcclusion
- m_EditorClassIdentifier:
- active: 1
- enabled:
- overrideState: 1
- value: 1
- mode:
- overrideState: 0
- value: 1
- intensity:
- overrideState: 1
- value: 1
- color:
- overrideState: 0
- value: {r: 0, g: 0, b: 0, a: 1}
- ambientOnly:
- overrideState: 0
- value: 1
- noiseFilterTolerance:
- overrideState: 0
- value: 0
- blurTolerance:
- overrideState: 0
- value: -4.6
- upsampleTolerance:
- overrideState: 0
- value: -12
- thicknessModifier:
- overrideState: 0
- value: 1
- directLightingStrength:
- overrideState: 0
- value: 0
- radius:
- overrideState: 0
- value: 0.25
- quality:
- overrideState: 0
- value: 2
---- !u!114 &114319687773204480
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 6050e2d5de785ce4d931e4dbdbf2d755, type: 3}
- m_Name: ChromaticAberration
- m_EditorClassIdentifier:
- active: 1
- enabled:
- overrideState: 1
- value: 1
- spectralLut:
- overrideState: 1
- value: {fileID: 2800000, guid: 318cbcd94840f1d48aca4d86234dc2e7, type: 3}
- intensity:
- overrideState: 1
- value: 0.157
- fastMode:
- overrideState: 0
- value: 0
---- !u!114 &114455859145519820
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {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: 0
- value: 0
- color:
- overrideState: 0
- value: {r: 0, g: 0, b: 0, a: 1}
- center:
- overrideState: 0
- value: {x: 0.5, y: 0.5}
- intensity:
- overrideState: 1
- value: 0.226
- smoothness:
- overrideState: 0
- value: 0.2
- roundness:
- overrideState: 0
- value: 1
- rounded:
- overrideState: 0
- value: 0
- mask:
- overrideState: 0
- value: {fileID: 0}
- opacity:
- overrideState: 0
- value: 1
---- !u!114 &114691993215349014
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {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: 1
- enabled:
- overrideState: 1
- value: 1
- filtering:
- overrideState: 0
- value: {x: 50, y: 95}
- minLuminance:
- overrideState: 0
- value: 0
- maxLuminance:
- overrideState: 0
- value: 0
- keyValue:
- overrideState: 0
- value: 1
- eyeAdaptation:
- overrideState: 0
- value: 0
- speedUp:
- overrideState: 0
- value: 2
- speedDown:
- overrideState: 0
- value: 1
---- !u!114 &114751192064109246
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {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: 20
- aperture:
- overrideState: 0
- value: 5.6
- focalLength:
- overrideState: 0
- value: 50
- kernelSize:
- overrideState: 0
- value: 1
---- !u!114 &114757437605629214
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: adb84e30e02715445aeb9959894e3b4d, type: 3}
- m_Name: ColorGrading
- m_EditorClassIdentifier:
- active: 1
- enabled:
- overrideState: 1
- value: 1
- gradingMode:
- overrideState: 1
- value: 1
- externalLut:
- overrideState: 0
- value: {fileID: 0}
- tonemapper:
- overrideState: 1
- value: 2
- toneCurveToeStrength:
- overrideState: 0
- value: 0
- toneCurveToeLength:
- overrideState: 0
- value: 0.5
- toneCurveShoulderStrength:
- overrideState: 0
- value: 0
- toneCurveShoulderLength:
- overrideState: 0
- value: 0.5
- toneCurveShoulderAngle:
- overrideState: 0
- value: 0
- toneCurveGamma:
- overrideState: 0
- value: 1
- logLut:
- overrideState: 0
- value: {fileID: 0}
- ldrLut:
- overrideState: 0
- value: {fileID: 0}
- temperature:
- overrideState: 0
- value: 0
- tint:
- overrideState: 0
- value: 0
- colorFilter:
- overrideState: 0
- value: {r: 1, g: 1, b: 1, a: 1}
- hueShift:
- overrideState: 0
- value: 0
- saturation:
- overrideState: 0
- value: 0
- brightness:
- overrideState: 0
- value: 0
- postExposure:
- overrideState: 1
- value: 1
- contrast:
- overrideState: 0
- value: 0
- mixerRedOutRedIn:
- overrideState: 0
- value: 100
- mixerRedOutGreenIn:
- overrideState: 0
- value: 0
- mixerRedOutBlueIn:
- overrideState: 0
- value: 0
- mixerGreenOutRedIn:
- overrideState: 0
- value: 0
- mixerGreenOutGreenIn:
- overrideState: 0
- value: 100
- mixerGreenOutBlueIn:
- overrideState: 0
- value: 0
- mixerBlueOutRedIn:
- overrideState: 0
- value: 0
- mixerBlueOutGreenIn:
- overrideState: 0
- value: 0
- mixerBlueOutBlueIn:
- overrideState: 0
- value: 100
- lift:
- overrideState: 0
- value: {x: 1, y: 1, z: 1, w: 0}
- gamma:
- overrideState: 0
- value: {x: 1, y: 1, z: 1, w: 0}
- gain:
- overrideState: 0
- value: {x: 1, y: 1, z: 1, w: 0}
- masterCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 3
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- redCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 3
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- greenCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 3
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- blueCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve:
- - serializedVersion: 3
- time: 0
- value: 0
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- - serializedVersion: 3
- time: 1
- value: 1
- inSlope: 1
- outSlope: 1
- tangentMode: 0
- weightedMode: 0
- inWeight: 0.33333334
- outWeight: 0.33333334
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0
- m_Range: 1
- hueVsHueCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 0
- m_Loop: 1
- m_ZeroValue: 0.5
- m_Range: 1
- hueVsSatCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 1
- m_ZeroValue: 0.5
- m_Range: 1
- satVsSatCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0.5
- m_Range: 1
- lumVsSatCurve:
- overrideState: 0
- value:
- curve:
- serializedVersion: 2
- m_Curve: []
- m_PreInfinity: 2
- m_PostInfinity: 2
- m_RotationOrder: 4
- m_Loop: 0
- m_ZeroValue: 0.5
- m_Range: 1
---- !u!114 &114833496269074576
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 48a79b01ea5641d4aa6daa2e23605641, type: 3}
- m_Name: Bloom
- m_EditorClassIdentifier:
- active: 0
- enabled:
- overrideState: 1
- value: 1
- intensity:
- overrideState: 1
- value: 3
- threshold:
- overrideState: 0
- value: 1
- softKnee:
- overrideState: 0
- value: 0.5
- diffusion:
- overrideState: 0
- value: 7
- anamorphicRatio:
- overrideState: 0
- value: 0
- color:
- overrideState: 0
- value: {r: 1, g: 1, b: 1, a: 1}
- fastMode:
- overrideState: 0
- value: 0
- dirtTexture:
- overrideState: 1
- value: {fileID: 2800000, guid: a2960ffde020f27409e070d92fb2e00b, type: 3}
- dirtIntensity:
- overrideState: 1
- value: 4.08
diff --git a/Unity_2018_Frozen/Assets/ParticleWorks/PostProcessingProfile.asset.meta b/Unity_2018_Frozen/Assets/ParticleWorks/PostProcessingProfile.asset.meta
deleted file mode 100644
index d08c6f2..0000000
--- a/Unity_2018_Frozen/Assets/ParticleWorks/PostProcessingProfile.asset.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 13848f592641d12488d9f26f621f4aea
-timeCreated: 1513322306
-licenseType: Free
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/PostProcessStrippingConfig.asset b/Unity_2018_Frozen/Assets/PostProcessStrippingConfig.asset
deleted file mode 100644
index a5007b9..0000000
--- a/Unity_2018_Frozen/Assets/PostProcessStrippingConfig.asset
+++ /dev/null
@@ -1,16 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 2f29da58f3a63f649a512733d24af22c, type: 3}
- m_Name: PostProcessStrippingConfig
- m_EditorClassIdentifier:
- stripUnsupportedShaders: 1
- stripDebugShaders: 0
- stripComputeShaders: 0
diff --git a/Unity_2018_Frozen/Assets/PostProcessStrippingConfig.asset.meta b/Unity_2018_Frozen/Assets/PostProcessStrippingConfig.asset.meta
deleted file mode 100644
index d870210..0000000
--- a/Unity_2018_Frozen/Assets/PostProcessStrippingConfig.asset.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: fdb84457dc528a942964520afbd6bcf8
-timeCreated: 1519736043
-licenseType: Free
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources.meta
index c7143a1..7b3c594 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 1da84851b99c43746afb49e79ae2b1d6
+guid: 83715878d3a8db441aa5636641db69a3
folderAsset: yes
-timeCreated: 1492696579
+timeCreated: 1476176392
licenseType: Pro
DefaultImporter:
userData:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors.meta
index d288f89..fcf5702 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 0a243807ad889ae44bf63a9bcdc984af
+guid: e7358848dd8737c459f4636f1c075835
folderAsset: yes
-timeCreated: 1499676298
+timeCreated: 1460361782
licenseType: Pro
DefaultImporter:
userData:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramCompute.compute b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramCompute.compute
new file mode 100644
index 0000000..da7507b
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramCompute.compute
@@ -0,0 +1,91 @@
+#include "UnityCG.cginc"
+
+RWStructuredBuffer _Histogram;
+Texture2D _Source;
+
+CBUFFER_START (Params)
+ uint _IsLinear;
+ float4 _Res;
+ uint4 _Channels;
+CBUFFER_END
+
+groupshared uint4 gs_histogram[256];
+
+#define GROUP_SIZE 16
+
+#pragma kernel KHistogramGather
+[numthreads(GROUP_SIZE, GROUP_SIZE,1)]
+void KHistogramGather(uint2 dispatchThreadId : SV_DispatchThreadID, uint2 groupThreadId : SV_GroupThreadID)
+{
+ const uint localThreadId = groupThreadId.y * GROUP_SIZE + groupThreadId.x;
+
+ if (localThreadId < 256)
+ gs_histogram[localThreadId] = uint4(0, 0, 0, 0);
+
+ GroupMemoryBarrierWithGroupSync();
+
+ if (dispatchThreadId.x < (uint)_Res.x && dispatchThreadId.y < (uint)_Res.y)
+ {
+ // We want a gamma histogram (like Photoshop & all)
+ float3 color = saturate(_Source[dispatchThreadId].xyz);
+ if (_IsLinear > 0)
+ color = LinearToGammaSpace(color);
+
+ // Convert color & luminance to histogram bin
+ uint3 idx_c = (uint3)(round(color * 255.0));
+ uint idx_l = (uint)(round(dot(color.rgb, float3(0.2125, 0.7154, 0.0721)) * 255.0));
+
+ // Fill the group shared histogram
+ if (_Channels.x > 0u) InterlockedAdd(gs_histogram[idx_c.x].x, 1); // Red
+ if (_Channels.y > 0u) InterlockedAdd(gs_histogram[idx_c.y].y, 1); // Green
+ if (_Channels.z > 0u) InterlockedAdd(gs_histogram[idx_c.z].z, 1); // Blue
+ if (_Channels.w > 0u) InterlockedAdd(gs_histogram[idx_l].w, 1); // Luminance
+ }
+
+ GroupMemoryBarrierWithGroupSync();
+
+ // Merge
+ if (localThreadId < 256)
+ {
+ uint4 h = gs_histogram[localThreadId];
+ if (_Channels.x > 0u && h.x > 0) InterlockedAdd(_Histogram[localThreadId].x, h.x); // Red
+ if (_Channels.y > 0u && h.y > 0) InterlockedAdd(_Histogram[localThreadId].y, h.y); // Green
+ if (_Channels.z > 0u && h.z > 0) InterlockedAdd(_Histogram[localThreadId].z, h.z); // Blue
+ if (_Channels.w > 0u && h.w > 0) InterlockedAdd(_Histogram[localThreadId].w, h.w); // Luminance
+ }
+}
+
+// Scaling pass
+groupshared uint4 gs_pyramid[256];
+
+#pragma kernel KHistogramScale
+[numthreads(16,16,1)]
+void KHistogramScale(uint2 groupThreadId : SV_GroupThreadID)
+{
+ const uint localThreadId = groupThreadId.y * 16 + groupThreadId.x;
+ gs_pyramid[localThreadId] = _Histogram[localThreadId];
+
+ GroupMemoryBarrierWithGroupSync();
+
+ // Parallel reduction to find the max value
+ UNITY_UNROLL
+ for(uint i = 256 >> 1; i > 0; i >>= 1)
+ {
+ if(localThreadId < i)
+ gs_pyramid[localThreadId] = max(gs_pyramid[localThreadId], gs_pyramid[localThreadId + i]);
+
+ GroupMemoryBarrierWithGroupSync();
+ }
+
+ // Actual scaling
+ float4 factor = _Res.y / (float4)gs_pyramid[0];
+ _Histogram[localThreadId] = (uint4)round(_Histogram[localThreadId] * factor);
+}
+
+#pragma kernel KHistogramClear
+[numthreads(GROUP_SIZE, GROUP_SIZE, 1)]
+void KHistogramClear(uint2 dispatchThreadId : SV_DispatchThreadID)
+{
+ if (dispatchThreadId.x < (uint)_Res.x && dispatchThreadId.y < (uint)_Res.y)
+ _Histogram[dispatchThreadId.y * _Res.x + dispatchThreadId.x] = uint4(0u, 0u, 0u, 0u);
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Builtins/ExposureHistogram.compute.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramCompute.compute.meta
similarity index 68%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Builtins/ExposureHistogram.compute.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramCompute.compute.meta
index 8f7eefe..7c40539 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Builtins/ExposureHistogram.compute.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramCompute.compute.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 8c2fcbdf9bc58664f89917f7b9d79501
-timeCreated: 1488985723
+guid: 51b7e4b4448c98f4a849081110fd6212
+timeCreated: 1459956391
licenseType: Pro
ComputeShaderImporter:
currentAPIMask: 4
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramRender.shader b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramRender.shader
new file mode 100644
index 0000000..c69cf75
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramRender.shader
@@ -0,0 +1,141 @@
+Shader "Hidden/Post FX/Monitors/Histogram Render"
+{
+ SubShader
+ {
+ ZTest Always Cull Off ZWrite Off
+ Fog { Mode off }
+
+ CGINCLUDE
+
+ #pragma fragmentoption ARB_precision_hint_fastest
+ #pragma target 5.0
+ #include "UnityCG.cginc"
+
+ StructuredBuffer _Histogram;
+ float2 _Size;
+ uint _Channel;
+ float4 _ColorR;
+ float4 _ColorG;
+ float4 _ColorB;
+ float4 _ColorL;
+
+ float4 FragSingleChannel(v2f_img i) : SV_Target
+ {
+ const float4 COLORS[4] = { _ColorR, _ColorG, _ColorB, _ColorL };
+
+ float remapI = i.uv.x * 255.0;
+ uint index = floor(remapI);
+ float delta = frac(remapI);
+ float v1 = _Histogram[index][_Channel];
+ float v2 = _Histogram[min(index + 1, 255)][_Channel];
+ float h = v1 * (1.0 - delta) + v2 * delta;
+ uint y = (uint)round(i.uv.y * _Size.y);
+
+ float4 color = float4(0.1, 0.1, 0.1, 1.0);
+ float fill = step(y, h);
+ color = lerp(color, COLORS[_Channel], fill);
+ return color;
+ }
+
+ float4 FragRgbMerged(v2f_img i) : SV_Target
+ {
+ const float4 COLORS[3] = { _ColorR, _ColorG, _ColorB };
+
+ float4 targetColor = float4(0.1, 0.1, 0.1, 1.0);
+ float4 emptyColor = float4(0.0, 0.0, 0.0, 1.0);
+
+ float remapI = i.uv.x * 255.0;
+ uint index = floor(remapI);
+ float delta = frac(remapI);
+
+ for (int j = 0; j < 3; j++)
+ {
+ float v1 = _Histogram[index][j];
+ float v2 = _Histogram[min(index + 1, 255)][j];
+ float h = v1 * (1.0 - delta) + v2 * delta;
+ uint y = (uint)round(i.uv.y * _Size.y);
+ float fill = step(y, h);
+ float4 color = lerp(emptyColor, COLORS[j], fill);
+ targetColor += color;
+ }
+
+ return saturate(targetColor);
+ }
+
+ float4 FragRgbSplitted(v2f_img i) : SV_Target
+ {
+ const float4 COLORS[3] = {_ColorR, _ColorG, _ColorB};
+
+ const float limitB = round(_Size.y / 3.0);
+ const float limitG = limitB * 2;
+
+ float4 color = float4(0.1, 0.1, 0.1, 1.0);
+ uint channel;
+ float offset;
+
+ if (i.pos.y < limitB)
+ {
+ channel = 2;
+ offset = 0.0;
+ }
+ else if (i.pos.y < limitG)
+ {
+ channel = 1;
+ offset = limitB;
+ }
+ else
+ {
+ channel = 0;
+ offset = limitG;
+ }
+
+ float remapI = i.uv.x * 255.0;
+ uint index = floor(remapI);
+ float delta = frac(remapI);
+ float v1 = offset + _Histogram[index][channel] / 3.0;
+ float v2 = offset + _Histogram[min(index + 1, 255)][channel] / 3.0;
+ float h = v1 * (1.0 - delta) + v2 * delta;
+ uint y = (uint)round(i.uv.y * _Size.y);
+
+ float fill = step(y, h);
+ color = lerp(color, COLORS[channel], fill);
+ return color;
+ }
+
+ ENDCG
+
+ // (0) Channel
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert_img
+ #pragma fragment FragSingleChannel
+
+ ENDCG
+ }
+
+ // (1) RGB merged
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert_img
+ #pragma fragment FragRgbMerged
+
+ ENDCG
+ }
+
+ // (2) RGB splitted
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert_img
+ #pragma fragment FragRgbSplitted
+
+ ENDCG
+ }
+ }
+ FallBack off
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/ACES.hlsl.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramRender.shader.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/ACES.hlsl.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramRender.shader.meta
index 2a351eb..93b35f3 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/ACES.hlsl.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/HistogramRender.shader.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: d7de89b714449b04391f3a2fb53a9022
-timeCreated: 1493731593
+guid: 965efa32cf2345647a1c987546e08f86
+timeCreated: 1459956391
licenseType: Pro
ShaderImporter:
defaultTextures: []
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/ParadeRender.shader b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/ParadeRender.shader
new file mode 100644
index 0000000..3ff1ca6
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/ParadeRender.shader
@@ -0,0 +1,76 @@
+Shader "Hidden/Post FX/Monitors/Parade Render"
+{
+ SubShader
+ {
+ ZTest Always Cull Off ZWrite Off
+ Fog { Mode off }
+
+ CGINCLUDE
+
+ #pragma fragmentoption ARB_precision_hint_fastest
+ #pragma target 5.0
+ #include "UnityCG.cginc"
+
+ StructuredBuffer _Waveform;
+ float4 _Size;
+ float _Exposure;
+
+ float3 Tonemap(float3 x, float exposure)
+ {
+ const float a = 6.2;
+ const float b = 0.5;
+ const float c = 1.7;
+ const float d = 0.06;
+ x *= exposure;
+ x = max((0.0).xxx, x - (0.004).xxx);
+ x = (x * (a * x + b)) / (x * (a * x + c) + d);
+ return x * x;
+ }
+
+ float4 FragParade(v2f_img i) : SV_Target
+ {
+ const float3 red = float3(1.8, 0.03, 0.02);
+ const float3 green = float3(0.02, 1.3, 0.05);
+ const float3 blue = float3(0.0, 0.45, 1.75);
+ float3 color = float3(0.0, 0.0, 0.0);
+
+ const uint limitR = _Size.x / 3;
+ const uint limitG = limitR * 2;
+
+ if (i.pos.x < (float)limitR)
+ {
+ uint2 uvI = i.pos.xy;
+ color = _Waveform[uvI.y + uvI.x * _Size.y].r * red;
+ }
+ else if (i.pos.x < (float)limitG)
+ {
+ uint2 uvI = uint2(i.pos.x - limitR, i.pos.y);
+ color = _Waveform[uvI.y + uvI.x * _Size.y].g * green;
+ }
+ else
+ {
+ uint2 uvI = uint2(i.pos.x - limitG, i.pos.y);
+ color = _Waveform[uvI.y + uvI.x * _Size.y].b * blue;
+ }
+
+ color = Tonemap(color, _Exposure);
+ color += (0.1).xxx;
+
+ return float4(saturate(color), 1.0);
+ }
+
+ ENDCG
+
+ // (0)
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert_img
+ #pragma fragment FragParade
+
+ ENDCG
+ }
+ }
+ FallBack off
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D11.hlsl.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/ParadeRender.shader.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D11.hlsl.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/ParadeRender.shader.meta
index f4b2c38..a9e8fea 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D11.hlsl.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/ParadeRender.shader.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: d4e61b1eb5c3ac248add7bb738198560
-timeCreated: 1489753963
+guid: 5ae1bfc1dd20ac04e8b74aa0f2f12eea
+timeCreated: 1459956391
licenseType: Pro
ShaderImporter:
defaultTextures: []
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeCompute.compute b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeCompute.compute
new file mode 100644
index 0000000..c5c61d0
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeCompute.compute
@@ -0,0 +1,49 @@
+#include "UnityCG.cginc"
+
+RWStructuredBuffer _Vectorscope;
+Texture2D _Source;
+
+CBUFFER_START (Params)
+ uint _IsLinear;
+ float4 _Res;
+CBUFFER_END
+
+#define GROUP_SIZE 32
+
+float3 RgbToYUV(float3 c)
+{
+ float Y = 0.299 * c.r + 0.587 * c.g + 0.114 * c.b;
+ float U = -0.169 * c.r - 0.331 * c.g + 0.500 * c.b;
+ float V = 0.500 * c.r - 0.419 * c.g - 0.081 * c.b;
+ return float3(Y, U, V);
+}
+
+#pragma kernel KVectorscope
+[numthreads(GROUP_SIZE,GROUP_SIZE,1)]
+void KVectorscope(uint2 dispatchThreadId : SV_DispatchThreadID)
+{
+ if (dispatchThreadId.x < (uint)_Res.x && dispatchThreadId.y < (uint)_Res.y)
+ {
+ float3 color = saturate(_Source[dispatchThreadId].xyz);
+ if (_IsLinear > 0)
+ color = LinearToGammaSpace(color);
+
+ float3 yuv = RgbToYUV(color);
+
+ if (length(yuv.yz) > 0.49)
+ yuv.yz = normalize(yuv.yz) * 0.49;
+
+ yuv.yz += (0.5).xx;
+ uint u = (uint)floor(yuv.y * _Res.x);
+ uint v = (uint)floor(yuv.z * _Res.y);
+ InterlockedAdd(_Vectorscope[v * _Res.x + u], 1);
+ }
+}
+
+#pragma kernel KVectorscopeClear
+[numthreads(GROUP_SIZE,GROUP_SIZE,1)]
+void KVectorscopeClear(uint2 dispatchThreadId : SV_DispatchThreadID)
+{
+ if (dispatchThreadId.x < (uint)_Res.x && dispatchThreadId.y < (uint)_Res.y)
+ _Vectorscope[dispatchThreadId.y * _Res.x + dispatchThreadId.x] = 0u;
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Builtins/Texture3DLerp.compute.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeCompute.compute.meta
similarity index 68%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Builtins/Texture3DLerp.compute.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeCompute.compute.meta
index 5cfc24e..47187a4 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Builtins/Texture3DLerp.compute.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeCompute.compute.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 31e9175024adfd44aba2530ff9b77494
-timeCreated: 1496933873
+guid: 45de9ff58691e934c9810dc23de2ba50
+timeCreated: 1459956391
licenseType: Pro
ComputeShaderImporter:
currentAPIMask: 4
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeRender.shader b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeRender.shader
new file mode 100644
index 0000000..62a7a03
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeRender.shader
@@ -0,0 +1,101 @@
+Shader "Hidden/Post FX/Monitors/Vectorscope Render"
+{
+ SubShader
+ {
+ ZTest Always Cull Off ZWrite Off
+ Fog { Mode off }
+
+ CGINCLUDE
+
+ #pragma fragmentoption ARB_precision_hint_fastest
+ #pragma target 5.0
+ #include "UnityCG.cginc"
+
+ StructuredBuffer _Vectorscope;
+ float2 _Size;
+ float _Exposure;
+
+ float Tonemap(float x, float exposure)
+ {
+ const float a = 6.2;
+ const float b = 0.5;
+ const float c = 1.7;
+ const float d = 0.06;
+ x *= exposure;
+ x = max(0.0, x - 0.004);
+ x = (x * (a * x + b)) / (x * (a * x + c) + d);
+ return x * x;
+ }
+
+ float3 YuvToRgb(float3 c)
+ {
+ float R = c.x + 0.000 * c.y + 1.403 * c.z;
+ float G = c.x - 0.344 * c.y - 0.714 * c.z;
+ float B = c.x - 1.773 * c.y + 0.000 * c.z;
+ return float3(R, G, B);
+ }
+
+ float4 FragBackground(v2f_img i) : SV_Target
+ {
+ i.uv.x = 1.0 - i.uv.x;
+ float2 uv = i.uv - (0.5).xx;
+ float3 c = YuvToRgb(float3(0.5, uv.x, uv.y));
+
+ float dist = sqrt(dot(uv, uv));
+ float delta = fwidth(dist);
+ float alphaOut = 1.0 - smoothstep(0.5 - delta, 0.5 + delta, dist);
+ float alphaIn = smoothstep(0.495 - delta, 0.495 + delta, dist);
+
+ uint2 uvI = i.pos.xy;
+ uint v = _Vectorscope[uvI.x + uvI.y * _Size.x];
+ float vt = saturate(Tonemap(v, _Exposure));
+
+ float4 color = float4(lerp(c, (0.0).xxx, vt), alphaOut);
+ color.rgb += alphaIn;
+ return color;
+ }
+
+ float4 FragNoBackground(v2f_img i) : SV_Target
+ {
+ i.uv.x = 1.0 - i.uv.x;
+ float2 uv = i.uv - (0.5).xx;
+
+ float dist = sqrt(dot(uv, uv));
+ float delta = fwidth(dist);
+ float alphaOut = 1.0 - smoothstep(0.5 - delta, 0.5 + delta, dist);
+ float alphaIn = smoothstep(0.495 - delta, 0.495 + delta, dist);
+
+ uint2 uvI = i.pos.xy;
+ uint v = _Vectorscope[uvI.x + uvI.y * _Size.x];
+ float vt = saturate(Tonemap(v, _Exposure));
+
+ float4 color = float4((1.0).xxx, vt + alphaIn * alphaOut);
+ return color;
+ }
+
+ ENDCG
+
+ // (0)
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert_img
+ #pragma fragment FragBackground
+
+ ENDCG
+ }
+
+ // (1)
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert_img
+ #pragma fragment FragNoBackground
+
+ ENDCG
+ }
+ }
+ FallBack off
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D12.hlsl.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeRender.shader.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D12.hlsl.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeRender.shader.meta
index 8591a6d..7402232 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D12.hlsl.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/VectorscopeRender.shader.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: ed6416461734f3a4d97b2475252d5f6c
-timeCreated: 1489754075
+guid: 1c4298cd35ef7834e892898e49d61ecd
+timeCreated: 1461756159
licenseType: Pro
ShaderImporter:
defaultTextures: []
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformCompute.compute b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformCompute.compute
new file mode 100644
index 0000000..cc79b15
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformCompute.compute
@@ -0,0 +1,42 @@
+#include "UnityCG.cginc"
+
+RWStructuredBuffer _Waveform;
+Texture2D _Source;
+
+CBUFFER_START (Params)
+ uint _IsLinear;
+ uint4 _Channels;
+CBUFFER_END
+
+#define COLUMNS 384
+
+#pragma kernel KWaveform
+[numthreads(1,COLUMNS,1)]
+void KWaveform(uint2 dispatchThreadId : SV_DispatchThreadID)
+{
+ // We want a gamma corrected colors
+ float3 color = _Source[dispatchThreadId].rgb;
+ if (_IsLinear > 0u)
+ color = LinearToGammaSpace(color);
+
+ color = saturate(color);
+
+ // Convert color & luminance to histogram bins
+ const float kColumnsMinusOne = COLUMNS - 1.0;
+ uint3 idx_c = (uint3)(round(color * kColumnsMinusOne));
+ uint idx_l = (uint)(round(dot(color.rgb, float3(0.2126, 0.7152, 0.0722)) * kColumnsMinusOne));
+
+ // A lot of atomic operations will be skipped so there's no need to over-think this one.
+ uint j = dispatchThreadId.x * COLUMNS;
+ if (_Channels.x > 0u && idx_c.x > 0u) InterlockedAdd(_Waveform[j + idx_c.x].x, 1u); // Red
+ if (_Channels.y > 0u && idx_c.y > 0u) InterlockedAdd(_Waveform[j + idx_c.y].y, 1u); // Green
+ if (_Channels.z > 0u && idx_c.z > 0u) InterlockedAdd(_Waveform[j + idx_c.z].z, 1u); // Blue
+ if (_Channels.w > 0u) InterlockedAdd(_Waveform[j + idx_l].w, 1u); // Luminance
+}
+
+#pragma kernel KWaveformClear
+[numthreads(1, COLUMNS, 1)]
+void KWaveformClear(uint2 dispatchThreadId : SV_DispatchThreadID)
+{
+ _Waveform[dispatchThreadId.x * COLUMNS + dispatchThreadId.y] = uint4(0u, 0u, 0u, 0u);
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Debug/Histogram.compute.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformCompute.compute.meta
similarity index 57%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Debug/Histogram.compute.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformCompute.compute.meta
index df2ca20..ec5a6ff 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Debug/Histogram.compute.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformCompute.compute.meta
@@ -1,9 +1,9 @@
fileFormatVersion: 2
-guid: 18183ebfeeab97749b43e38b928604a7
-timeCreated: 1499679719
+guid: 9d9b886f7a8fe7b4baf56624c42e3420
+timeCreated: 1459956392
licenseType: Pro
ComputeShaderImporter:
- currentAPIMask: 8196
+ currentAPIMask: 4
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformRender.shader b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformRender.shader
new file mode 100644
index 0000000..39cffd7
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformRender.shader
@@ -0,0 +1,65 @@
+Shader "Hidden/Post FX/Monitors/Waveform Render"
+{
+ SubShader
+ {
+ ZTest Always Cull Off ZWrite Off
+ Fog { Mode off }
+
+ CGINCLUDE
+
+ #pragma fragmentoption ARB_precision_hint_fastest
+ #pragma target 5.0
+ #include "UnityCG.cginc"
+
+ StructuredBuffer _Waveform;
+ float2 _Size;
+ float4 _Channels;
+ float _Exposure;
+
+ float3 Tonemap(float3 x, float exposure)
+ {
+ const float a = 6.2;
+ const float b = 0.5;
+ const float c = 1.7;
+ const float d = 0.06;
+ x *= exposure;
+ x = max((0.0).xxx, x - (0.004).xxx);
+ x = (x * (a * x + b)) / (x * (a * x + c) + d);
+ return x * x;
+ }
+
+ float4 FragWaveform(v2f_img i) : SV_Target
+ {
+ const float3 red = float3(1.4, 0.03, 0.02);
+ const float3 green = float3(0.02, 1.1, 0.05);
+ const float3 blue = float3(0.0, 0.25, 1.5);
+ float3 color = float3(0.0, 0.0, 0.0);
+
+ uint2 uvI = i.pos.xy;
+ float4 w = _Waveform[uvI.y + uvI.x * _Size.y]; // Waveform data is stored in columns instead of rows
+
+ color += red * w.r * _Channels.r;
+ color += green * w.g * _Channels.g;
+ color += blue * w.b * _Channels.b;
+ color += w.aaa * _Channels.a * 1.5;
+ color = Tonemap(color, _Exposure);
+ color += (0.1).xxx;
+
+ return float4(saturate(color), 1.0);
+ }
+
+ ENDCG
+
+ // (0)
+ Pass
+ {
+ CGPROGRAM
+
+ #pragma vertex vert_img
+ #pragma fragment FragWaveform
+
+ ENDCG
+ }
+ }
+ FallBack off
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D9.hlsl.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformRender.shader.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D9.hlsl.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformRender.shader.meta
index bb4b211..ec1bf1b 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/API/D3D9.hlsl.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/Monitors/WaveformRender.shader.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: a741cbbb27e6ad747a354440a9132a66
-timeCreated: 1489754265
+guid: 8b3e43c50424ab2428a9c172843bc66d
+timeCreated: 1459956391
licenseType: Pro
ShaderImporter:
defaultTextures: []
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI.meta
index 813d5f4..bf78c40 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: e58158d9d8b440d4ca944a07d6cde9af
+guid: df37d60cc69b7b04d9705a74938179e7
folderAsset: yes
-timeCreated: 1496736709
+timeCreated: 1460627771
licenseType: Pro
DefaultImporter:
userData:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/CurveGrid.shader b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/CurveBackground.shader
similarity index 97%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/CurveGrid.shader
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/CurveBackground.shader
index 37c5657..b4f20b2 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/CurveGrid.shader
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/CurveBackground.shader
@@ -1,4 +1,4 @@
-Shader "Hidden/PostProcessing/Editor/CurveGrid"
+Shader "Hidden/Post FX/UI/Curve Background"
{
CGINCLUDE
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/CurveBackground.shader.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/CurveBackground.shader.meta
new file mode 100644
index 0000000..20025ab
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/CurveBackground.shader.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: b1b2bfb2897659e45983f0c3e7dda2c8
+timeCreated: 1460970196
+licenseType: Pro
+ShaderImporter:
+ defaultTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/MotionBlendingIcon.png b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/MotionBlendingIcon.png
new file mode 100644
index 0000000..97c500f
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/MotionBlendingIcon.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a1c27edb25c4c39a99970a9d20b58709863c5ee0557dfb6c6b2a4be16f05217a
+size 8135
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/MotionBlendingIcon.png.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/MotionBlendingIcon.png.meta
new file mode 100644
index 0000000..6c5c9e9
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/MotionBlendingIcon.png.meta
@@ -0,0 +1,59 @@
+fileFormatVersion: 2
+guid: c0fa58091049bd24394fa15b0b6d4c5a
+timeCreated: 1468326774
+licenseType: Pro
+TextureImporter:
+ fileIDToRecycleName: {}
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 1
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ cubemapConvolution: 0
+ cubemapConvolutionSteps: 7
+ cubemapConvolutionExponent: 1.5
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: -1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 0
+ lightmap: 0
+ rGBM: 0
+ compressionQuality: 50
+ allowsAlphaSplitting: 0
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spritePixelsToUnits: 100
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 2
+ buildTargetSettings: []
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/Trackball.shader b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/Trackball.shader
similarity index 98%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/Trackball.shader
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/Trackball.shader
index 38d92a4..264c6a1 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/Trackball.shader
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/Trackball.shader
@@ -1,4 +1,4 @@
-Shader "Hidden/PostProcessing/Editor/Trackball"
+Shader "Hidden/Post FX/UI/Trackball"
{
CGINCLUDE
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/Trackball.shader.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/Trackball.shader.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/Trackball.shader.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/Trackball.shader.meta
index 21ebfe4..d46548a 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Shaders/Editor/Trackball.shader.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor Resources/UI/Trackball.shader.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: de7f3ac52268a194383c7d62c2a343c1
-timeCreated: 1493903699
+guid: 4bf49309c7ab9eb42a86774d2c09b4fa
+timeCreated: 1460627788
licenseType: Pro
ShaderImporter:
defaultTextures: []
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor.meta
index 0b9e415..92addf9 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 10af18f17ff5ecf47bc4dbd1551b36d2
+guid: e0e418747b892364db5c5f4451e67ede
folderAsset: yes
-timeCreated: 1488201031
+timeCreated: 1466586258
licenseType: Pro
DefaultImporter:
userData:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes.meta
index b57a722..4011a8b 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: f5422948b83b1d34c86e710f0d9fea30
+guid: cc5c690f549b4704eb992a9be781554d
folderAsset: yes
-timeCreated: 1492690959
+timeCreated: 1466769698
licenseType: Pro
DefaultImporter:
userData:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/DecoratorAttribute.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/DecoratorAttribute.cs
deleted file mode 100644
index a1283af..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/DecoratorAttribute.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
- public sealed class DecoratorAttribute : Attribute
- {
- public readonly Type attributeType;
-
- public DecoratorAttribute(Type attributeType)
- {
- this.attributeType = attributeType;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessEditorAttribute.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessEditorAttribute.cs
deleted file mode 100644
index 64dcdb0..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessEditorAttribute.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace UnityEngine.Rendering.PostProcessing
-{
- [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
- public sealed class PostProcessEditorAttribute : Attribute
- {
- public readonly Type settingsType;
-
- public PostProcessEditorAttribute(Type settingsType)
- {
- this.settingsType = settingsType;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessingModelEditorAttribute.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessingModelEditorAttribute.cs
new file mode 100644
index 0000000..13e4819
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessingModelEditorAttribute.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace UnityEditor.PostProcessing
+{
+ public class PostProcessingModelEditorAttribute : Attribute
+ {
+ public readonly Type type;
+ public readonly bool alwaysEnabled;
+
+ public PostProcessingModelEditorAttribute(Type type, bool alwaysEnabled = false)
+ {
+ this.type = type;
+ this.alwaysEnabled = alwaysEnabled;
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/DecoratorAttribute.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessingModelEditorAttribute.cs.meta
similarity index 75%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/DecoratorAttribute.cs.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessingModelEditorAttribute.cs.meta
index 5fb571d..f8368c3 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/DecoratorAttribute.cs.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessingModelEditorAttribute.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 9753335d6f48da542be1c720aa07bbf5
-timeCreated: 1493109769
+guid: c21938aa988055347a2271f03a3e731e
+timeCreated: 1466769734
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/BaseEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/BaseEditor.cs
deleted file mode 100644
index 0db4ac2..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/BaseEditor.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Linq.Expressions;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public class BaseEditor : Editor
- where T : MonoBehaviour
- {
- protected T m_Target
- {
- get { return (T)target; }
- }
-
- protected SerializedProperty FindProperty(Expression> expr)
- {
- return serializedObject.FindProperty(RuntimeUtilities.GetFieldPath(expr));
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/AttributeDecorator.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/AttributeDecorator.cs
deleted file mode 100644
index 35a57ec..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/AttributeDecorator.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using UnityEngine;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public abstract class AttributeDecorator
- {
- // Override this and return false if you want to customize the override checkbox position,
- // else it'll automatically draw it and put the property content in a horizontal scope.
- public virtual bool IsAutoProperty()
- {
- return true;
- }
-
- public abstract bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attribute);
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/Decorators.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/Decorators.cs
deleted file mode 100644
index dee2cf3..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/Decorators.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-using System;
-using UnityEngine;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [Decorator(typeof(RangeAttribute))]
- public sealed class RangeDecorator : AttributeDecorator
- {
- public override bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attribute)
- {
- var attr = (RangeAttribute)attribute;
-
- if (property.propertyType == SerializedPropertyType.Float)
- {
- property.floatValue = EditorGUILayout.Slider(title, property.floatValue, attr.min, attr.max);
- return true;
- }
-
- if (property.propertyType == SerializedPropertyType.Integer)
- {
- property.intValue = EditorGUILayout.IntSlider(title, property.intValue, (int)attr.min, (int)attr.max);
- return true;
- }
-
- return false;
- }
- }
-
- [Decorator(typeof(UnityEngine.Rendering.PostProcessing.MinAttribute))]
- public sealed class MinDecorator : AttributeDecorator
- {
- public override bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attribute)
- {
- var attr = (UnityEngine.Rendering.PostProcessing.MinAttribute)attribute;
-
- if (property.propertyType == SerializedPropertyType.Float)
- {
- float v = EditorGUILayout.FloatField(title, property.floatValue);
- property.floatValue = Mathf.Max(v, attr.min);
- return true;
- }
-
- if (property.propertyType == SerializedPropertyType.Integer)
- {
- int v = EditorGUILayout.IntField(title, property.intValue);
- property.intValue = Mathf.Max(v, (int)attr.min);
- return true;
- }
-
- return false;
- }
- }
-
- [Decorator(typeof(UnityEngine.Rendering.PostProcessing.MaxAttribute))]
- public sealed class MaxDecorator : AttributeDecorator
- {
- public override bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attribute)
- {
- var attr = (UnityEngine.Rendering.PostProcessing.MaxAttribute)attribute;
-
- if (property.propertyType == SerializedPropertyType.Float)
- {
- float v = EditorGUILayout.FloatField(title, property.floatValue);
- property.floatValue = Mathf.Min(v, attr.max);
- return true;
- }
-
- if (property.propertyType == SerializedPropertyType.Integer)
- {
- int v = EditorGUILayout.IntField(title, property.intValue);
- property.intValue = Mathf.Min(v, (int)attr.max);
- return true;
- }
-
- return false;
- }
- }
-
- [Decorator(typeof(UnityEngine.Rendering.PostProcessing.MinMaxAttribute))]
- public sealed class MinMaxDecorator : AttributeDecorator
- {
- public override bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attribute)
- {
- var attr = (UnityEngine.Rendering.PostProcessing.MinMaxAttribute)attribute;
-
- if (property.propertyType == SerializedPropertyType.Float)
- {
- float v = EditorGUILayout.FloatField(title, property.floatValue);
- property.floatValue = Mathf.Clamp(v, attr.min, attr.max);
- return true;
- }
-
- if (property.propertyType == SerializedPropertyType.Integer)
- {
- int v = EditorGUILayout.IntField(title, property.intValue);
- property.intValue = Mathf.Clamp(v, (int)attr.min, (int)attr.max);
- return true;
- }
-
- if (property.propertyType == SerializedPropertyType.Vector2)
- {
- var v = property.vector2Value;
- EditorGUILayout.MinMaxSlider(title, ref v.x, ref v.y, attr.min, attr.max);
- property.vector2Value = v;
- return true;
- }
-
- return false;
- }
- }
-
- [Decorator(typeof(ColorUsageAttribute))]
- public sealed class ColorUsageDecorator : AttributeDecorator
- {
- public override bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attribute)
- {
- var attr = (ColorUsageAttribute)attribute;
-
- if (property.propertyType != SerializedPropertyType.Color)
- return false;
-
-#if UNITY_2018_1_OR_NEWER
- property.colorValue = EditorGUILayout.ColorField(title, property.colorValue, true, attr.showAlpha, attr.hdr);
-#else
- ColorPickerHDRConfig hdrConfig = null;
-
- if (attr.hdr)
- {
- hdrConfig = new ColorPickerHDRConfig(
- attr.minBrightness,
- attr.maxBrightness,
- attr.minExposureValue,
- attr.maxExposureValue
- );
- }
-
- property.colorValue = EditorGUILayout.ColorField(title, property.colorValue, true, attr.showAlpha, attr.hdr, hdrConfig);
-#endif
-
- return true;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/Decorators.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/Decorators.cs.meta
deleted file mode 100644
index 773f5fd..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/Decorators.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: d6ae47710b8593e41960a944bb29e6c3
-timeCreated: 1493051241
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/TrackballDecorator.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/TrackballDecorator.cs
deleted file mode 100644
index 24154b4..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/TrackballDecorator.cs
+++ /dev/null
@@ -1,209 +0,0 @@
-using System;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [Decorator(typeof(TrackballAttribute))]
- public sealed class TrackballDecorator : AttributeDecorator
- {
- static readonly int k_ThumbHash = "colorWheelThumb".GetHashCode();
- static Material s_Material;
-
- bool m_ResetState;
- Vector2 m_CursorPos;
-
- public override bool IsAutoProperty()
- {
- return false;
- }
-
- public override bool OnGUI(SerializedProperty property, SerializedProperty overrideState, GUIContent title, Attribute attribute)
- {
- if (property.propertyType != SerializedPropertyType.Vector4)
- return false;
-
- var value = property.vector4Value;
-
- using (new EditorGUILayout.VerticalScope())
- {
- using (new EditorGUI.DisabledScope(!overrideState.boolValue))
- DrawWheel(ref value, overrideState.boolValue, (TrackballAttribute)attribute);
-
- DrawLabelAndOverride(title, overrideState);
- }
-
- if (m_ResetState)
- {
- value = Vector4.zero;
- m_ResetState = false;
- }
-
- property.vector4Value = value;
-
- return true;
- }
-
- void DrawWheel(ref Vector4 value, bool overrideState, TrackballAttribute attr)
- {
- var wheelRect = GUILayoutUtility.GetAspectRect(1f);
- float size = wheelRect.width;
- float hsize = size / 2f;
- float radius = 0.38f * size;
-
- Vector3 hsv;
- Color.RGBToHSV(value, out hsv.x, out hsv.y, out hsv.z);
- float offset = value.w;
-
- // Thumb
- var thumbPos = Vector2.zero;
- float theta = hsv.x * (Mathf.PI * 2f);
- thumbPos.x = Mathf.Cos(theta + (Mathf.PI / 2f));
- thumbPos.y = Mathf.Sin(theta - (Mathf.PI / 2f));
- thumbPos *= hsv.y * radius;
-
- // Draw the wheel
- if (Event.current.type == EventType.Repaint)
- {
- // Retina support
- float scale = EditorGUIUtility.pixelsPerPoint;
-
- if (s_Material == null)
- s_Material = new Material(Shader.Find("Hidden/PostProcessing/Editor/Trackball")) { hideFlags = HideFlags.HideAndDontSave };
-
- // Wheel texture
- #if UNITY_2018_1_OR_NEWER
- const RenderTextureReadWrite kReadWrite = RenderTextureReadWrite.sRGB;
- #else
- const RenderTextureReadWrite kReadWrite = RenderTextureReadWrite.Linear;
- #endif
-
- var oldRT = RenderTexture.active;
- var rt = RenderTexture.GetTemporary((int)(size * scale), (int)(size * scale), 0, RenderTextureFormat.ARGB32, kReadWrite);
- s_Material.SetFloat("_Offset", offset);
- s_Material.SetFloat("_DisabledState", overrideState ? 1f : 0.5f);
- s_Material.SetVector("_Resolution", new Vector2(size * scale, size * scale / 2f));
- Graphics.Blit(null, rt, s_Material, EditorGUIUtility.isProSkin ? 0 : 1);
- RenderTexture.active = oldRT;
-
- GUI.DrawTexture(wheelRect, rt);
- RenderTexture.ReleaseTemporary(rt);
-
- var thumbSize = Styling.wheelThumbSize;
- var thumbSizeH = thumbSize / 2f;
- Styling.wheelThumb.Draw(new Rect(wheelRect.x + hsize + thumbPos.x - thumbSizeH.x, wheelRect.y + hsize + thumbPos.y - thumbSizeH.y, thumbSize.x, thumbSize.y), false, false, false, false);
- }
-
- // Input
- var bounds = wheelRect;
- bounds.x += hsize - radius;
- bounds.y += hsize - radius;
- bounds.width = bounds.height = radius * 2f;
- hsv = GetInput(bounds, hsv, thumbPos, radius);
- value = Color.HSVToRGB(hsv.x, hsv.y, 1f);
- value.w = offset;
-
- // Offset
- var sliderRect = GUILayoutUtility.GetRect(1f, 17f);
- float padding = sliderRect.width * 0.05f; // 5% padding
- sliderRect.xMin += padding;
- sliderRect.xMax -= padding;
- value.w = GUI.HorizontalSlider(sliderRect, value.w, -1f, 1f);
-
- if (attr.mode == TrackballAttribute.Mode.None)
- return;
-
- // Values
- var displayValue = Vector3.zero;
-
- switch (attr.mode)
- {
- case TrackballAttribute.Mode.Lift: displayValue = ColorUtilities.ColorToLift(value);
- break;
- case TrackballAttribute.Mode.Gamma: displayValue = ColorUtilities.ColorToInverseGamma(value);
- break;
- case TrackballAttribute.Mode.Gain: displayValue = ColorUtilities.ColorToGain(value);
- break;
- }
-
- using (new EditorGUI.DisabledGroupScope(true))
- {
- var valuesRect = GUILayoutUtility.GetRect(1f, 17f);
- valuesRect.width /= 3f;
- GUI.Label(valuesRect, displayValue.x.ToString("F2"), EditorStyles.centeredGreyMiniLabel);
- valuesRect.x += valuesRect.width;
- GUI.Label(valuesRect, displayValue.y.ToString("F2"), EditorStyles.centeredGreyMiniLabel);
- valuesRect.x += valuesRect.width;
- GUI.Label(valuesRect, displayValue.z.ToString("F2"), EditorStyles.centeredGreyMiniLabel);
- valuesRect.x += valuesRect.width;
- }
- }
-
- void DrawLabelAndOverride(GUIContent title, SerializedProperty overrideState)
- {
- // Title
- var areaRect = GUILayoutUtility.GetRect(1f, 17f);
- var labelSize = Styling.wheelLabel.CalcSize(title);
- var labelRect = new Rect(areaRect.x + areaRect.width / 2 - labelSize.x / 2, areaRect.y, labelSize.x, labelSize.y);
- GUI.Label(labelRect, title, Styling.wheelLabel);
-
- // Override checkbox
- var overrideRect = new Rect(labelRect.x - 17, labelRect.y + 3, 17f, 17f);
- EditorUtilities.DrawOverrideCheckbox(overrideRect, overrideState);
- }
-
- Vector3 GetInput(Rect bounds, Vector3 hsv, Vector2 thumbPos, float radius)
- {
- var e = Event.current;
- var id = GUIUtility.GetControlID(k_ThumbHash, FocusType.Passive, bounds);
- var mousePos = e.mousePosition;
-
- if (e.type == EventType.MouseDown && GUIUtility.hotControl == 0 && bounds.Contains(mousePos))
- {
- if (e.button == 0)
- {
- var center = new Vector2(bounds.x + radius, bounds.y + radius);
- float dist = Vector2.Distance(center, mousePos);
-
- if (dist <= radius)
- {
- e.Use();
- m_CursorPos = new Vector2(thumbPos.x + radius, thumbPos.y + radius);
- GUIUtility.hotControl = id;
- GUI.changed = true;
- }
- }
- else if (e.button == 1)
- {
- e.Use();
- GUI.changed = true;
- m_ResetState = true;
- }
- }
- else if (e.type == EventType.MouseDrag && e.button == 0 && GUIUtility.hotControl == id)
- {
- e.Use();
- GUI.changed = true;
- m_CursorPos += e.delta * GlobalSettings.trackballSensitivity;
- GetWheelHueSaturation(m_CursorPos.x, m_CursorPos.y, radius, out hsv.x, out hsv.y);
- }
- else if (e.rawType == EventType.MouseUp && e.button == 0 && GUIUtility.hotControl == id)
- {
- e.Use();
- GUIUtility.hotControl = 0;
- }
-
- return hsv;
- }
-
- void GetWheelHueSaturation(float x, float y, float radius, out float hue, out float saturation)
- {
- float dx = (x - radius) / radius;
- float dy = (y - radius) / radius;
- float d = Mathf.Sqrt(dx * dx + dy * dy);
- hue = Mathf.Atan2(dx, -dy);
- hue = 1f - ((hue > 0) ? hue : (Mathf.PI * 2f) + hue) / (Mathf.PI * 2f);
- saturation = Mathf.Clamp01(d);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/TrackballDecorator.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/TrackballDecorator.cs.meta
deleted file mode 100644
index 52832a6..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/TrackballDecorator.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 26ed99f46b86df8449003e6ec0f65144
-timeCreated: 1493900975
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/EffectListEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/EffectListEditor.cs
deleted file mode 100644
index 626bb42..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/EffectListEditor.cs
+++ /dev/null
@@ -1,316 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using UnityEngine;
-using UnityEngine.Assertions;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public sealed class EffectListEditor
- {
- Editor m_BaseEditor;
-
- PostProcessProfile m_Asset;
- SerializedObject m_SerializedObject;
- SerializedProperty m_SettingsProperty;
-
- Dictionary m_EditorTypes; // SettingsType => EditorType
- List m_Editors;
-
- public EffectListEditor(Editor editor)
- {
- Assert.IsNotNull(editor);
- m_BaseEditor = editor;
- }
-
- public void Init(PostProcessProfile asset, SerializedObject serializedObject)
- {
- Assert.IsNotNull(asset);
- Assert.IsNotNull(serializedObject);
-
- m_Asset = asset;
- m_SerializedObject = serializedObject;
- m_SettingsProperty = serializedObject.FindProperty("settings");
- Assert.IsNotNull(m_SettingsProperty);
-
- m_EditorTypes = new Dictionary();
- m_Editors = new List();
-
- // Gets the list of all available postfx editors
- var editorTypes = RuntimeUtilities.GetAllAssemblyTypes()
- .Where(
- t => t.IsSubclassOf(typeof(PostProcessEffectBaseEditor))
- && t.IsDefined(typeof(PostProcessEditorAttribute), false)
- && !t.IsAbstract
- );
-
- // Map them to their corresponding settings type
- foreach (var editorType in editorTypes)
- {
- var attribute = editorType.GetAttribute();
- m_EditorTypes.Add(attribute.settingsType, editorType);
- }
-
- // Create editors for existing settings
- for (int i = 0; i < m_Asset.settings.Count; i++)
- CreateEditor(m_Asset.settings[i], m_SettingsProperty.GetArrayElementAtIndex(i));
-
- // Keep track of undo/redo to redraw the inspector when that happens
- Undo.undoRedoPerformed += OnUndoRedoPerformed;
- }
-
- void OnUndoRedoPerformed()
- {
- m_Asset.isDirty = true;
-
- // Dumb hack to make sure the serialized object is up to date on undo (else there'll be
- // a state mismatch when this class is used in a GameObject inspector).
- m_SerializedObject.Update();
- m_SerializedObject.ApplyModifiedProperties();
-
- // Seems like there's an issue with the inspector not repainting after some undo events
- // This will take care of that
- m_BaseEditor.Repaint();
- }
-
- void CreateEditor(PostProcessEffectSettings settings, SerializedProperty property, int index = -1)
- {
- var settingsType = settings.GetType();
- Type editorType;
-
- if (!m_EditorTypes.TryGetValue(settingsType, out editorType))
- editorType = typeof(DefaultPostProcessEffectEditor);
-
- var editor = (PostProcessEffectBaseEditor)Activator.CreateInstance(editorType);
- editor.Init(settings, m_BaseEditor);
- editor.baseProperty = property.Copy();
-
- if (index < 0)
- m_Editors.Add(editor);
- else
- m_Editors[index] = editor;
- }
-
- // Clears & recreate all editors - mainly used when the volume has been modified outside of
- // the editor (user scripts, inspector reset etc).
- void RefreshEditors()
- {
- // Disable all editors first
- foreach (var editor in m_Editors)
- editor.OnDisable();
-
- // Remove them
- m_Editors.Clear();
-
- // Recreate editors for existing settings, if any
- for (int i = 0; i < m_Asset.settings.Count; i++)
- CreateEditor(m_Asset.settings[i], m_SettingsProperty.GetArrayElementAtIndex(i));
- }
-
- public void Clear()
- {
- if (m_Editors == null)
- return; // Hasn't been inited yet
-
- foreach (var editor in m_Editors)
- editor.OnDisable();
-
- m_Editors.Clear();
- m_EditorTypes.Clear();
-
- Undo.undoRedoPerformed -= OnUndoRedoPerformed;
- }
-
- public void OnGUI()
- {
- if (m_Asset == null)
- return;
-
- if (m_Asset.isDirty)
- {
- RefreshEditors();
- m_Asset.isDirty = false;
- }
-
- bool isEditable = !VersionControl.Provider.isActive
- || AssetDatabase.IsOpenForEdit(m_Asset, StatusQueryOptions.UseCachedIfPossible);
-
- using (new EditorGUI.DisabledScope(!isEditable))
- {
- EditorGUILayout.LabelField(EditorUtilities.GetContent("Overrides"), EditorStyles.boldLabel);
-
- // Override list
- for (int i = 0; i < m_Editors.Count; i++)
- {
- var editor = m_Editors[i];
- string title = editor.GetDisplayTitle();
- int id = i; // Needed for closure capture below
-
- EditorUtilities.DrawSplitter();
- bool displayContent = EditorUtilities.DrawHeader(
- title,
- editor.baseProperty,
- editor.activeProperty,
- editor.target,
- () => ResetEffectOverride(editor.target.GetType(), id),
- () => RemoveEffectOverride(id)
- );
-
- if (displayContent)
- {
- using (new EditorGUI.DisabledScope(!editor.activeProperty.boolValue))
- editor.OnInternalInspectorGUI();
- }
- }
-
- if (m_Editors.Count > 0)
- {
- EditorUtilities.DrawSplitter();
- EditorGUILayout.Space();
- }
- else
- {
- EditorGUILayout.HelpBox("No override set on this volume.", MessageType.Info);
- }
-
- if (GUILayout.Button("Add effect...", EditorStyles.miniButton))
- {
- var menu = new GenericMenu();
-
- var typeMap = PostProcessManager.instance.settingsTypes;
- foreach (var kvp in typeMap)
- {
- var type = kvp.Key;
- var title = EditorUtilities.GetContent(kvp.Value.menuItem);
- bool exists = m_Asset.HasSettings(type);
-
- if (!exists)
- menu.AddItem(title, false, () => AddEffectOverride(type));
- else
- menu.AddDisabledItem(title);
- }
-
- menu.ShowAsContext();
- }
-
- EditorGUILayout.Space();
- }
- }
-
- void AddEffectOverride(Type type)
- {
- m_SerializedObject.Update();
-
- var effect = CreateNewEffect(type);
- Undo.RegisterCreatedObjectUndo(effect, "Add Effect Override");
-
- // Store this new effect as a subasset so we can reference it safely afterwards
- AssetDatabase.AddObjectToAsset(effect, m_Asset);
-
- // Grow the list first, then add - that's how serialized lists work in Unity
- m_SettingsProperty.arraySize++;
- var effectProp = m_SettingsProperty.GetArrayElementAtIndex(m_SettingsProperty.arraySize - 1);
- effectProp.objectReferenceValue = effect;
-
- // Force save / refresh
- EditorUtility.SetDirty(m_Asset);
- AssetDatabase.SaveAssets();
-
- // Create & store the internal editor object for this effect
- CreateEditor(effect, effectProp);
-
- m_SerializedObject.ApplyModifiedProperties();
- }
-
- void RemoveEffectOverride(int id)
- {
- // Huh. Hack to keep foldout state on the next element...
- bool nextFoldoutState = false;
- if (id < m_Editors.Count - 1)
- nextFoldoutState = m_Editors[id + 1].baseProperty.isExpanded;
-
- // Remove from the cached editors list
- m_Editors[id].OnDisable();
- m_Editors.RemoveAt(id);
-
- m_SerializedObject.Update();
-
- var property = m_SettingsProperty.GetArrayElementAtIndex(id);
- var effect = property.objectReferenceValue;
-
- // Unassign it (should be null already but serialization does funky things
- property.objectReferenceValue = null;
-
- // ...and remove the array index itself from the list
- m_SettingsProperty.DeleteArrayElementAtIndex(id);
-
- // Finally refresh editor reference to the serialized settings list
- for (int i = 0; i < m_Editors.Count; i++)
- m_Editors[i].baseProperty = m_SettingsProperty.GetArrayElementAtIndex(i).Copy();
-
- if (id < m_Editors.Count)
- m_Editors[id].baseProperty.isExpanded = nextFoldoutState;
-
- m_SerializedObject.ApplyModifiedProperties();
-
- // Destroy the setting object after ApplyModifiedProperties(). If we do it before, redo
- // actions will be in the wrong order and the reference to the setting object in the
- // list will be lost.
- Undo.DestroyObjectImmediate(effect);
-
- // Force save / refresh
- EditorUtility.SetDirty(m_Asset);
- AssetDatabase.SaveAssets();
- }
-
- // Reset is done by deleting and removing the object from the list and adding a new one in
- // the place as it was before
- void ResetEffectOverride(Type type, int id)
- {
- // Remove from the cached editors list
- m_Editors[id].OnDisable();
- m_Editors[id] = null;
-
- m_SerializedObject.Update();
-
- var property = m_SettingsProperty.GetArrayElementAtIndex(id);
- var prevSettings = property.objectReferenceValue;
-
- // Unassign it but down remove it from the array to keep the index available
- property.objectReferenceValue = null;
-
- // Create a new object
- var newEffect = CreateNewEffect(type);
- Undo.RegisterCreatedObjectUndo(newEffect, "Reset Effect Override");
-
- // Store this new effect as a subasset so we can reference it safely afterwards
- AssetDatabase.AddObjectToAsset(newEffect, m_Asset);
-
- // Put it in the reserved space
- property.objectReferenceValue = newEffect;
-
- // Create & store the internal editor object for this effect
- CreateEditor(newEffect, property, id);
-
- m_SerializedObject.ApplyModifiedProperties();
-
- // Same as RemoveEffectOverride, destroy at the end so it's recreated first on Undo to
- // make sure the GUID exists before undoing the list state
- Undo.DestroyObjectImmediate(prevSettings);
-
- // Force save / refresh
- EditorUtility.SetDirty(m_Asset);
- AssetDatabase.SaveAssets();
- }
-
- PostProcessEffectSettings CreateNewEffect(Type type)
- {
- var effect = (PostProcessEffectSettings)ScriptableObject.CreateInstance(type);
- effect.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
- effect.name = type.Name;
- effect.enabled.value = true;
- return effect;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/EffectListEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/EffectListEditor.cs.meta
deleted file mode 100644
index 201d41e..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/EffectListEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 9f9fffe306f3969418c31ee836b6ffee
-timeCreated: 1494328254
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs
deleted file mode 100644
index a158423..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(AmbientOcclusion))]
- public sealed class AmbientOcclusionEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_Mode;
- SerializedParameterOverride m_Intensity;
- SerializedParameterOverride m_Color;
- SerializedParameterOverride m_AmbientOnly;
- SerializedParameterOverride m_ThicknessModifier;
- SerializedParameterOverride m_DirectLightingStrength;
- SerializedParameterOverride m_Quality;
- SerializedParameterOverride m_Radius;
-
- public override void OnEnable()
- {
- m_Mode = FindParameterOverride(x => x.mode);
- m_Intensity = FindParameterOverride(x => x.intensity);
- m_Color = FindParameterOverride(x => x.color);
- m_AmbientOnly = FindParameterOverride(x => x.ambientOnly);
- m_ThicknessModifier = FindParameterOverride(x => x.thicknessModifier);
- m_DirectLightingStrength = FindParameterOverride(x => x.directLightingStrength);
- m_Quality = FindParameterOverride(x => x.quality);
- m_Radius = FindParameterOverride(x => x.radius);
- }
-
- public override void OnInspectorGUI()
- {
- PropertyField(m_Mode);
- int aoMode = m_Mode.value.intValue;
-
- if (RuntimeUtilities.scriptableRenderPipelineActive && aoMode == (int)AmbientOcclusionMode.ScalableAmbientObscurance)
- {
- EditorGUILayout.HelpBox("Scalable ambient obscurance doesn't work with scriptable render pipelines.", MessageType.Warning);
- return;
- }
-
-#if !UNITY_2017_1_OR_NEWER
- if (aoMode == (int)AmbientOcclusionMode.MultiScaleVolumetricObscurance)
- {
- EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires Unity 2017.1 or more.", MessageType.Warning);
- return;
- }
-#endif
-
- PropertyField(m_Intensity);
-
- if (aoMode == (int)AmbientOcclusionMode.ScalableAmbientObscurance)
- {
- PropertyField(m_Radius);
- PropertyField(m_Quality);
- }
- else if (aoMode == (int)AmbientOcclusionMode.MultiScaleVolumetricObscurance)
- {
- if (!SystemInfo.supportsComputeShaders)
- EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires compute shader support.", MessageType.Warning);
-
- PropertyField(m_ThicknessModifier);
-
- if (RuntimeUtilities.scriptableRenderPipelineActive)
- PropertyField(m_DirectLightingStrength);
- }
-
- PropertyField(m_Color);
-
- if (Camera.main != null && Camera.main.actualRenderingPath == RenderingPath.DeferredShading && Camera.main.allowHDR)
- PropertyField(m_AmbientOnly);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs.meta
deleted file mode 100644
index 05a9d62..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 67909952e72978b4ea41880509c936ff
-timeCreated: 1505217529
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AutoExposureEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AutoExposureEditor.cs
deleted file mode 100644
index 132e77c..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AutoExposureEditor.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(AutoExposure))]
- public sealed class AutoExposureEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_Filtering;
-
- SerializedParameterOverride m_MinLuminance;
- SerializedParameterOverride m_MaxLuminance;
- SerializedParameterOverride m_KeyValue;
-
- SerializedParameterOverride m_EyeAdaptation;
- SerializedParameterOverride m_SpeedUp;
- SerializedParameterOverride m_SpeedDown;
-
- public override void OnEnable()
- {
- m_Filtering = FindParameterOverride(x => x.filtering);
-
- m_MinLuminance = FindParameterOverride(x => x.minLuminance);
- m_MaxLuminance = FindParameterOverride(x => x.maxLuminance);
- m_KeyValue = FindParameterOverride(x => x.keyValue);
-
- m_EyeAdaptation = FindParameterOverride(x => x.eyeAdaptation);
- m_SpeedUp = FindParameterOverride(x => x.speedUp);
- m_SpeedDown = FindParameterOverride(x => x.speedDown);
- }
-
- public override void OnInspectorGUI()
- {
- if (!SystemInfo.supportsComputeShaders)
- EditorGUILayout.HelpBox("Auto exposure requires compute shader support.", MessageType.Warning);
-
- EditorUtilities.DrawHeaderLabel("Exposure");
-
- PropertyField(m_Filtering);
- PropertyField(m_MinLuminance);
- PropertyField(m_MaxLuminance);
-
- // Clamp min/max adaptation values
- float minLum = m_MinLuminance.value.floatValue;
- float maxLum = m_MaxLuminance.value.floatValue;
- m_MinLuminance.value.floatValue = Mathf.Min(minLum, maxLum);
- m_MaxLuminance.value.floatValue = Mathf.Max(minLum, maxLum);
-
- PropertyField(m_KeyValue);
-
- EditorGUILayout.Space();
- EditorUtilities.DrawHeaderLabel("Adaptation");
-
- PropertyField(m_EyeAdaptation);
-
- if (m_EyeAdaptation.value.intValue == (int)EyeAdaptation.Progressive)
- {
- PropertyField(m_SpeedUp);
- PropertyField(m_SpeedDown);
- }
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AutoExposureEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AutoExposureEditor.cs.meta
deleted file mode 100644
index d901e9c..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/AutoExposureEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 3051d2fb25301fa4a81e797109712feb
-timeCreated: 1493022639
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/BloomEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/BloomEditor.cs
deleted file mode 100644
index 9cd88bd..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/BloomEditor.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(Bloom))]
- public sealed class BloomEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_Intensity;
- SerializedParameterOverride m_Threshold;
- SerializedParameterOverride m_SoftKnee;
- SerializedParameterOverride m_Diffusion;
- SerializedParameterOverride m_AnamorphicRatio;
- SerializedParameterOverride m_Color;
- SerializedParameterOverride m_FastMode;
-
- SerializedParameterOverride m_DirtTexture;
- SerializedParameterOverride m_DirtIntensity;
-
- public override void OnEnable()
- {
- m_Intensity = FindParameterOverride(x => x.intensity);
- m_Threshold = FindParameterOverride(x => x.threshold);
- m_SoftKnee = FindParameterOverride(x => x.softKnee);
- m_Diffusion = FindParameterOverride(x => x.diffusion);
- m_AnamorphicRatio = FindParameterOverride(x => x.anamorphicRatio);
- m_Color = FindParameterOverride(x => x.color);
- m_FastMode = FindParameterOverride(x => x.fastMode);
-
- m_DirtTexture = FindParameterOverride(x => x.dirtTexture);
- m_DirtIntensity = FindParameterOverride(x => x.dirtIntensity);
- }
-
- public override void OnInspectorGUI()
- {
- EditorUtilities.DrawHeaderLabel("Bloom");
-
- PropertyField(m_Intensity);
- PropertyField(m_Threshold);
- PropertyField(m_SoftKnee);
- PropertyField(m_Diffusion);
- PropertyField(m_AnamorphicRatio);
- PropertyField(m_Color);
- PropertyField(m_FastMode);
-
- if (m_FastMode.overrideState.boolValue && !m_FastMode.value.boolValue && EditorUtilities.isTargetingConsolesOrMobiles)
- EditorGUILayout.HelpBox("For performance reasons it is recommended to use Fast Mode on mobile and console platforms.", MessageType.Warning);
-
- EditorGUILayout.Space();
- EditorUtilities.DrawHeaderLabel("Dirtiness");
-
- PropertyField(m_DirtTexture);
- PropertyField(m_DirtIntensity);
-
- if (RuntimeUtilities.isVREnabled)
- {
- if ((m_DirtIntensity.overrideState.boolValue && m_DirtIntensity.value.floatValue > 0f)
- || (m_DirtTexture.overrideState.boolValue && m_DirtTexture.value.objectReferenceValue != null))
- EditorGUILayout.HelpBox("Using a dirt texture in VR is not recommended.", MessageType.Warning);
- }
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/BloomEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/BloomEditor.cs.meta
deleted file mode 100644
index 38ac202..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/BloomEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 47feae56b7bdcf4499b96c2aa3c6ce07
-timeCreated: 1493116477
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ChromaticAberrationEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ChromaticAberrationEditor.cs
deleted file mode 100644
index 96167cf..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ChromaticAberrationEditor.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(ChromaticAberration))]
- public sealed class ChromaticAberrationEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_SpectralLut;
- SerializedParameterOverride m_Intensity;
- SerializedParameterOverride m_FastMode;
-
- public override void OnEnable()
- {
- m_SpectralLut = FindParameterOverride(x => x.spectralLut);
- m_Intensity = FindParameterOverride(x => x.intensity);
- m_FastMode = FindParameterOverride(x => x.fastMode);
- }
-
- public override void OnInspectorGUI()
- {
- base.OnInspectorGUI();
-
- PropertyField(m_SpectralLut);
- PropertyField(m_Intensity);
- PropertyField(m_FastMode);
-
- if (m_FastMode.overrideState.boolValue && !m_FastMode.value.boolValue && EditorUtilities.isTargetingConsolesOrMobiles)
- EditorGUILayout.HelpBox("For performance reasons it is recommended to use Fast Mode on mobile and console platforms.", MessageType.Warning);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ChromaticAberrationEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ChromaticAberrationEditor.cs.meta
deleted file mode 100644
index adb717a..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ChromaticAberrationEditor.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f8e5f5614c0d72445b292f4b16ab660b
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ColorGradingEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ColorGradingEditor.cs
deleted file mode 100644
index 0c3f42e..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ColorGradingEditor.cs
+++ /dev/null
@@ -1,738 +0,0 @@
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(ColorGrading))]
- public sealed class ColorGradingEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_GradingMode;
-
- static GUIContent[] s_Curves =
- {
- new GUIContent("Master"),
- new GUIContent("Red"),
- new GUIContent("Green"),
- new GUIContent("Blue"),
- new GUIContent("Hue Vs Hue"),
- new GUIContent("Hue Vs Sat"),
- new GUIContent("Sat Vs Sat"),
- new GUIContent("Lum Vs Sat")
- };
-
- SerializedParameterOverride m_ExternalLut;
-
- SerializedParameterOverride m_Tonemapper;
- SerializedParameterOverride m_ToneCurveToeStrength;
- SerializedParameterOverride m_ToneCurveToeLength;
- SerializedParameterOverride m_ToneCurveShoulderStrength;
- SerializedParameterOverride m_ToneCurveShoulderLength;
- SerializedParameterOverride m_ToneCurveShoulderAngle;
- SerializedParameterOverride m_ToneCurveGamma;
-
- SerializedParameterOverride m_LdrLut;
-
- SerializedParameterOverride m_Temperature;
- SerializedParameterOverride m_Tint;
-
- SerializedParameterOverride m_ColorFilter;
- SerializedParameterOverride m_HueShift;
- SerializedParameterOverride m_Saturation;
- SerializedParameterOverride m_Brightness;
- SerializedParameterOverride m_PostExposure;
- SerializedParameterOverride m_Contrast;
-
- SerializedParameterOverride m_MixerRedOutRedIn;
- SerializedParameterOverride m_MixerRedOutGreenIn;
- SerializedParameterOverride m_MixerRedOutBlueIn;
-
- SerializedParameterOverride m_MixerGreenOutRedIn;
- SerializedParameterOverride m_MixerGreenOutGreenIn;
- SerializedParameterOverride m_MixerGreenOutBlueIn;
-
- SerializedParameterOverride m_MixerBlueOutRedIn;
- SerializedParameterOverride m_MixerBlueOutGreenIn;
- SerializedParameterOverride m_MixerBlueOutBlueIn;
-
- SerializedParameterOverride m_Lift;
- SerializedParameterOverride m_Gamma;
- SerializedParameterOverride m_Gain;
-
- SerializedParameterOverride m_MasterCurve;
- SerializedParameterOverride m_RedCurve;
- SerializedParameterOverride m_GreenCurve;
- SerializedParameterOverride m_BlueCurve;
-
- SerializedParameterOverride m_HueVsHueCurve;
- SerializedParameterOverride m_HueVsSatCurve;
- SerializedParameterOverride m_SatVsSatCurve;
- SerializedParameterOverride m_LumVsSatCurve;
-
- // Internal references to the actual animation curves
- // Needed for the curve editor
- SerializedProperty m_RawMasterCurve;
- SerializedProperty m_RawRedCurve;
- SerializedProperty m_RawGreenCurve;
- SerializedProperty m_RawBlueCurve;
-
- SerializedProperty m_RawHueVsHueCurve;
- SerializedProperty m_RawHueVsSatCurve;
- SerializedProperty m_RawSatVsSatCurve;
- SerializedProperty m_RawLumVsSatCurve;
-
- CurveEditor m_CurveEditor;
- Dictionary m_CurveDict;
-
- // Custom tone curve drawing
- const int k_CustomToneCurveResolution = 48;
- const float k_CustomToneCurveRangeY = 1.025f;
- readonly Vector3[] m_RectVertices = new Vector3[4];
- readonly Vector3[] m_LineVertices = new Vector3[2];
- readonly Vector3[] m_CurveVertices = new Vector3[k_CustomToneCurveResolution];
- Rect m_CustomToneCurveRect;
- readonly HableCurve m_HableCurve = new HableCurve();
-
- public override void OnEnable()
- {
- m_GradingMode = FindParameterOverride(x => x.gradingMode);
-
- m_ExternalLut = FindParameterOverride(x => x.externalLut);
-
- m_Tonemapper = FindParameterOverride(x => x.tonemapper);
- m_ToneCurveToeStrength = FindParameterOverride(x => x.toneCurveToeStrength);
- m_ToneCurveToeLength = FindParameterOverride(x => x.toneCurveToeLength);
- m_ToneCurveShoulderStrength = FindParameterOverride(x => x.toneCurveShoulderStrength);
- m_ToneCurveShoulderLength = FindParameterOverride(x => x.toneCurveShoulderLength);
- m_ToneCurveShoulderAngle = FindParameterOverride(x => x.toneCurveShoulderAngle);
- m_ToneCurveGamma = FindParameterOverride(x => x.toneCurveGamma);
-
- m_LdrLut = FindParameterOverride(x => x.ldrLut);
-
- m_Temperature = FindParameterOverride(x => x.temperature);
- m_Tint = FindParameterOverride(x => x.tint);
-
- m_ColorFilter = FindParameterOverride(x => x.colorFilter);
- m_HueShift = FindParameterOverride(x => x.hueShift);
- m_Saturation = FindParameterOverride(x => x.saturation);
- m_Brightness = FindParameterOverride(x => x.brightness);
- m_PostExposure = FindParameterOverride(x => x.postExposure);
- m_Contrast = FindParameterOverride(x => x.contrast);
-
- m_MixerRedOutRedIn = FindParameterOverride(x => x.mixerRedOutRedIn);
- m_MixerRedOutGreenIn = FindParameterOverride(x => x.mixerRedOutGreenIn);
- m_MixerRedOutBlueIn = FindParameterOverride(x => x.mixerRedOutBlueIn);
-
- m_MixerGreenOutRedIn = FindParameterOverride(x => x.mixerGreenOutRedIn);
- m_MixerGreenOutGreenIn = FindParameterOverride(x => x.mixerGreenOutGreenIn);
- m_MixerGreenOutBlueIn = FindParameterOverride(x => x.mixerGreenOutBlueIn);
-
- m_MixerBlueOutRedIn = FindParameterOverride(x => x.mixerBlueOutRedIn);
- m_MixerBlueOutGreenIn = FindParameterOverride(x => x.mixerBlueOutGreenIn);
- m_MixerBlueOutBlueIn = FindParameterOverride(x => x.mixerBlueOutBlueIn);
-
- m_Lift = FindParameterOverride(x => x.lift);
- m_Gamma = FindParameterOverride(x => x.gamma);
- m_Gain = FindParameterOverride(x => x.gain);
-
- m_MasterCurve = FindParameterOverride(x => x.masterCurve);
- m_RedCurve = FindParameterOverride(x => x.redCurve);
- m_GreenCurve = FindParameterOverride(x => x.greenCurve);
- m_BlueCurve = FindParameterOverride(x => x.blueCurve);
-
- m_HueVsHueCurve = FindParameterOverride(x => x.hueVsHueCurve);
- m_HueVsSatCurve = FindParameterOverride(x => x.hueVsSatCurve);
- m_SatVsSatCurve = FindParameterOverride(x => x.satVsSatCurve);
- m_LumVsSatCurve = FindParameterOverride(x => x.lumVsSatCurve);
-
- m_RawMasterCurve = FindProperty(x => x.masterCurve.value.curve);
- m_RawRedCurve = FindProperty(x => x.redCurve.value.curve);
- m_RawGreenCurve = FindProperty(x => x.greenCurve.value.curve);
- m_RawBlueCurve = FindProperty(x => x.blueCurve.value.curve);
-
- m_RawHueVsHueCurve = FindProperty(x => x.hueVsHueCurve.value.curve);
- m_RawHueVsSatCurve = FindProperty(x => x.hueVsSatCurve.value.curve);
- m_RawSatVsSatCurve = FindProperty(x => x.satVsSatCurve.value.curve);
- m_RawLumVsSatCurve = FindProperty(x => x.lumVsSatCurve.value.curve);
-
- m_CurveEditor = new CurveEditor();
- m_CurveDict = new Dictionary();
-
- // Prepare the curve editor
- SetupCurve(m_RawMasterCurve, new Color(1f, 1f, 1f), 2, false);
- SetupCurve(m_RawRedCurve, new Color(1f, 0f, 0f), 2, false);
- SetupCurve(m_RawGreenCurve, new Color(0f, 1f, 0f), 2, false);
- SetupCurve(m_RawBlueCurve, new Color(0f, 0.5f, 1f), 2, false);
- SetupCurve(m_RawHueVsHueCurve, new Color(1f, 1f, 1f), 0, true);
- SetupCurve(m_RawHueVsSatCurve, new Color(1f, 1f, 1f), 0, true);
- SetupCurve(m_RawSatVsSatCurve, new Color(1f, 1f, 1f), 0, false);
- SetupCurve(m_RawLumVsSatCurve, new Color(1f, 1f, 1f), 0, false);
- }
-
- public override void OnInspectorGUI()
- {
- PropertyField(m_GradingMode);
-
- var gradingMode = (GradingMode)m_GradingMode.value.intValue;
-
- // Check if we're in gamma or linear and display a warning if we're trying to do hdr
- // color grading while being in gamma mode
- if (gradingMode != GradingMode.LowDefinitionRange)
- {
- if (QualitySettings.activeColorSpace == ColorSpace.Gamma)
- EditorGUILayout.HelpBox("ColorSpace in project settings is set to Gamma, HDR color grading won't look correct. Switch to Linear or use LDR color grading mode instead.", MessageType.Warning);
- }
-
- if (m_GradingMode.overrideState.boolValue && gradingMode == GradingMode.External)
- {
- if (!SystemInfo.supports3DRenderTextures || !SystemInfo.supportsComputeShaders)
- EditorGUILayout.HelpBox("HDR color grading requires compute shader & 3D render texture support.", MessageType.Warning);
- }
-
- if (gradingMode == GradingMode.LowDefinitionRange)
- DoStandardModeGUI(false);
- else if (gradingMode == GradingMode.HighDefinitionRange)
- DoStandardModeGUI(true);
- else if (gradingMode == GradingMode.External)
- DoExternalModeGUI();
-
- EditorGUILayout.Space();
- }
-
- void SetupCurve(SerializedProperty prop, Color color, uint minPointCount, bool loop)
- {
- var state = CurveEditor.CurveState.defaultState;
- state.color = color;
- state.visible = false;
- state.minPointCount = minPointCount;
- state.onlyShowHandlesOnSelection = true;
- state.zeroKeyConstantValue = 0.5f;
- state.loopInBounds = loop;
- m_CurveEditor.Add(prop, state);
- m_CurveDict.Add(prop, color);
- }
-
- void DoExternalModeGUI()
- {
- PropertyField(m_ExternalLut);
-
- var lut = m_ExternalLut.value.objectReferenceValue;
- if (lut != null)
- {
- if (lut.GetType() == typeof(Texture3D))
- {
- var o = (Texture3D)lut;
- if (o.width == o.height && o.height == o.depth)
- return;
- }
- else if (lut.GetType() == typeof(RenderTexture))
- {
- var o = (RenderTexture)lut;
- if (o.width == o.height && o.height == o.volumeDepth)
- return;
- }
-
- EditorGUILayout.HelpBox("Custom LUTs have to be log-encoded 3D textures or 3D render textures with cube format.", MessageType.Warning);
- }
- }
-
- void DoStandardModeGUI(bool hdr)
- {
- if (!hdr)
- {
- PropertyField(m_LdrLut);
-
- var lut = (target as ColorGrading).ldrLut.value;
- CheckLutImportSettings(lut);
- }
-
- if (hdr)
- {
- EditorGUILayout.Space();
- EditorUtilities.DrawHeaderLabel("Tonemapping");
- PropertyField(m_Tonemapper);
-
- if (m_Tonemapper.value.intValue == (int)Tonemapper.Custom)
- {
- DrawCustomToneCurve();
- PropertyField(m_ToneCurveToeStrength);
- PropertyField(m_ToneCurveToeLength);
- PropertyField(m_ToneCurveShoulderStrength);
- PropertyField(m_ToneCurveShoulderLength);
- PropertyField(m_ToneCurveShoulderAngle);
- PropertyField(m_ToneCurveGamma);
- }
- }
-
- EditorGUILayout.Space();
- EditorUtilities.DrawHeaderLabel("White Balance");
-
- PropertyField(m_Temperature);
- PropertyField(m_Tint);
-
- EditorGUILayout.Space();
- EditorUtilities.DrawHeaderLabel("Tone");
-
- if (hdr)
- PropertyField(m_PostExposure);
-
- PropertyField(m_ColorFilter);
- PropertyField(m_HueShift);
- PropertyField(m_Saturation);
-
- if (!hdr)
- PropertyField(m_Brightness);
-
- PropertyField(m_Contrast);
-
- EditorGUILayout.Space();
- int currentChannel = GlobalSettings.currentChannelMixer;
-
- using (new EditorGUILayout.HorizontalScope())
- {
- EditorGUILayout.PrefixLabel("Channel Mixer", GUIStyle.none, Styling.labelHeader);
-
- EditorGUI.BeginChangeCheck();
- {
- using (new EditorGUILayout.HorizontalScope())
- {
- GUILayoutUtility.GetRect(9f, 18f, GUILayout.ExpandWidth(false)); // Dirty hack to do proper right column alignement
- if (GUILayout.Toggle(currentChannel == 0, EditorUtilities.GetContent("Red|Red output channel."), EditorStyles.miniButtonLeft)) currentChannel = 0;
- if (GUILayout.Toggle(currentChannel == 1, EditorUtilities.GetContent("Green|Green output channel."), EditorStyles.miniButtonMid)) currentChannel = 1;
- if (GUILayout.Toggle(currentChannel == 2, EditorUtilities.GetContent("Blue|Blue output channel."), EditorStyles.miniButtonRight)) currentChannel = 2;
- }
- }
- if (EditorGUI.EndChangeCheck())
- GUI.FocusControl(null);
- }
-
- GlobalSettings.currentChannelMixer = currentChannel;
-
- if (currentChannel == 0)
- {
- PropertyField(m_MixerRedOutRedIn);
- PropertyField(m_MixerRedOutGreenIn);
- PropertyField(m_MixerRedOutBlueIn);
- }
- else if (currentChannel == 1)
- {
- PropertyField(m_MixerGreenOutRedIn);
- PropertyField(m_MixerGreenOutGreenIn);
- PropertyField(m_MixerGreenOutBlueIn);
- }
- else
- {
- PropertyField(m_MixerBlueOutRedIn);
- PropertyField(m_MixerBlueOutGreenIn);
- PropertyField(m_MixerBlueOutBlueIn);
- }
-
- EditorGUILayout.Space();
- EditorUtilities.DrawHeaderLabel("Trackballs");
-
- using (new EditorGUILayout.HorizontalScope())
- {
- PropertyField(m_Lift);
- GUILayout.Space(4f);
- PropertyField(m_Gamma);
- GUILayout.Space(4f);
- PropertyField(m_Gain);
- }
-
- EditorGUILayout.Space();
- EditorUtilities.DrawHeaderLabel("Grading Curves");
-
- DoCurvesGUI(hdr);
- }
-
- void CheckLutImportSettings(Texture lut)
- {
- if (lut != null)
- {
- var importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(lut)) as TextureImporter;
-
- // Fails when using an internal texture as you can't change import settings on
- // builtin resources, thus the check for null
- if (importer != null)
- {
- bool valid = importer.anisoLevel == 0
- && importer.mipmapEnabled == false
- && importer.sRGBTexture == false
- && importer.textureCompression == TextureImporterCompression.Uncompressed
- && importer.wrapMode == TextureWrapMode.Clamp;
-
- if (!valid)
- EditorUtilities.DrawFixMeBox("Invalid LUT import settings.", () => SetLutImportSettings(importer));
- }
- }
- }
-
- void SetLutImportSettings(TextureImporter importer)
- {
- importer.textureType = TextureImporterType.Default;
- importer.mipmapEnabled = false;
- importer.anisoLevel = 0;
- importer.sRGBTexture = false;
- importer.npotScale = TextureImporterNPOTScale.None;
- importer.textureCompression = TextureImporterCompression.Uncompressed;
- importer.alphaSource = TextureImporterAlphaSource.None;
- importer.wrapMode = TextureWrapMode.Clamp;
- importer.SaveAndReimport();
- AssetDatabase.Refresh();
- }
-
- void DrawCustomToneCurve()
- {
- EditorGUILayout.Space();
-
- // Reserve GUI space
- using (new GUILayout.HorizontalScope())
- {
- GUILayout.Space(EditorGUI.indentLevel * 15f);
- m_CustomToneCurveRect = GUILayoutUtility.GetRect(128, 80);
- }
-
- if (Event.current.type != EventType.Repaint)
- return;
-
- // Prepare curve data
- float toeStrength = m_ToneCurveToeStrength.value.floatValue;
- float toeLength = m_ToneCurveToeLength.value.floatValue;
- float shoulderStrength = m_ToneCurveShoulderStrength.value.floatValue;
- float shoulderLength = m_ToneCurveShoulderLength.value.floatValue;
- float shoulderAngle = m_ToneCurveShoulderAngle.value.floatValue;
- float gamma = m_ToneCurveGamma.value.floatValue;
- m_HableCurve.Init(
- toeStrength,
- toeLength,
- shoulderStrength,
- shoulderLength,
- shoulderAngle,
- gamma
- );
-
- float endPoint = m_HableCurve.whitePoint;
-
- // Background
- m_RectVertices[0] = PointInRect(0f, 0f, endPoint);
- m_RectVertices[1] = PointInRect(endPoint, 0f, endPoint);
- m_RectVertices[2] = PointInRect(endPoint, k_CustomToneCurveRangeY, endPoint);
- m_RectVertices[3] = PointInRect(0f, k_CustomToneCurveRangeY, endPoint);
- Handles.DrawSolidRectangleWithOutline(m_RectVertices, Color.white * 0.1f, Color.white * 0.4f);
-
- // Vertical guides
- if (endPoint < m_CustomToneCurveRect.width / 3)
- {
- int steps = Mathf.CeilToInt(endPoint);
- for (var i = 1; i < steps; i++)
- DrawLine(i, 0, i, k_CustomToneCurveRangeY, 0.4f, endPoint);
- }
-
- // Label
- Handles.Label(m_CustomToneCurveRect.position + Vector2.right, "Custom Tone Curve", EditorStyles.miniLabel);
-
- // Draw the acual curve
- var vcount = 0;
- while (vcount < k_CustomToneCurveResolution)
- {
- float x = endPoint * vcount / (k_CustomToneCurveResolution - 1);
- float y = m_HableCurve.Eval(x);
-
- if (y < k_CustomToneCurveRangeY)
- {
- m_CurveVertices[vcount++] = PointInRect(x, y, endPoint);
- }
- else
- {
- if (vcount > 1)
- {
- // Extend the last segment to the top edge of the rect.
- var v1 = m_CurveVertices[vcount - 2];
- var v2 = m_CurveVertices[vcount - 1];
- var clip = (m_CustomToneCurveRect.y - v1.y) / (v2.y - v1.y);
- m_CurveVertices[vcount - 1] = v1 + (v2 - v1) * clip;
- }
- break;
- }
- }
-
- if (vcount > 1)
- {
- Handles.color = Color.white * 0.9f;
- Handles.DrawAAPolyLine(2f, vcount, m_CurveVertices);
- }
- }
-
- void DrawLine(float x1, float y1, float x2, float y2, float grayscale, float rangeX)
- {
- m_LineVertices[0] = PointInRect(x1, y1, rangeX);
- m_LineVertices[1] = PointInRect(x2, y2, rangeX);
- Handles.color = Color.white * grayscale;
- Handles.DrawAAPolyLine(2f, m_LineVertices);
- }
-
- Vector3 PointInRect(float x, float y, float rangeX)
- {
- x = Mathf.Lerp(m_CustomToneCurveRect.x, m_CustomToneCurveRect.xMax, x / rangeX);
- y = Mathf.Lerp(m_CustomToneCurveRect.yMax, m_CustomToneCurveRect.y, y / k_CustomToneCurveRangeY);
- return new Vector3(x, y, 0);
- }
-
- void ResetVisibleCurves()
- {
- foreach (var curve in m_CurveDict)
- {
- var state = m_CurveEditor.GetCurveState(curve.Key);
- state.visible = false;
- m_CurveEditor.SetCurveState(curve.Key, state);
- }
- }
-
- void SetCurveVisible(SerializedProperty rawProp, SerializedProperty overrideProp)
- {
- var state = m_CurveEditor.GetCurveState(rawProp);
- state.visible = true;
- state.editable = overrideProp.boolValue;
- m_CurveEditor.SetCurveState(rawProp, state);
- }
-
- void CurveOverrideToggle(SerializedProperty overrideProp)
- {
- overrideProp.boolValue = GUILayout.Toggle(overrideProp.boolValue, EditorUtilities.GetContent("Override"), EditorStyles.toolbarButton);
- }
-
- static Material s_MaterialGrid;
-
- void DoCurvesGUI(bool hdr)
- {
- EditorGUILayout.Space();
- ResetVisibleCurves();
-
- using (new EditorGUI.DisabledGroupScope(serializedObject.isEditingMultipleObjects))
- {
- int curveEditingId = 0;
- SerializedProperty currentCurveRawProp = null;
-
- // Top toolbar
- using (new GUILayout.HorizontalScope(EditorStyles.toolbar))
- {
- curveEditingId = DoCurveSelectionPopup(GlobalSettings.currentCurve, hdr);
- curveEditingId = Mathf.Clamp(curveEditingId, hdr ? 4 : 0, 7);
-
- EditorGUILayout.Space();
-
- switch (curveEditingId)
- {
- case 0:
- CurveOverrideToggle(m_MasterCurve.overrideState);
- SetCurveVisible(m_RawMasterCurve, m_MasterCurve.overrideState);
- currentCurveRawProp = m_RawMasterCurve;
- break;
- case 1:
- CurveOverrideToggle(m_RedCurve.overrideState);
- SetCurveVisible(m_RawRedCurve, m_RedCurve.overrideState);
- currentCurveRawProp = m_RawRedCurve;
- break;
- case 2:
- CurveOverrideToggle(m_GreenCurve.overrideState);
- SetCurveVisible(m_RawGreenCurve, m_GreenCurve.overrideState);
- currentCurveRawProp = m_RawGreenCurve;
- break;
- case 3:
- CurveOverrideToggle(m_BlueCurve.overrideState);
- SetCurveVisible(m_RawBlueCurve, m_BlueCurve.overrideState);
- currentCurveRawProp = m_RawBlueCurve;
- break;
- case 4:
- CurveOverrideToggle(m_HueVsHueCurve.overrideState);
- SetCurveVisible(m_RawHueVsHueCurve, m_HueVsHueCurve.overrideState);
- currentCurveRawProp = m_RawHueVsHueCurve;
- break;
- case 5:
- CurveOverrideToggle(m_HueVsSatCurve.overrideState);
- SetCurveVisible(m_RawHueVsSatCurve, m_HueVsSatCurve.overrideState);
- currentCurveRawProp = m_RawHueVsSatCurve;
- break;
- case 6:
- CurveOverrideToggle(m_SatVsSatCurve.overrideState);
- SetCurveVisible(m_RawSatVsSatCurve, m_SatVsSatCurve.overrideState);
- currentCurveRawProp = m_RawSatVsSatCurve;
- break;
- case 7:
- CurveOverrideToggle(m_LumVsSatCurve.overrideState);
- SetCurveVisible(m_RawLumVsSatCurve, m_LumVsSatCurve.overrideState);
- currentCurveRawProp = m_RawLumVsSatCurve;
- break;
- }
-
- GUILayout.FlexibleSpace();
-
- if (GUILayout.Button("Reset", EditorStyles.toolbarButton))
- {
- switch (curveEditingId)
- {
- case 0: m_RawMasterCurve.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
- break;
- case 1: m_RawRedCurve.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
- break;
- case 2: m_RawGreenCurve.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
- break;
- case 3: m_RawBlueCurve.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
- break;
- case 4: m_RawHueVsHueCurve.animationCurveValue = new AnimationCurve();
- break;
- case 5: m_RawHueVsSatCurve.animationCurveValue = new AnimationCurve();
- break;
- case 6: m_RawSatVsSatCurve.animationCurveValue = new AnimationCurve();
- break;
- case 7: m_RawLumVsSatCurve.animationCurveValue = new AnimationCurve();
- break;
- }
- }
-
- GlobalSettings.currentCurve = curveEditingId;
- }
-
- // Curve area
- var settings = m_CurveEditor.settings;
- var rect = GUILayoutUtility.GetAspectRect(2f);
- var innerRect = settings.padding.Remove(rect);
-
- if (Event.current.type == EventType.Repaint)
- {
- // Background
- EditorGUI.DrawRect(rect, new Color(0.15f, 0.15f, 0.15f, 1f));
-
- if (curveEditingId == 4 || curveEditingId == 5)
- DrawBackgroundTexture(innerRect, 0);
- else if (curveEditingId == 6 || curveEditingId == 7)
- DrawBackgroundTexture(innerRect, 1);
-
- // Bounds
- Handles.color = Color.white * (GUI.enabled ? 1f : 0.5f);
- Handles.DrawSolidRectangleWithOutline(innerRect, Color.clear, new Color(0.8f, 0.8f, 0.8f, 0.5f));
-
- // Grid setup
- Handles.color = new Color(1f, 1f, 1f, 0.05f);
- int hLines = (int)Mathf.Sqrt(innerRect.width);
- int vLines = (int)(hLines / (innerRect.width / innerRect.height));
-
- // Vertical grid
- int gridOffset = Mathf.FloorToInt(innerRect.width / hLines);
- int gridPadding = ((int)(innerRect.width) % hLines) / 2;
-
- for (int i = 1; i < hLines; i++)
- {
- var offset = i * Vector2.right * gridOffset;
- offset.x += gridPadding;
- Handles.DrawLine(innerRect.position + offset, new Vector2(innerRect.x, innerRect.yMax - 1) + offset);
- }
-
- // Horizontal grid
- gridOffset = Mathf.FloorToInt(innerRect.height / vLines);
- gridPadding = ((int)(innerRect.height) % vLines) / 2;
-
- for (int i = 1; i < vLines; i++)
- {
- var offset = i * Vector2.up * gridOffset;
- offset.y += gridPadding;
- Handles.DrawLine(innerRect.position + offset, new Vector2(innerRect.xMax - 1, innerRect.y) + offset);
- }
- }
-
- // Curve editor
- if (m_CurveEditor.OnGUI(rect))
- {
- Repaint();
- GUI.changed = true;
- }
-
- if (Event.current.type == EventType.Repaint)
- {
- // Borders
- Handles.color = Color.black;
- Handles.DrawLine(new Vector2(rect.x, rect.y - 18f), new Vector2(rect.xMax, rect.y - 18f));
- Handles.DrawLine(new Vector2(rect.x, rect.y - 19f), new Vector2(rect.x, rect.yMax));
- Handles.DrawLine(new Vector2(rect.x, rect.yMax), new Vector2(rect.xMax, rect.yMax));
- Handles.DrawLine(new Vector2(rect.xMax, rect.yMax), new Vector2(rect.xMax, rect.y - 18f));
-
- bool editable = m_CurveEditor.GetCurveState(currentCurveRawProp).editable;
- string editableString = editable ? string.Empty : "(Not Overriding)\n";
-
- // Selection info
- var selection = m_CurveEditor.GetSelection();
- var infoRect = innerRect;
- infoRect.x += 5f;
- infoRect.width = 100f;
- infoRect.height = 30f;
-
- if (selection.curve != null && selection.keyframeIndex > -1)
- {
- var key = selection.keyframe.Value;
- GUI.Label(infoRect, string.Format("{0}\n{1}", key.time.ToString("F3"), key.value.ToString("F3")), Styling.preLabel);
- }
- else
- {
- GUI.Label(infoRect, editableString, Styling.preLabel);
- }
- }
- }
- }
-
- void DrawBackgroundTexture(Rect rect, int pass)
- {
- if (s_MaterialGrid == null)
- s_MaterialGrid = new Material(Shader.Find("Hidden/PostProcessing/Editor/CurveGrid")) { hideFlags = HideFlags.HideAndDontSave };
-
- float scale = EditorGUIUtility.pixelsPerPoint;
-
- #if UNITY_2018_1_OR_NEWER
- const RenderTextureReadWrite kReadWrite = RenderTextureReadWrite.sRGB;
- #else
- const RenderTextureReadWrite kReadWrite = RenderTextureReadWrite.Linear;
- #endif
-
- var oldRt = RenderTexture.active;
- var rt = RenderTexture.GetTemporary(Mathf.CeilToInt(rect.width * scale), Mathf.CeilToInt(rect.height * scale), 0, RenderTextureFormat.ARGB32, kReadWrite);
- s_MaterialGrid.SetFloat("_DisabledState", GUI.enabled ? 1f : 0.5f);
- s_MaterialGrid.SetFloat("_PixelScaling", EditorGUIUtility.pixelsPerPoint);
-
- Graphics.Blit(null, rt, s_MaterialGrid, pass);
- RenderTexture.active = oldRt;
-
- GUI.DrawTexture(rect, rt);
- RenderTexture.ReleaseTemporary(rt);
- }
-
- int DoCurveSelectionPopup(int id, bool hdr)
- {
- GUILayout.Label(s_Curves[id], EditorStyles.toolbarPopup, GUILayout.MaxWidth(150f));
-
- var lastRect = GUILayoutUtility.GetLastRect();
- var e = Event.current;
-
- if (e.type == EventType.MouseDown && e.button == 0 && lastRect.Contains(e.mousePosition))
- {
- var menu = new GenericMenu();
-
- for (int i = 0; i < s_Curves.Length; i++)
- {
- if (i == 4)
- menu.AddSeparator("");
-
- if (hdr && i < 4)
- menu.AddDisabledItem(s_Curves[i]);
- else
- {
- int current = i; // Capture local for closure
- menu.AddItem(s_Curves[i], current == id, () => GlobalSettings.currentCurve = current);
- }
- }
-
- menu.DropDown(new Rect(lastRect.xMin, lastRect.yMax, 1f, 1f));
- }
-
- return id;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ColorGradingEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ColorGradingEditor.cs.meta
deleted file mode 100644
index fdc2a13..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ColorGradingEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: f79c8927d684af6499f512361e23bace
-timeCreated: 1493026581
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DefaultPostProcessEffectEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DefaultPostProcessEffectEditor.cs
deleted file mode 100644
index f4f158d..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DefaultPostProcessEffectEditor.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public class DefaultPostProcessEffectEditor : PostProcessEffectBaseEditor
- {
- List m_Parameters;
-
- public override void OnEnable()
- {
- m_Parameters = new List();
-
- var fields = target.GetType()
- .GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
- .Where(t => t.FieldType.IsSubclassOf(typeof(ParameterOverride)) && t.Name != "enabled")
- .Where(t =>
- (t.IsPublic && t.GetCustomAttributes(typeof(NonSerializedAttribute), false).Length == 0)
- || (t.GetCustomAttributes(typeof(UnityEngine.SerializeField), false).Length > 0)
- )
- .ToList();
-
- foreach (var field in fields)
- {
- var property = serializedObject.FindProperty(field.Name);
- var attributes = field.GetCustomAttributes(false).Cast().ToArray();
- var parameter = new SerializedParameterOverride(property, attributes);
- m_Parameters.Add(parameter);
- }
- }
-
- public override void OnInspectorGUI()
- {
- foreach (var parameter in m_Parameters)
- PropertyField(parameter);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DefaultPostProcessEffectEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DefaultPostProcessEffectEditor.cs.meta
deleted file mode 100644
index 9289be6..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DefaultPostProcessEffectEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 4b0cd5ddb61a56b4f86ea0fd0a102fe7
-timeCreated: 1492705253
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DepthOfFieldEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DepthOfFieldEditor.cs
deleted file mode 100644
index 141d807..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DepthOfFieldEditor.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(DepthOfField))]
- public sealed class DepthOfFieldEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_FocusDistance;
- SerializedParameterOverride m_Aperture;
- SerializedParameterOverride m_FocalLength;
- SerializedParameterOverride m_KernelSize;
-
- public override void OnEnable()
- {
- m_FocusDistance = FindParameterOverride(x => x.focusDistance);
- m_Aperture = FindParameterOverride(x => x.aperture);
- m_FocalLength = FindParameterOverride(x => x.focalLength);
- m_KernelSize = FindParameterOverride(x => x.kernelSize);
- }
-
- public override void OnInspectorGUI()
- {
- if (SystemInfo.graphicsShaderLevel < 35)
- EditorGUILayout.HelpBox("Depth Of Field is only supported on the following platforms:\nDX11+, OpenGL 3.2+, OpenGL ES 3+, Metal, Vulkan, PS4/XB1 consoles.", MessageType.Warning);
-
- PropertyField(m_FocusDistance);
- PropertyField(m_Aperture);
- PropertyField(m_FocalLength);
- PropertyField(m_KernelSize);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DepthOfFieldEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DepthOfFieldEditor.cs.meta
deleted file mode 100644
index 826cd59..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/DepthOfFieldEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: eb4c0b518e013c8418135b3bd8a91b6c
-timeCreated: 1513004657
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ScreenSpaceReflectionsEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ScreenSpaceReflectionsEditor.cs
deleted file mode 100644
index 4163e88..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ScreenSpaceReflectionsEditor.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(ScreenSpaceReflections))]
- public sealed class ScreenSpaceReflectionsEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_Preset;
- SerializedParameterOverride m_MaximumIterationCount;
- SerializedParameterOverride m_Thickness;
- SerializedParameterOverride m_Resolution;
- SerializedParameterOverride m_MaximumMarchDistance;
- SerializedParameterOverride m_DistanceFade;
- SerializedParameterOverride m_Vignette;
-
- public override void OnEnable()
- {
- m_Preset = FindParameterOverride(x => x.preset);
- m_MaximumIterationCount = FindParameterOverride(x => x.maximumIterationCount);
- m_Thickness = FindParameterOverride(x => x.thickness);
- m_Resolution = FindParameterOverride(x => x.resolution);
- m_MaximumMarchDistance = FindParameterOverride(x => x.maximumMarchDistance);
- m_DistanceFade = FindParameterOverride(x => x.distanceFade);
- m_Vignette = FindParameterOverride(x => x.vignette);
- }
-
- public override void OnInspectorGUI()
- {
- if (RuntimeUtilities.scriptableRenderPipelineActive)
- {
- EditorGUILayout.HelpBox("This effect doesn't work with scriptable render pipelines yet.", MessageType.Warning);
- return;
- }
-
- if (Camera.main != null && Camera.main.actualRenderingPath != RenderingPath.DeferredShading)
- EditorGUILayout.HelpBox("This effect only works with the deferred rendering path.", MessageType.Warning);
-
- if (!SystemInfo.supportsComputeShaders)
- EditorGUILayout.HelpBox("This effect requires compute shader support.", MessageType.Warning);
-
- PropertyField(m_Preset);
-
- if (m_Preset.value.intValue == (int)ScreenSpaceReflectionPreset.Custom)
- {
- PropertyField(m_MaximumIterationCount);
- PropertyField(m_Thickness);
- PropertyField(m_Resolution);
-
- EditorGUILayout.Space();
- }
-
- PropertyField(m_MaximumMarchDistance);
- PropertyField(m_DistanceFade);
- PropertyField(m_Vignette);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ScreenSpaceReflectionsEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ScreenSpaceReflectionsEditor.cs.meta
deleted file mode 100644
index 1d8d116..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/ScreenSpaceReflectionsEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: d798d5719bf3b434eafb013385f872eb
-timeCreated: 1505226497
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/VignetteEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/VignetteEditor.cs
deleted file mode 100644
index cf4064f..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/VignetteEditor.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [PostProcessEditor(typeof(Vignette))]
- public sealed class VignetteEditor : PostProcessEffectEditor
- {
- SerializedParameterOverride m_Mode;
- SerializedParameterOverride m_Color;
-
- SerializedParameterOverride m_Center;
- SerializedParameterOverride m_Intensity;
- SerializedParameterOverride m_Smoothness;
- SerializedParameterOverride m_Roundness;
- SerializedParameterOverride m_Rounded;
-
- SerializedParameterOverride m_Mask;
- SerializedParameterOverride m_Opacity;
-
- public override void OnEnable()
- {
- m_Mode = FindParameterOverride(x => x.mode);
- m_Color = FindParameterOverride(x => x.color);
-
- m_Center = FindParameterOverride(x => x.center);
- m_Intensity = FindParameterOverride(x => x.intensity);
- m_Smoothness = FindParameterOverride(x => x.smoothness);
- m_Roundness = FindParameterOverride(x => x.roundness);
- m_Rounded = FindParameterOverride(x => x.rounded);
-
- m_Mask = FindParameterOverride(x => x.mask);
- m_Opacity = FindParameterOverride(x => x.opacity);
- }
-
- public override void OnInspectorGUI()
- {
- PropertyField(m_Mode);
- PropertyField(m_Color);
-
- if (m_Mode.value.intValue == (int)VignetteMode.Classic)
- {
- PropertyField(m_Center);
- PropertyField(m_Intensity);
- PropertyField(m_Smoothness);
- PropertyField(m_Roundness);
- PropertyField(m_Rounded);
- }
- else
- {
- PropertyField(m_Mask);
-
- var mask = (target as Vignette).mask.value;
-
- // Checks import settings on the mask
- if (mask != null)
- {
- var importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(mask)) as TextureImporter;
-
- // Fails when using an internal texture as you can't change import settings on
- // builtin resources, thus the check for null
- if (importer != null)
- {
- bool valid = importer.anisoLevel == 0
- && importer.mipmapEnabled == false
- && importer.alphaSource == TextureImporterAlphaSource.FromGrayScale
- && importer.textureCompression == TextureImporterCompression.Uncompressed
- && importer.wrapMode == TextureWrapMode.Clamp;
-
- if (!valid)
- EditorUtilities.DrawFixMeBox("Invalid mask import settings.", () => SetMaskImportSettings(importer));
- }
- }
-
- PropertyField(m_Opacity);
- }
- }
-
- void SetMaskImportSettings(TextureImporter importer)
- {
- importer.textureType = TextureImporterType.SingleChannel;
- importer.alphaSource = TextureImporterAlphaSource.FromGrayScale;
- importer.textureCompression = TextureImporterCompression.Uncompressed;
- importer.anisoLevel = 0;
- importer.mipmapEnabled = false;
- importer.wrapMode = TextureWrapMode.Clamp;
- importer.SaveAndReimport();
- AssetDatabase.Refresh();
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/VignetteEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/VignetteEditor.cs.meta
deleted file mode 100644
index d4da4fd..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Effects/VignetteEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 3869d037332a74744a54736f00d62763
-timeCreated: 1492696599
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models.meta
index 6ed3793..bbc125b 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 018e19d6c1b36224b85b5c0ddd6a895e
+guid: d5341d31985da604db4b100f174142ad
folderAsset: yes
-timeCreated: 1489051059
+timeCreated: 1466769808
licenseType: Pro
DefaultImporter:
userData:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AmbientOcclusionModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AmbientOcclusionModelEditor.cs
new file mode 100644
index 0000000..fef389e
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AmbientOcclusionModelEditor.cs
@@ -0,0 +1,42 @@
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = AmbientOcclusionModel.Settings;
+
+ [PostProcessingModelEditor(typeof(AmbientOcclusionModel))]
+ public class AmbientOcclusionModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_Intensity;
+ SerializedProperty m_Radius;
+ SerializedProperty m_SampleCount;
+ SerializedProperty m_Downsampling;
+ SerializedProperty m_ForceForwardCompatibility;
+ SerializedProperty m_AmbientOnly;
+ SerializedProperty m_HighPrecision;
+
+ public override void OnEnable()
+ {
+ m_Intensity = FindSetting((Settings x) => x.intensity);
+ m_Radius = FindSetting((Settings x) => x.radius);
+ m_SampleCount = FindSetting((Settings x) => x.sampleCount);
+ m_Downsampling = FindSetting((Settings x) => x.downsampling);
+ m_ForceForwardCompatibility = FindSetting((Settings x) => x.forceForwardCompatibility);
+ m_AmbientOnly = FindSetting((Settings x) => x.ambientOnly);
+ m_HighPrecision = FindSetting((Settings x) => x.highPrecision);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.PropertyField(m_Intensity);
+ EditorGUILayout.PropertyField(m_Radius);
+ EditorGUILayout.PropertyField(m_SampleCount);
+ EditorGUILayout.PropertyField(m_Downsampling);
+ EditorGUILayout.PropertyField(m_ForceForwardCompatibility);
+ EditorGUILayout.PropertyField(m_HighPrecision, EditorGUIHelper.GetContent("High Precision (Forward)"));
+
+ using (new EditorGUI.DisabledGroupScope(m_ForceForwardCompatibility.boolValue))
+ EditorGUILayout.PropertyField(m_AmbientOnly, EditorGUIHelper.GetContent("Ambient Only (Deferred + HDR)"));
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/BaseEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AmbientOcclusionModelEditor.cs.meta
similarity index 75%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/BaseEditor.cs.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AmbientOcclusionModelEditor.cs.meta
index f865b53..6e23d2e 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/BaseEditor.cs.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AmbientOcclusionModelEditor.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 69a4fc27499557744827c787d71fdf08
-timeCreated: 1488275908
+guid: 9fcb710e23a5a0546a3b8b0ca28c1720
+timeCreated: 1467190133
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AntialiasingModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AntialiasingModelEditor.cs
new file mode 100644
index 0000000..6f773a5
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AntialiasingModelEditor.cs
@@ -0,0 +1,71 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Method = AntialiasingModel.Method;
+ using Settings = AntialiasingModel.Settings;
+
+ [PostProcessingModelEditor(typeof(AntialiasingModel))]
+ public class AntialiasingModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_Method;
+
+ SerializedProperty m_FxaaPreset;
+
+ SerializedProperty m_TaaJitterSpread;
+ SerializedProperty m_TaaSharpen;
+ SerializedProperty m_TaaStationaryBlending;
+ SerializedProperty m_TaaMotionBlending;
+
+ static string[] s_MethodNames =
+ {
+ "Fast Approximate Anti-aliasing",
+ "Temporal Anti-aliasing"
+ };
+
+ public override void OnEnable()
+ {
+ m_Method = FindSetting((Settings x) => x.method);
+
+ m_FxaaPreset = FindSetting((Settings x) => x.fxaaSettings.preset);
+
+ m_TaaJitterSpread = FindSetting((Settings x) => x.taaSettings.jitterSpread);
+ m_TaaSharpen = FindSetting((Settings x) => x.taaSettings.sharpen);
+ m_TaaStationaryBlending = FindSetting((Settings x) => x.taaSettings.stationaryBlending);
+ m_TaaMotionBlending = FindSetting((Settings x) => x.taaSettings.motionBlending);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ m_Method.intValue = EditorGUILayout.Popup("Method", m_Method.intValue, s_MethodNames);
+
+ if (m_Method.intValue == (int)Method.Fxaa)
+ {
+ EditorGUILayout.PropertyField(m_FxaaPreset);
+ }
+ else if (m_Method.intValue == (int)Method.Taa)
+ {
+ if (QualitySettings.antiAliasing > 1)
+ EditorGUILayout.HelpBox("Temporal Anti-Aliasing doesn't work correctly when MSAA is enabled.", MessageType.Warning);
+
+ EditorGUILayout.LabelField("Jitter", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_TaaJitterSpread, EditorGUIHelper.GetContent("Spread"));
+ EditorGUI.indentLevel--;
+
+ EditorGUILayout.Space();
+
+ EditorGUILayout.LabelField("Blending", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_TaaStationaryBlending, EditorGUIHelper.GetContent("Stationary"));
+ EditorGUILayout.PropertyField(m_TaaMotionBlending, EditorGUIHelper.GetContent("Motion"));
+ EditorGUI.indentLevel--;
+
+ EditorGUILayout.Space();
+
+ EditorGUILayout.PropertyField(m_TaaSharpen);
+ }
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessEditorAttribute.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AntialiasingModelEditor.cs.meta
similarity index 75%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessEditorAttribute.cs.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AntialiasingModelEditor.cs.meta
index c28444c..3666322 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Attributes/PostProcessEditorAttribute.cs.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/AntialiasingModelEditor.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 70ea2ab329ffbac43a0a02daa61dbe6b
-timeCreated: 1492690987
+guid: 2451939fe695c1a408ba688219837667
+timeCreated: 1467190133
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BloomModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BloomModelEditor.cs
new file mode 100644
index 0000000..7359627
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BloomModelEditor.cs
@@ -0,0 +1,204 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = BloomModel.Settings;
+
+ [PostProcessingModelEditor(typeof(BloomModel))]
+ public class BloomModelEditor : PostProcessingModelEditor
+ {
+ struct BloomSettings
+ {
+ public SerializedProperty intensity;
+ public SerializedProperty threshold;
+ public SerializedProperty softKnee;
+ public SerializedProperty radius;
+ public SerializedProperty antiFlicker;
+ }
+
+ struct LensDirtSettings
+ {
+ public SerializedProperty texture;
+ public SerializedProperty intensity;
+ }
+
+ BloomSettings m_Bloom;
+ LensDirtSettings m_LensDirt;
+
+ public override void OnEnable()
+ {
+ m_Bloom = new BloomSettings
+ {
+ intensity = FindSetting((Settings x) => x.bloom.intensity),
+ threshold = FindSetting((Settings x) => x.bloom.threshold),
+ softKnee = FindSetting((Settings x) => x.bloom.softKnee),
+ radius = FindSetting((Settings x) => x.bloom.radius),
+ antiFlicker = FindSetting((Settings x) => x.bloom.antiFlicker)
+ };
+
+ m_LensDirt = new LensDirtSettings
+ {
+ texture = FindSetting((Settings x) => x.lensDirt.texture),
+ intensity = FindSetting((Settings x) => x.lensDirt.intensity)
+ };
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.Space();
+ PrepareGraph();
+ DrawGraph();
+ EditorGUILayout.Space();
+
+ EditorGUILayout.PropertyField(m_Bloom.intensity);
+ EditorGUILayout.PropertyField(m_Bloom.threshold, EditorGUIHelper.GetContent("Threshold (Gamma)"));
+ EditorGUILayout.PropertyField(m_Bloom.softKnee);
+ EditorGUILayout.PropertyField(m_Bloom.radius);
+ EditorGUILayout.PropertyField(m_Bloom.antiFlicker);
+
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Dirt", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_LensDirt.texture);
+ EditorGUILayout.PropertyField(m_LensDirt.intensity);
+ EditorGUI.indentLevel--;
+ }
+
+ #region Graph
+
+ float m_GraphThreshold;
+ float m_GraphKnee;
+ float m_GraphIntensity;
+
+ // Number of vertices in curve
+ const int k_CurveResolution = 48;
+
+ // Vertex buffers
+ Vector3[] m_RectVertices = new Vector3[4];
+ Vector3[] m_LineVertices = new Vector3[2];
+ Vector3[] m_CurveVertices = new Vector3[k_CurveResolution];
+
+ Rect m_RectGraph;
+ float m_RangeX;
+ float m_RangeY;
+
+ float ResponseFunction(float x)
+ {
+ var rq = Mathf.Clamp(x - m_GraphThreshold + m_GraphKnee, 0, m_GraphKnee * 2);
+ rq = rq * rq * 0.25f / m_GraphKnee;
+ return Mathf.Max(rq, x - m_GraphThreshold) * m_GraphIntensity;
+ }
+
+ // Transform a point into the graph rect
+ Vector3 PointInRect(float x, float y)
+ {
+ x = Mathf.Lerp(m_RectGraph.x, m_RectGraph.xMax, x / m_RangeX);
+ y = Mathf.Lerp(m_RectGraph.yMax, m_RectGraph.y, y / m_RangeY);
+ return new Vector3(x, y, 0);
+ }
+
+ // Draw a line in the graph rect
+ void DrawLine(float x1, float y1, float x2, float y2, float grayscale)
+ {
+ m_LineVertices[0] = PointInRect(x1, y1);
+ m_LineVertices[1] = PointInRect(x2, y2);
+ Handles.color = Color.white * grayscale;
+ Handles.DrawAAPolyLine(2.0f, m_LineVertices);
+ }
+
+ // Draw a rect in the graph rect
+ void DrawRect(float x1, float y1, float x2, float y2, float fill, float line)
+ {
+ m_RectVertices[0] = PointInRect(x1, y1);
+ m_RectVertices[1] = PointInRect(x2, y1);
+ m_RectVertices[2] = PointInRect(x2, y2);
+ m_RectVertices[3] = PointInRect(x1, y2);
+
+ Handles.DrawSolidRectangleWithOutline(
+ m_RectVertices,
+ fill < 0 ? Color.clear : Color.white * fill,
+ line < 0 ? Color.clear : Color.white * line
+ );
+ }
+
+ // Update internal state with a given bloom instance
+ public void PrepareGraph()
+ {
+ var bloom = (BloomModel)target;
+ m_RangeX = 5f;
+ m_RangeY = 2f;
+
+ m_GraphThreshold = bloom.settings.bloom.thresholdLinear;
+ m_GraphKnee = bloom.settings.bloom.softKnee * m_GraphThreshold + 1e-5f;
+
+ // Intensity is capped to prevent sampling errors
+ m_GraphIntensity = Mathf.Min(bloom.settings.bloom.intensity, 10f);
+ }
+
+ // Draw the graph at the current position
+ public void DrawGraph()
+ {
+ using (new GUILayout.HorizontalScope())
+ {
+ GUILayout.Space(EditorGUI.indentLevel * 15f);
+ m_RectGraph = GUILayoutUtility.GetRect(128, 80);
+ }
+
+ // Background
+ DrawRect(0, 0, m_RangeX, m_RangeY, 0.1f, 0.4f);
+
+ // Soft-knee range
+ DrawRect(m_GraphThreshold - m_GraphKnee, 0, m_GraphThreshold + m_GraphKnee, m_RangeY, 0.25f, -1);
+
+ // Horizontal lines
+ for (var i = 1; i < m_RangeY; i++)
+ DrawLine(0, i, m_RangeX, i, 0.4f);
+
+ // Vertical lines
+ for (var i = 1; i < m_RangeX; i++)
+ DrawLine(i, 0, i, m_RangeY, 0.4f);
+
+ // Label
+ Handles.Label(
+ PointInRect(0, m_RangeY) + Vector3.right,
+ "Brightness Response (linear)", EditorStyles.miniLabel
+ );
+
+ // Threshold line
+ DrawLine(m_GraphThreshold, 0, m_GraphThreshold, m_RangeY, 0.6f);
+
+ // Response curve
+ var vcount = 0;
+ while (vcount < k_CurveResolution)
+ {
+ var x = m_RangeX * vcount / (k_CurveResolution - 1);
+ var y = ResponseFunction(x);
+ if (y < m_RangeY)
+ {
+ m_CurveVertices[vcount++] = PointInRect(x, y);
+ }
+ else
+ {
+ if (vcount > 1)
+ {
+ // Extend the last segment to the top edge of the rect.
+ var v1 = m_CurveVertices[vcount - 2];
+ var v2 = m_CurveVertices[vcount - 1];
+ var clip = (m_RectGraph.y - v1.y) / (v2.y - v1.y);
+ m_CurveVertices[vcount - 1] = v1 + (v2 - v1) * clip;
+ }
+ break;
+ }
+ }
+
+ if (vcount > 1)
+ {
+ Handles.color = Color.white * 0.9f;
+ Handles.DrawAAPolyLine(2.0f, vcount, m_CurveVertices);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/AttributeDecorator.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BloomModelEditor.cs.meta
similarity index 75%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/AttributeDecorator.cs.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BloomModelEditor.cs.meta
index ffd22a3..85bad16 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators/AttributeDecorator.cs.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BloomModelEditor.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 6b2666165a17bbd4e851c1382898651e
-timeCreated: 1493051184
+guid: a95f3f10e7e437c49ade656f531b30d2
+timeCreated: 1467190133
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BuiltinDebugViewsEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BuiltinDebugViewsEditor.cs
new file mode 100644
index 0000000..eefc102
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BuiltinDebugViewsEditor.cs
@@ -0,0 +1,106 @@
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Mode = BuiltinDebugViewsModel.Mode;
+ using Settings = BuiltinDebugViewsModel.Settings;
+
+ [PostProcessingModelEditor(typeof(BuiltinDebugViewsModel), alwaysEnabled: true)]
+ public class BuiltinDebugViewsEditor : PostProcessingModelEditor
+ {
+ struct DepthSettings
+ {
+ public SerializedProperty scale;
+ }
+
+ struct MotionVectorsSettings
+ {
+ public SerializedProperty sourceOpacity;
+ public SerializedProperty motionImageOpacity;
+ public SerializedProperty motionImageAmplitude;
+ public SerializedProperty motionVectorsOpacity;
+ public SerializedProperty motionVectorsResolution;
+ public SerializedProperty motionVectorsAmplitude;
+ }
+
+ SerializedProperty m_Mode;
+ DepthSettings m_Depth;
+ MotionVectorsSettings m_MotionVectors;
+
+ public override void OnEnable()
+ {
+ m_Mode = FindSetting((Settings x) => x.mode);
+
+ m_Depth = new DepthSettings
+ {
+ scale = FindSetting((Settings x) => x.depth.scale)
+ };
+
+ m_MotionVectors = new MotionVectorsSettings
+ {
+ sourceOpacity = FindSetting((Settings x) => x.motionVectors.sourceOpacity),
+ motionImageOpacity = FindSetting((Settings x) => x.motionVectors.motionImageOpacity),
+ motionImageAmplitude = FindSetting((Settings x) => x.motionVectors.motionImageAmplitude),
+ motionVectorsOpacity = FindSetting((Settings x) => x.motionVectors.motionVectorsOpacity),
+ motionVectorsResolution = FindSetting((Settings x) => x.motionVectors.motionVectorsResolution),
+ motionVectorsAmplitude = FindSetting((Settings x) => x.motionVectors.motionVectorsAmplitude),
+ };
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.PropertyField(m_Mode);
+
+ int mode = m_Mode.intValue;
+
+ if (mode == (int)Mode.Depth)
+ {
+ EditorGUILayout.PropertyField(m_Depth.scale);
+ }
+ else if (mode == (int)Mode.MotionVectors)
+ {
+ EditorGUILayout.HelpBox("Switch to play mode to see motion vectors.", MessageType.Info);
+
+ EditorGUILayout.LabelField("Source Image", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_MotionVectors.sourceOpacity, EditorGUIHelper.GetContent("Opacity"));
+ EditorGUI.indentLevel--;
+
+ EditorGUILayout.Space();
+
+ EditorGUILayout.LabelField("Motion Vectors (overlay)", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+
+ if (m_MotionVectors.motionImageOpacity.floatValue > 0f)
+ EditorGUILayout.HelpBox("Please keep opacity to 0 if you're subject to motion sickness.", MessageType.Warning);
+
+ EditorGUILayout.PropertyField(m_MotionVectors.motionImageOpacity, EditorGUIHelper.GetContent("Opacity"));
+ EditorGUILayout.PropertyField(m_MotionVectors.motionImageAmplitude, EditorGUIHelper.GetContent("Amplitude"));
+ EditorGUI.indentLevel--;
+
+ EditorGUILayout.Space();
+
+ EditorGUILayout.LabelField("Motion Vectors (arrows)", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_MotionVectors.motionVectorsOpacity, EditorGUIHelper.GetContent("Opacity"));
+ EditorGUILayout.PropertyField(m_MotionVectors.motionVectorsResolution, EditorGUIHelper.GetContent("Resolution"));
+ EditorGUILayout.PropertyField(m_MotionVectors.motionVectorsAmplitude, EditorGUIHelper.GetContent("Amplitude"));
+ EditorGUI.indentLevel--;
+ }
+ else
+ {
+ CheckActiveEffect(mode == (int)Mode.AmbientOcclusion && !profile.ambientOcclusion.enabled, "Ambient Occlusion");
+ CheckActiveEffect(mode == (int)Mode.FocusPlane && !profile.depthOfField.enabled, "Depth Of Field");
+ CheckActiveEffect(mode == (int)Mode.EyeAdaptation && !profile.eyeAdaptation.enabled, "Eye Adaptation");
+ CheckActiveEffect((mode == (int)Mode.LogLut || mode == (int)Mode.PreGradingLog) && !profile.colorGrading.enabled, "Color Grading");
+ CheckActiveEffect(mode == (int)Mode.UserLut && !profile.userLut.enabled, "User Lut");
+ }
+ }
+
+ void CheckActiveEffect(bool expr, string name)
+ {
+ if (expr)
+ EditorGUILayout.HelpBox(string.Format("{0} isn't enabled, the debug view won't work.", name), MessageType.Warning);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BuiltinDebugViewsEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BuiltinDebugViewsEditor.cs.meta
new file mode 100644
index 0000000..2f9e0a8
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/BuiltinDebugViewsEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 760ffebbef2ed644c87940a699eb7fe6
+timeCreated: 1468237035
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ChromaticAberrationEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ChromaticAberrationEditor.cs
new file mode 100644
index 0000000..2337de0
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ChromaticAberrationEditor.cs
@@ -0,0 +1,9 @@
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ [PostProcessingModelEditor(typeof(ChromaticAberrationModel))]
+ public class ChromaticaAberrationModelEditor : DefaultPostFxModelEditor
+ {
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ChromaticAberrationEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ChromaticAberrationEditor.cs.meta
new file mode 100644
index 0000000..9929d9b
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ChromaticAberrationEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8a713f71a0169794a915a081f6242f60
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ColorGradingModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ColorGradingModelEditor.cs
new file mode 100644
index 0000000..8d73982
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ColorGradingModelEditor.cs
@@ -0,0 +1,672 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = ColorGradingModel.Settings;
+ using Tonemapper = ColorGradingModel.Tonemapper;
+ using ColorWheelMode = ColorGradingModel.ColorWheelMode;
+
+ [PostProcessingModelEditor(typeof(ColorGradingModel))]
+ public class ColorGradingModelEditor : PostProcessingModelEditor
+ {
+ static GUIContent[] s_Tonemappers =
+ {
+ new GUIContent("None"),
+ new GUIContent("Filmic (ACES)"),
+ new GUIContent("Neutral")
+ };
+
+ struct TonemappingSettings
+ {
+ public SerializedProperty tonemapper;
+ public SerializedProperty neutralBlackIn;
+ public SerializedProperty neutralWhiteIn;
+ public SerializedProperty neutralBlackOut;
+ public SerializedProperty neutralWhiteOut;
+ public SerializedProperty neutralWhiteLevel;
+ public SerializedProperty neutralWhiteClip;
+ }
+
+ struct BasicSettings
+ {
+ public SerializedProperty exposure;
+ public SerializedProperty temperature;
+ public SerializedProperty tint;
+ public SerializedProperty hueShift;
+ public SerializedProperty saturation;
+ public SerializedProperty contrast;
+ }
+
+ struct ChannelMixerSettings
+ {
+ public SerializedProperty[] channels;
+ public SerializedProperty currentEditingChannel;
+ }
+
+ struct ColorWheelsSettings
+ {
+ public SerializedProperty mode;
+ public SerializedProperty log;
+ public SerializedProperty linear;
+ }
+
+ static GUIContent[] s_Curves =
+ {
+ new GUIContent("YRGB"),
+ new GUIContent("Hue VS Hue"),
+ new GUIContent("Hue VS Sat"),
+ new GUIContent("Sat VS Sat"),
+ new GUIContent("Lum VS Sat")
+ };
+
+ struct CurvesSettings
+ {
+ public SerializedProperty master;
+ public SerializedProperty red;
+ public SerializedProperty green;
+ public SerializedProperty blue;
+
+ public SerializedProperty hueVShue;
+ public SerializedProperty hueVSsat;
+ public SerializedProperty satVSsat;
+ public SerializedProperty lumVSsat;
+
+ public SerializedProperty currentEditingCurve;
+ public SerializedProperty curveY;
+ public SerializedProperty curveR;
+ public SerializedProperty curveG;
+ public SerializedProperty curveB;
+ }
+
+ TonemappingSettings m_Tonemapping;
+ BasicSettings m_Basic;
+ ChannelMixerSettings m_ChannelMixer;
+ ColorWheelsSettings m_ColorWheels;
+ CurvesSettings m_Curves;
+
+ CurveEditor m_CurveEditor;
+ Dictionary m_CurveDict;
+
+ // Neutral tonemapping curve helper
+ const int k_CurveResolution = 24;
+ const float k_NeutralRangeX = 2f;
+ const float k_NeutralRangeY = 1f;
+ Vector3[] m_RectVertices = new Vector3[4];
+ Vector3[] m_LineVertices = new Vector3[2];
+ Vector3[] m_CurveVertices = new Vector3[k_CurveResolution];
+ Rect m_NeutralCurveRect;
+
+ public override void OnEnable()
+ {
+ // Tonemapping settings
+ m_Tonemapping = new TonemappingSettings
+ {
+ tonemapper = FindSetting((Settings x) => x.tonemapping.tonemapper),
+ neutralBlackIn = FindSetting((Settings x) => x.tonemapping.neutralBlackIn),
+ neutralWhiteIn = FindSetting((Settings x) => x.tonemapping.neutralWhiteIn),
+ neutralBlackOut = FindSetting((Settings x) => x.tonemapping.neutralBlackOut),
+ neutralWhiteOut = FindSetting((Settings x) => x.tonemapping.neutralWhiteOut),
+ neutralWhiteLevel = FindSetting((Settings x) => x.tonemapping.neutralWhiteLevel),
+ neutralWhiteClip = FindSetting((Settings x) => x.tonemapping.neutralWhiteClip)
+ };
+
+ // Basic settings
+ m_Basic = new BasicSettings
+ {
+ exposure = FindSetting((Settings x) => x.basic.postExposure),
+ temperature = FindSetting((Settings x) => x.basic.temperature),
+ tint = FindSetting((Settings x) => x.basic.tint),
+ hueShift = FindSetting((Settings x) => x.basic.hueShift),
+ saturation = FindSetting((Settings x) => x.basic.saturation),
+ contrast = FindSetting((Settings x) => x.basic.contrast)
+ };
+
+ // Channel mixer
+ m_ChannelMixer = new ChannelMixerSettings
+ {
+ channels = new[]
+ {
+ FindSetting((Settings x) => x.channelMixer.red),
+ FindSetting((Settings x) => x.channelMixer.green),
+ FindSetting((Settings x) => x.channelMixer.blue)
+ },
+ currentEditingChannel = FindSetting((Settings x) => x.channelMixer.currentEditingChannel)
+ };
+
+ // Color wheels
+ m_ColorWheels = new ColorWheelsSettings
+ {
+ mode = FindSetting((Settings x) => x.colorWheels.mode),
+ log = FindSetting((Settings x) => x.colorWheels.log),
+ linear = FindSetting((Settings x) => x.colorWheels.linear)
+ };
+
+ // Curves
+ m_Curves = new CurvesSettings
+ {
+ master = FindSetting((Settings x) => x.curves.master.curve),
+ red = FindSetting((Settings x) => x.curves.red.curve),
+ green = FindSetting((Settings x) => x.curves.green.curve),
+ blue = FindSetting((Settings x) => x.curves.blue.curve),
+
+ hueVShue = FindSetting((Settings x) => x.curves.hueVShue.curve),
+ hueVSsat = FindSetting((Settings x) => x.curves.hueVSsat.curve),
+ satVSsat = FindSetting((Settings x) => x.curves.satVSsat.curve),
+ lumVSsat = FindSetting((Settings x) => x.curves.lumVSsat.curve),
+
+ currentEditingCurve = FindSetting((Settings x) => x.curves.e_CurrentEditingCurve),
+ curveY = FindSetting((Settings x) => x.curves.e_CurveY),
+ curveR = FindSetting((Settings x) => x.curves.e_CurveR),
+ curveG = FindSetting((Settings x) => x.curves.e_CurveG),
+ curveB = FindSetting((Settings x) => x.curves.e_CurveB)
+ };
+
+ // Prepare the curve editor and extract curve display settings
+ m_CurveDict = new Dictionary();
+
+ var settings = CurveEditor.Settings.defaultSettings;
+
+ m_CurveEditor = new CurveEditor(settings);
+ AddCurve(m_Curves.master, new Color(1f, 1f, 1f), 2, false);
+ AddCurve(m_Curves.red, new Color(1f, 0f, 0f), 2, false);
+ AddCurve(m_Curves.green, new Color(0f, 1f, 0f), 2, false);
+ AddCurve(m_Curves.blue, new Color(0f, 0.5f, 1f), 2, false);
+ AddCurve(m_Curves.hueVShue, new Color(1f, 1f, 1f), 0, true);
+ AddCurve(m_Curves.hueVSsat, new Color(1f, 1f, 1f), 0, true);
+ AddCurve(m_Curves.satVSsat, new Color(1f, 1f, 1f), 0, false);
+ AddCurve(m_Curves.lumVSsat, new Color(1f, 1f, 1f), 0, false);
+ }
+
+ void AddCurve(SerializedProperty prop, Color color, uint minPointCount, bool loop)
+ {
+ var state = CurveEditor.CurveState.defaultState;
+ state.color = color;
+ state.visible = false;
+ state.minPointCount = minPointCount;
+ state.onlyShowHandlesOnSelection = true;
+ state.zeroKeyConstantValue = 0.5f;
+ state.loopInBounds = loop;
+ m_CurveEditor.Add(prop, state);
+ m_CurveDict.Add(prop, color);
+ }
+
+ public override void OnDisable()
+ {
+ m_CurveEditor.RemoveAll();
+ }
+
+ public override void OnInspectorGUI()
+ {
+ DoGUIFor("Tonemapping", DoTonemappingGUI);
+ EditorGUILayout.Space();
+ DoGUIFor("Basic", DoBasicGUI);
+ EditorGUILayout.Space();
+ DoGUIFor("Channel Mixer", DoChannelMixerGUI);
+ EditorGUILayout.Space();
+ DoGUIFor("Trackballs", DoColorWheelsGUI);
+ EditorGUILayout.Space();
+ DoGUIFor("Grading Curves", DoCurvesGUI);
+ }
+
+ void DoGUIFor(string title, Action func)
+ {
+ EditorGUILayout.LabelField(title, EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ func();
+ EditorGUI.indentLevel--;
+ }
+
+ void DoTonemappingGUI()
+ {
+ int tid = EditorGUILayout.Popup(EditorGUIHelper.GetContent("Tonemapper"), m_Tonemapping.tonemapper.intValue, s_Tonemappers);
+
+ if (tid == (int)Tonemapper.Neutral)
+ {
+ DrawNeutralTonemappingCurve();
+
+ EditorGUILayout.PropertyField(m_Tonemapping.neutralBlackIn, EditorGUIHelper.GetContent("Black In"));
+ EditorGUILayout.PropertyField(m_Tonemapping.neutralWhiteIn, EditorGUIHelper.GetContent("White In"));
+ EditorGUILayout.PropertyField(m_Tonemapping.neutralBlackOut, EditorGUIHelper.GetContent("Black Out"));
+ EditorGUILayout.PropertyField(m_Tonemapping.neutralWhiteOut, EditorGUIHelper.GetContent("White Out"));
+ EditorGUILayout.PropertyField(m_Tonemapping.neutralWhiteLevel, EditorGUIHelper.GetContent("White Level"));
+ EditorGUILayout.PropertyField(m_Tonemapping.neutralWhiteClip, EditorGUIHelper.GetContent("White Clip"));
+ }
+
+ m_Tonemapping.tonemapper.intValue = tid;
+ }
+
+ void DrawNeutralTonemappingCurve()
+ {
+ using (new GUILayout.HorizontalScope())
+ {
+ GUILayout.Space(EditorGUI.indentLevel * 15f);
+ m_NeutralCurveRect = GUILayoutUtility.GetRect(128, 80);
+ }
+
+ // Background
+ m_RectVertices[0] = PointInRect( 0f, 0f);
+ m_RectVertices[1] = PointInRect(k_NeutralRangeX, 0f);
+ m_RectVertices[2] = PointInRect(k_NeutralRangeX, k_NeutralRangeY);
+ m_RectVertices[3] = PointInRect( 0f, k_NeutralRangeY);
+
+ Handles.DrawSolidRectangleWithOutline(
+ m_RectVertices,
+ Color.white * 0.1f,
+ Color.white * 0.4f
+ );
+
+ // Horizontal lines
+ for (var i = 1; i < k_NeutralRangeY; i++)
+ DrawLine(0, i, k_NeutralRangeX, i, 0.4f);
+
+ // Vertical lines
+ for (var i = 1; i < k_NeutralRangeX; i++)
+ DrawLine(i, 0, i, k_NeutralRangeY, 0.4f);
+
+ // Label
+ Handles.Label(
+ PointInRect(0, k_NeutralRangeY) + Vector3.right,
+ "Neutral Tonemapper", EditorStyles.miniLabel
+ );
+
+ // Precompute some values
+ var tonemap = ((ColorGradingModel)target).settings.tonemapping;
+
+ const float scaleFactor = 20f;
+ const float scaleFactorHalf = scaleFactor * 0.5f;
+
+ float inBlack = tonemap.neutralBlackIn * scaleFactor + 1f;
+ float outBlack = tonemap.neutralBlackOut * scaleFactorHalf + 1f;
+ float inWhite = tonemap.neutralWhiteIn / scaleFactor;
+ float outWhite = 1f - tonemap.neutralWhiteOut / scaleFactor;
+ float blackRatio = inBlack / outBlack;
+ float whiteRatio = inWhite / outWhite;
+
+ const float a = 0.2f;
+ float b = Mathf.Max(0f, Mathf.LerpUnclamped(0.57f, 0.37f, blackRatio));
+ float c = Mathf.LerpUnclamped(0.01f, 0.24f, whiteRatio);
+ float d = Mathf.Max(0f, Mathf.LerpUnclamped(0.02f, 0.20f, blackRatio));
+ const float e = 0.02f;
+ const float f = 0.30f;
+ float whiteLevel = tonemap.neutralWhiteLevel;
+ float whiteClip = tonemap.neutralWhiteClip / scaleFactorHalf;
+
+ // Tonemapping curve
+ var vcount = 0;
+ while (vcount < k_CurveResolution)
+ {
+ float x = k_NeutralRangeX * vcount / (k_CurveResolution - 1);
+ float y = NeutralTonemap(x, a, b, c, d, e, f, whiteLevel, whiteClip);
+
+ if (y < k_NeutralRangeY)
+ {
+ m_CurveVertices[vcount++] = PointInRect(x, y);
+ }
+ else
+ {
+ if (vcount > 1)
+ {
+ // Extend the last segment to the top edge of the rect.
+ var v1 = m_CurveVertices[vcount - 2];
+ var v2 = m_CurveVertices[vcount - 1];
+ var clip = (m_NeutralCurveRect.y - v1.y) / (v2.y - v1.y);
+ m_CurveVertices[vcount - 1] = v1 + (v2 - v1) * clip;
+ }
+ break;
+ }
+ }
+
+ if (vcount > 1)
+ {
+ Handles.color = Color.white * 0.9f;
+ Handles.DrawAAPolyLine(2.0f, vcount, m_CurveVertices);
+ }
+ }
+
+ void DrawLine(float x1, float y1, float x2, float y2, float grayscale)
+ {
+ m_LineVertices[0] = PointInRect(x1, y1);
+ m_LineVertices[1] = PointInRect(x2, y2);
+ Handles.color = Color.white * grayscale;
+ Handles.DrawAAPolyLine(2f, m_LineVertices);
+ }
+
+ Vector3 PointInRect(float x, float y)
+ {
+ x = Mathf.Lerp(m_NeutralCurveRect.x, m_NeutralCurveRect.xMax, x / k_NeutralRangeX);
+ y = Mathf.Lerp(m_NeutralCurveRect.yMax, m_NeutralCurveRect.y, y / k_NeutralRangeY);
+ return new Vector3(x, y, 0);
+ }
+
+ float NeutralCurve(float x, float a, float b, float c, float d, float e, float f)
+ {
+ return ((x * (a * x + c * b) + d * e) / (x * (a * x + b) + d * f)) - e / f;
+ }
+
+ float NeutralTonemap(float x, float a, float b, float c, float d, float e, float f, float whiteLevel, float whiteClip)
+ {
+ x = Mathf.Max(0f, x);
+
+ // Tonemap
+ float whiteScale = 1f / NeutralCurve(whiteLevel, a, b, c, d, e, f);
+ x = NeutralCurve(x * whiteScale, a, b, c, d, e, f);
+ x *= whiteScale;
+
+ // Post-curve white point adjustment
+ x /= whiteClip;
+
+ return x;
+ }
+
+ void DoBasicGUI()
+ {
+ EditorGUILayout.PropertyField(m_Basic.exposure, EditorGUIHelper.GetContent("Post Exposure (EV)"));
+ EditorGUILayout.PropertyField(m_Basic.temperature);
+ EditorGUILayout.PropertyField(m_Basic.tint);
+ EditorGUILayout.PropertyField(m_Basic.hueShift);
+ EditorGUILayout.PropertyField(m_Basic.saturation);
+ EditorGUILayout.PropertyField(m_Basic.contrast);
+ }
+
+ void DoChannelMixerGUI()
+ {
+ int currentChannel = m_ChannelMixer.currentEditingChannel.intValue;
+
+ EditorGUI.BeginChangeCheck();
+ {
+ using (new EditorGUILayout.HorizontalScope())
+ {
+ EditorGUILayout.PrefixLabel("Channel");
+ if (GUILayout.Toggle(currentChannel == 0, EditorGUIHelper.GetContent("Red|Red output channel."), EditorStyles.miniButtonLeft)) currentChannel = 0;
+ if (GUILayout.Toggle(currentChannel == 1, EditorGUIHelper.GetContent("Green|Green output channel."), EditorStyles.miniButtonMid)) currentChannel = 1;
+ if (GUILayout.Toggle(currentChannel == 2, EditorGUIHelper.GetContent("Blue|Blue output channel."), EditorStyles.miniButtonRight)) currentChannel = 2;
+ }
+ }
+ if (EditorGUI.EndChangeCheck())
+ {
+ GUI.FocusControl(null);
+ }
+
+ var serializedChannel = m_ChannelMixer.channels[currentChannel];
+ m_ChannelMixer.currentEditingChannel.intValue = currentChannel;
+
+ var v = serializedChannel.vector3Value;
+ v.x = EditorGUILayout.Slider(EditorGUIHelper.GetContent("Red|Modify influence of the red channel within the overall mix."), v.x, -2f, 2f);
+ v.y = EditorGUILayout.Slider(EditorGUIHelper.GetContent("Green|Modify influence of the green channel within the overall mix."), v.y, -2f, 2f);
+ v.z = EditorGUILayout.Slider(EditorGUIHelper.GetContent("Blue|Modify influence of the blue channel within the overall mix."), v.z, -2f, 2f);
+ serializedChannel.vector3Value = v;
+ }
+
+ void DoColorWheelsGUI()
+ {
+ int wheelMode = m_ColorWheels.mode.intValue;
+
+ using (new EditorGUILayout.HorizontalScope())
+ {
+ GUILayout.Space(15);
+ if (GUILayout.Toggle(wheelMode == (int)ColorWheelMode.Linear, "Linear", EditorStyles.miniButtonLeft)) wheelMode = (int)ColorWheelMode.Linear;
+ if (GUILayout.Toggle(wheelMode == (int)ColorWheelMode.Log, "Log", EditorStyles.miniButtonRight)) wheelMode = (int)ColorWheelMode.Log;
+ }
+
+ m_ColorWheels.mode.intValue = wheelMode;
+ EditorGUILayout.Space();
+
+ if (wheelMode == (int)ColorWheelMode.Linear)
+ {
+ EditorGUILayout.PropertyField(m_ColorWheels.linear);
+ WheelSetTitle(GUILayoutUtility.GetLastRect(), "Linear Controls");
+ }
+ else if (wheelMode == (int)ColorWheelMode.Log)
+ {
+ EditorGUILayout.PropertyField(m_ColorWheels.log);
+ WheelSetTitle(GUILayoutUtility.GetLastRect(), "Log Controls");
+ }
+ }
+
+ static void WheelSetTitle(Rect position, string label)
+ {
+ var matrix = GUI.matrix;
+ var rect = new Rect(position.x - 10f, position.y, TrackballGroupDrawer.m_Size, TrackballGroupDrawer.m_Size);
+ GUIUtility.RotateAroundPivot(-90f, rect.center);
+ GUI.Label(rect, label, FxStyles.centeredMiniLabel);
+ GUI.matrix = matrix;
+ }
+
+ void ResetVisibleCurves()
+ {
+ foreach (var curve in m_CurveDict)
+ {
+ var state = m_CurveEditor.GetCurveState(curve.Key);
+ state.visible = false;
+ m_CurveEditor.SetCurveState(curve.Key, state);
+ }
+ }
+
+ void SetCurveVisible(SerializedProperty prop)
+ {
+ var state = m_CurveEditor.GetCurveState(prop);
+ state.visible = true;
+ m_CurveEditor.SetCurveState(prop, state);
+ }
+
+ bool SpecialToggle(bool value, string name, out bool rightClicked)
+ {
+ var rect = GUILayoutUtility.GetRect(EditorGUIHelper.GetContent(name), EditorStyles.toolbarButton);
+
+ var e = Event.current;
+ rightClicked = (e.type == EventType.MouseUp && rect.Contains(e.mousePosition) && e.button == 1);
+
+ return GUI.Toggle(rect, value, name, EditorStyles.toolbarButton);
+ }
+
+ static Material s_MaterialSpline;
+
+ void DoCurvesGUI()
+ {
+ EditorGUILayout.Space();
+ EditorGUI.indentLevel -= 2;
+ ResetVisibleCurves();
+
+ using (new EditorGUI.DisabledGroupScope(serializedProperty.serializedObject.isEditingMultipleObjects))
+ {
+ int curveEditingId = 0;
+
+ // Top toolbar
+ using (new GUILayout.HorizontalScope(EditorStyles.toolbar))
+ {
+ curveEditingId = EditorGUILayout.Popup(m_Curves.currentEditingCurve.intValue, s_Curves, EditorStyles.toolbarPopup, GUILayout.MaxWidth(150f));
+ bool y = false, r = false, g = false, b = false;
+
+ if (curveEditingId == 0)
+ {
+ EditorGUILayout.Space();
+
+ bool rightClickedY, rightClickedR, rightClickedG, rightClickedB;
+
+ y = SpecialToggle(m_Curves.curveY.boolValue, "Y", out rightClickedY);
+ r = SpecialToggle(m_Curves.curveR.boolValue, "R", out rightClickedR);
+ g = SpecialToggle(m_Curves.curveG.boolValue, "G", out rightClickedG);
+ b = SpecialToggle(m_Curves.curveB.boolValue, "B", out rightClickedB);
+
+ if (!y && !r && !g && !b)
+ {
+ r = g = b = false;
+ y = true;
+ }
+
+ if (rightClickedY || rightClickedR || rightClickedG || rightClickedB)
+ {
+ y = rightClickedY;
+ r = rightClickedR;
+ g = rightClickedG;
+ b = rightClickedB;
+ }
+
+ if (y) SetCurveVisible(m_Curves.master);
+ if (r) SetCurveVisible(m_Curves.red);
+ if (g) SetCurveVisible(m_Curves.green);
+ if (b) SetCurveVisible(m_Curves.blue);
+
+ m_Curves.curveY.boolValue = y;
+ m_Curves.curveR.boolValue = r;
+ m_Curves.curveG.boolValue = g;
+ m_Curves.curveB.boolValue = b;
+ }
+ else
+ {
+ switch (curveEditingId)
+ {
+ case 1: SetCurveVisible(m_Curves.hueVShue);
+ break;
+ case 2: SetCurveVisible(m_Curves.hueVSsat);
+ break;
+ case 3: SetCurveVisible(m_Curves.satVSsat);
+ break;
+ case 4: SetCurveVisible(m_Curves.lumVSsat);
+ break;
+ }
+ }
+
+ GUILayout.FlexibleSpace();
+
+ if (GUILayout.Button("Reset", EditorStyles.toolbarButton))
+ {
+ switch (curveEditingId)
+ {
+ case 0:
+ if (y) m_Curves.master.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
+ if (r) m_Curves.red.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
+ if (g) m_Curves.green.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
+ if (b) m_Curves.blue.animationCurveValue = AnimationCurve.Linear(0f, 0f, 1f, 1f);
+ break;
+ case 1: m_Curves.hueVShue.animationCurveValue = new AnimationCurve();
+ break;
+ case 2: m_Curves.hueVSsat.animationCurveValue = new AnimationCurve();
+ break;
+ case 3: m_Curves.satVSsat.animationCurveValue = new AnimationCurve();
+ break;
+ case 4: m_Curves.lumVSsat.animationCurveValue = new AnimationCurve();
+ break;
+ }
+ }
+
+ m_Curves.currentEditingCurve.intValue = curveEditingId;
+ }
+
+ // Curve area
+ var settings = m_CurveEditor.settings;
+ var rect = GUILayoutUtility.GetAspectRect(2f);
+ var innerRect = settings.padding.Remove(rect);
+
+ if (Event.current.type == EventType.Repaint)
+ {
+ // Background
+ EditorGUI.DrawRect(rect, new Color(0.15f, 0.15f, 0.15f, 1f));
+
+ if (s_MaterialSpline == null)
+ s_MaterialSpline = new Material(Shader.Find("Hidden/Post FX/UI/Curve Background")) { hideFlags = HideFlags.HideAndDontSave };
+
+ if (curveEditingId == 1 || curveEditingId == 2)
+ DrawBackgroundTexture(innerRect, 0);
+ else if (curveEditingId == 3 || curveEditingId == 4)
+ DrawBackgroundTexture(innerRect, 1);
+
+ // Bounds
+ Handles.color = Color.white;
+ Handles.DrawSolidRectangleWithOutline(innerRect, Color.clear, new Color(0.8f, 0.8f, 0.8f, 0.5f));
+
+ // Grid setup
+ Handles.color = new Color(1f, 1f, 1f, 0.05f);
+ int hLines = (int)Mathf.Sqrt(innerRect.width);
+ int vLines = (int)(hLines / (innerRect.width / innerRect.height));
+
+ // Vertical grid
+ int gridOffset = Mathf.FloorToInt(innerRect.width / hLines);
+ int gridPadding = ((int)(innerRect.width) % hLines) / 2;
+
+ for (int i = 1; i < hLines; i++)
+ {
+ var offset = i * Vector2.right * gridOffset;
+ offset.x += gridPadding;
+ Handles.DrawLine(innerRect.position + offset, new Vector2(innerRect.x, innerRect.yMax - 1) + offset);
+ }
+
+ // Horizontal grid
+ gridOffset = Mathf.FloorToInt(innerRect.height / vLines);
+ gridPadding = ((int)(innerRect.height) % vLines) / 2;
+
+ for (int i = 1; i < vLines; i++)
+ {
+ var offset = i * Vector2.up * gridOffset;
+ offset.y += gridPadding;
+ Handles.DrawLine(innerRect.position + offset, new Vector2(innerRect.xMax - 1, innerRect.y) + offset);
+ }
+ }
+
+ // Curve editor
+ if (m_CurveEditor.OnGUI(rect))
+ {
+ Repaint();
+ GUI.changed = true;
+ }
+
+ if (Event.current.type == EventType.Repaint)
+ {
+ // Borders
+ Handles.color = Color.black;
+ Handles.DrawLine(new Vector2(rect.x, rect.y - 18f), new Vector2(rect.xMax, rect.y - 18f));
+ Handles.DrawLine(new Vector2(rect.x, rect.y - 19f), new Vector2(rect.x, rect.yMax));
+ Handles.DrawLine(new Vector2(rect.x, rect.yMax), new Vector2(rect.xMax, rect.yMax));
+ Handles.DrawLine(new Vector2(rect.xMax, rect.yMax), new Vector2(rect.xMax, rect.y - 18f));
+
+ // Selection info
+ var selection = m_CurveEditor.GetSelection();
+
+ if (selection.curve != null && selection.keyframeIndex > -1)
+ {
+ var key = selection.keyframe.Value;
+ var infoRect = innerRect;
+ infoRect.x += 5f;
+ infoRect.width = 100f;
+ infoRect.height = 30f;
+ GUI.Label(infoRect, string.Format("{0}\n{1}", key.time.ToString("F3"), key.value.ToString("F3")), FxStyles.preLabel);
+ }
+ }
+ }
+
+ /*
+ EditorGUILayout.HelpBox(
+ @"Curve editor cheat sheet:
+- [Del] or [Backspace] to remove a key
+- [Ctrl] to break a tangent handle
+- [Shift] to align tangent handles
+- [Double click] to create a key on the curve(s) at mouse position
+- [Alt] + [Double click] to create a key on the curve(s) at a given time",
+ MessageType.Info);
+ */
+
+ EditorGUILayout.Space();
+ EditorGUI.indentLevel += 2;
+ }
+
+ void DrawBackgroundTexture(Rect rect, int pass)
+ {
+ float scale = EditorGUIUtility.pixelsPerPoint;
+
+ var oldRt = RenderTexture.active;
+ var rt = RenderTexture.GetTemporary(Mathf.CeilToInt(rect.width * scale), Mathf.CeilToInt(rect.height * scale), 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
+ s_MaterialSpline.SetFloat("_DisabledState", GUI.enabled ? 1f : 0.5f);
+ s_MaterialSpline.SetFloat("_PixelScaling", EditorGUIUtility.pixelsPerPoint);
+
+ Graphics.Blit(null, rt, s_MaterialSpline, pass);
+ RenderTexture.active = oldRt;
+
+ GUI.DrawTexture(rect, rt);
+ RenderTexture.ReleaseTemporary(rt);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ColorGradingModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ColorGradingModelEditor.cs.meta
new file mode 100644
index 0000000..012aa06
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ColorGradingModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c3e3bce1d5c900d4fa7aa0f2b21814cf
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DefaultPostFxModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DefaultPostFxModelEditor.cs
new file mode 100644
index 0000000..06c1c22
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DefaultPostFxModelEditor.cs
@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+
+namespace UnityEditor.PostProcessing
+{
+ public class DefaultPostFxModelEditor : PostProcessingModelEditor
+ {
+ List m_Properties = new List();
+
+ public override void OnEnable()
+ {
+ var iter = m_SettingsProperty.Copy().GetEnumerator();
+ while (iter.MoveNext())
+ m_Properties.Add(((SerializedProperty)iter.Current).Copy());
+ }
+
+ public override void OnInspectorGUI()
+ {
+ foreach (var property in m_Properties)
+ EditorGUILayout.PropertyField(property);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DefaultPostFxModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DefaultPostFxModelEditor.cs.meta
new file mode 100644
index 0000000..4f39e17
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DefaultPostFxModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c15016a7fef58974f91a6a4d6b132d94
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DepthOfFieldModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DepthOfFieldModelEditor.cs
new file mode 100644
index 0000000..0f253fc
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DepthOfFieldModelEditor.cs
@@ -0,0 +1,37 @@
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = DepthOfFieldModel.Settings;
+
+ [PostProcessingModelEditor(typeof(DepthOfFieldModel))]
+ public class DepthOfFieldModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_FocusDistance;
+ SerializedProperty m_Aperture;
+ SerializedProperty m_FocalLength;
+ SerializedProperty m_UseCameraFov;
+ SerializedProperty m_KernelSize;
+
+ public override void OnEnable()
+ {
+ m_FocusDistance = FindSetting((Settings x) => x.focusDistance);
+ m_Aperture = FindSetting((Settings x) => x.aperture);
+ m_FocalLength = FindSetting((Settings x) => x.focalLength);
+ m_UseCameraFov = FindSetting((Settings x) => x.useCameraFov);
+ m_KernelSize = FindSetting((Settings x) => x.kernelSize);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.PropertyField(m_FocusDistance);
+ EditorGUILayout.PropertyField(m_Aperture, EditorGUIHelper.GetContent("Aperture (f-stop)"));
+
+ EditorGUILayout.PropertyField(m_UseCameraFov, EditorGUIHelper.GetContent("Use Camera FOV"));
+ if (!m_UseCameraFov.boolValue)
+ EditorGUILayout.PropertyField(m_FocalLength, EditorGUIHelper.GetContent("Focal Length (mm)"));
+
+ EditorGUILayout.PropertyField(m_KernelSize);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DepthOfFieldModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DepthOfFieldModelEditor.cs.meta
new file mode 100644
index 0000000..af3726c
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DepthOfFieldModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dc2f388440e9f8b4f8fc7bb43c01cc7d
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DitheringModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DitheringModelEditor.cs
new file mode 100644
index 0000000..af4751f
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DitheringModelEditor.cs
@@ -0,0 +1,16 @@
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ [PostProcessingModelEditor(typeof(DitheringModel))]
+ public class DitheringModelEditor : PostProcessingModelEditor
+ {
+ public override void OnInspectorGUI()
+ {
+ if (profile.grain.enabled && target.enabled)
+ EditorGUILayout.HelpBox("Grain is enabled, you probably don't need dithering !", MessageType.Warning);
+ else
+ EditorGUILayout.HelpBox("Nothing to configure !", MessageType.Info);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DitheringModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DitheringModelEditor.cs.meta
new file mode 100644
index 0000000..345beaf
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/DitheringModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 87377c86d84f49a4e912d37d28353e7f
+timeCreated: 1485179854
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/EyeAdaptationModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/EyeAdaptationModelEditor.cs
new file mode 100644
index 0000000..94c49f2
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/EyeAdaptationModelEditor.cs
@@ -0,0 +1,86 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = EyeAdaptationModel.Settings;
+
+ [PostProcessingModelEditor(typeof(EyeAdaptationModel))]
+ public class EyeAdaptationModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_LowPercent;
+ SerializedProperty m_HighPercent;
+ SerializedProperty m_MinLuminance;
+ SerializedProperty m_MaxLuminance;
+ SerializedProperty m_KeyValue;
+ SerializedProperty m_DynamicKeyValue;
+ SerializedProperty m_AdaptationType;
+ SerializedProperty m_SpeedUp;
+ SerializedProperty m_SpeedDown;
+ SerializedProperty m_LogMin;
+ SerializedProperty m_LogMax;
+
+ public override void OnEnable()
+ {
+ m_LowPercent = FindSetting((Settings x) => x.lowPercent);
+ m_HighPercent = FindSetting((Settings x) => x.highPercent);
+ m_MinLuminance = FindSetting((Settings x) => x.minLuminance);
+ m_MaxLuminance = FindSetting((Settings x) => x.maxLuminance);
+ m_KeyValue = FindSetting((Settings x) => x.keyValue);
+ m_DynamicKeyValue = FindSetting((Settings x) => x.dynamicKeyValue);
+ m_AdaptationType = FindSetting((Settings x) => x.adaptationType);
+ m_SpeedUp = FindSetting((Settings x) => x.speedUp);
+ m_SpeedDown = FindSetting((Settings x) => x.speedDown);
+ m_LogMin = FindSetting((Settings x) => x.logMin);
+ m_LogMax = FindSetting((Settings x) => x.logMax);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ if (!GraphicsUtils.supportsDX11)
+ EditorGUILayout.HelpBox("This effect requires support for compute shaders. Enabling it won't do anything on unsupported platforms.", MessageType.Warning);
+
+ EditorGUILayout.LabelField("Luminosity range", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_LogMin, EditorGUIHelper.GetContent("Minimum (EV)"));
+ EditorGUILayout.PropertyField(m_LogMax, EditorGUIHelper.GetContent("Maximum (EV)"));
+ EditorGUI.indentLevel--;
+ EditorGUILayout.Space();
+
+ EditorGUILayout.LabelField("Auto exposure", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ float low = m_LowPercent.floatValue;
+ float high = m_HighPercent.floatValue;
+
+ EditorGUILayout.MinMaxSlider(EditorGUIHelper.GetContent("Histogram filtering|These values are the lower and upper percentages of the histogram that will be used to find a stable average luminance. Values outside of this range will be discarded and won't contribute to the average luminance."), ref low, ref high, 1f, 99f);
+
+ m_LowPercent.floatValue = low;
+ m_HighPercent.floatValue = high;
+
+ EditorGUILayout.PropertyField(m_MinLuminance, EditorGUIHelper.GetContent("Minimum (EV)"));
+ EditorGUILayout.PropertyField(m_MaxLuminance, EditorGUIHelper.GetContent("Maximum (EV)"));
+ EditorGUILayout.PropertyField(m_DynamicKeyValue);
+
+ if (!m_DynamicKeyValue.boolValue)
+ EditorGUILayout.PropertyField(m_KeyValue);
+
+ EditorGUI.indentLevel--;
+ EditorGUILayout.Space();
+
+ EditorGUILayout.LabelField("Adaptation", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+
+ EditorGUILayout.PropertyField(m_AdaptationType, EditorGUIHelper.GetContent("Type"));
+
+ if (m_AdaptationType.intValue == (int)EyeAdaptationModel.EyeAdaptationType.Progressive)
+ {
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_SpeedUp);
+ EditorGUILayout.PropertyField(m_SpeedDown);
+ EditorGUI.indentLevel--;
+ }
+
+ EditorGUI.indentLevel--;
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/EyeAdaptationModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/EyeAdaptationModelEditor.cs.meta
new file mode 100644
index 0000000..de9928b
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/EyeAdaptationModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 489b5c785ba0f614d90c322fa0827216
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/FogModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/FogModelEditor.cs
new file mode 100644
index 0000000..b5b17c4
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/FogModelEditor.cs
@@ -0,0 +1,24 @@
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = FogModel.Settings;
+
+ [PostProcessingModelEditor(typeof(FogModel))]
+ public class FogModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_ExcludeSkybox;
+
+ public override void OnEnable()
+ {
+ m_ExcludeSkybox = FindSetting((Settings x) => x.excludeSkybox);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("This effect adds fog compatibility to the deferred rendering path; enabling it with the forward rendering path won't have any effect. Actual fog settings should be set in the Lighting panel.", MessageType.Info);
+ EditorGUILayout.PropertyField(m_ExcludeSkybox);
+ EditorGUI.indentLevel--;
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/FogModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/FogModelEditor.cs.meta
new file mode 100644
index 0000000..258489b
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/FogModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 44a64b44ec891d24b96ed84d958c3d4f
+timeCreated: 1487335049
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/GrainModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/GrainModelEditor.cs
new file mode 100644
index 0000000..9c7d169
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/GrainModelEditor.cs
@@ -0,0 +1,31 @@
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = GrainModel.Settings;
+
+ [PostProcessingModelEditor(typeof(GrainModel))]
+ public class GrainModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_Colored;
+ SerializedProperty m_Intensity;
+ SerializedProperty m_Size;
+ SerializedProperty m_LuminanceContribution;
+
+ public override void OnEnable()
+ {
+ m_Colored = FindSetting((Settings x) => x.colored);
+ m_Intensity = FindSetting((Settings x) => x.intensity);
+ m_Size = FindSetting((Settings x) => x.size);
+ m_LuminanceContribution = FindSetting((Settings x) => x.luminanceContribution);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.PropertyField(m_Intensity);
+ EditorGUILayout.PropertyField(m_LuminanceContribution);
+ EditorGUILayout.PropertyField(m_Size);
+ EditorGUILayout.PropertyField(m_Colored);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/GrainModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/GrainModelEditor.cs.meta
new file mode 100644
index 0000000..46e9de5
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/GrainModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8330694e2c90c284f81153ac83b3cb4a
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/MotionBlurModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/MotionBlurModelEditor.cs
new file mode 100644
index 0000000..dac86e7
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/MotionBlurModelEditor.cs
@@ -0,0 +1,197 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = MotionBlurModel.Settings;
+
+ [PostProcessingModelEditor(typeof(MotionBlurModel))]
+ public class MotionBlurModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_ShutterAngle;
+ SerializedProperty m_SampleCount;
+ SerializedProperty m_FrameBlending;
+
+ GraphDrawer m_GraphDrawer;
+
+ class GraphDrawer
+ {
+ const float k_Height = 32f;
+
+ Texture m_BlendingIcon;
+
+ GUIStyle m_LowerCenterStyle;
+ GUIStyle m_MiddleCenterStyle;
+
+ Color m_ColorDark;
+ Color m_ColorGray;
+
+ Vector3[] m_RectVertices = new Vector3[4];
+
+ public GraphDrawer()
+ {
+ m_BlendingIcon = EditorResources.Load("UI/MotionBlendingIcon.png");
+
+ m_LowerCenterStyle = new GUIStyle(EditorStyles.miniLabel) { alignment = TextAnchor.LowerCenter };
+ m_MiddleCenterStyle = new GUIStyle(EditorStyles.miniLabel) { alignment = TextAnchor.MiddleCenter };
+
+ if (EditorGUIUtility.isProSkin)
+ {
+ m_ColorDark = new Color(0.18f, 0.18f, 0.18f);
+ m_ColorGray = new Color(0.43f, 0.43f, 0.43f);
+ }
+ else
+ {
+ m_ColorDark = new Color(0.64f, 0.64f, 0.64f);
+ m_ColorGray = new Color(0.92f, 0.92f, 0.92f);
+ }
+ }
+
+ public void DrawShutterGraph(float angle)
+ {
+ var center = GUILayoutUtility.GetRect(128, k_Height).center;
+
+ // Parameters used to make transitions smooth.
+ var zeroWhenOff = Mathf.Min(1f, angle * 0.1f);
+ var zeroWhenFull = Mathf.Min(1f, (360f - angle) * 0.02f);
+
+ // Shutter angle graph
+ var discCenter = center - new Vector2(k_Height * 2.4f, 0f);
+ // - exposure duration indicator
+ DrawDisc(discCenter, k_Height * Mathf.Lerp(0.5f, 0.38f, zeroWhenFull), m_ColorGray);
+ // - shutter disc
+ DrawDisc(discCenter, k_Height * 0.16f * zeroWhenFull, m_ColorDark);
+ // - shutter blade
+ DrawArc(discCenter, k_Height * 0.5f, 360f - angle, m_ColorDark);
+ // - shutter axis
+ DrawDisc(discCenter, zeroWhenOff, m_ColorGray);
+
+ // Shutter label (off/full)
+ var labelSize = new Vector2(k_Height, k_Height);
+ var labelOrigin = discCenter - labelSize * 0.5f;
+ var labelRect = new Rect(labelOrigin, labelSize);
+
+ if (Mathf.Approximately(angle, 0f))
+ GUI.Label(labelRect, "Off", m_MiddleCenterStyle);
+ else if (Mathf.Approximately(angle, 360f))
+ GUI.Label(labelRect, "Full", m_MiddleCenterStyle);
+
+ // Exposure time bar graph
+ var outerBarSize = new Vector2(4.75f, 0.5f) * k_Height;
+ var innerBarSize = outerBarSize;
+ innerBarSize.x *= angle / 360f;
+
+ var barCenter = center + new Vector2(k_Height * 0.9f, 0f);
+ var barOrigin = barCenter - outerBarSize * 0.5f;
+
+ DrawRect(barOrigin, outerBarSize, m_ColorDark);
+ DrawRect(barOrigin, innerBarSize, m_ColorGray);
+
+ var barText = "Exposure time = " + (angle / 3.6f).ToString("0") + "% of ΔT";
+ GUI.Label(new Rect(barOrigin, outerBarSize), barText, m_MiddleCenterStyle);
+ }
+
+ public void DrawBlendingGraph(float strength)
+ {
+ var center = GUILayoutUtility.GetRect(128, k_Height).center;
+
+ var iconSize = new Vector2(k_Height, k_Height);
+ var iconStride = new Vector2(k_Height * 0.9f, 0f);
+ var iconOrigin = center - iconSize * 0.5f - iconStride * 2f;
+
+ for (var i = 0; i < 5; i++)
+ {
+ var weight = BlendingWeight(strength, i / 60f);
+ var rect = new Rect(iconOrigin + iconStride * i, iconSize);
+
+ var color = m_ColorGray;
+ color.a = weight;
+
+ GUI.color = color;
+ GUI.Label(rect, m_BlendingIcon);
+
+ GUI.color = Color.white;
+ GUI.Label(rect, (weight * 100).ToString("0") + "%", m_LowerCenterStyle);
+ }
+ // EditorGUIUtility.isProSkin
+ }
+
+ // Weight function for multi frame blending
+ float BlendingWeight(float strength, float time)
+ {
+ if (strength > 0f || Mathf.Approximately(time, 0f))
+ return Mathf.Exp(-time * Mathf.Lerp(80f, 10f, strength));
+
+ return 0;
+ }
+
+ // Draw a solid disc in the graph rect.
+ void DrawDisc(Vector2 center, float radius, Color fill)
+ {
+ Handles.color = fill;
+ Handles.DrawSolidDisc(center, Vector3.forward, radius);
+ }
+
+ // Draw an arc in the graph rect.
+ void DrawArc(Vector2 center, float radius, float angle, Color fill)
+ {
+ var start = new Vector2(
+ -Mathf.Cos(Mathf.Deg2Rad * angle / 2f),
+ Mathf.Sin(Mathf.Deg2Rad * angle / 2f)
+ );
+
+ Handles.color = fill;
+ Handles.DrawSolidArc(center, Vector3.forward, start, angle, radius);
+ }
+
+ // Draw a rectangle in the graph rect.
+ void DrawRect(Vector2 origin, Vector2 size, Color color)
+ {
+ var p0 = origin;
+ var p1 = origin + size;
+
+ m_RectVertices[0] = p0;
+ m_RectVertices[1] = new Vector2(p1.x, p0.y);
+ m_RectVertices[2] = p1;
+ m_RectVertices[3] = new Vector2(p0.x, p1.y);
+
+ Handles.color = Color.white;
+ Handles.DrawSolidRectangleWithOutline(m_RectVertices, color, Color.clear);
+ }
+ }
+
+ public override void OnEnable()
+ {
+ m_ShutterAngle = FindSetting((Settings x) => x.shutterAngle);
+ m_SampleCount = FindSetting((Settings x) => x.sampleCount);
+ m_FrameBlending = FindSetting((Settings x) => x.frameBlending);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ if (m_GraphDrawer == null)
+ m_GraphDrawer = new GraphDrawer();
+
+ EditorGUILayout.LabelField("Shutter Speed Simulation", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ m_GraphDrawer.DrawShutterGraph(m_ShutterAngle.floatValue);
+ EditorGUILayout.PropertyField(m_ShutterAngle);
+ EditorGUILayout.PropertyField(m_SampleCount);
+ EditorGUI.indentLevel--;
+ EditorGUILayout.Space();
+
+ EditorGUILayout.LabelField("Multiple Frame Blending", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+
+ float fbValue = m_FrameBlending.floatValue;
+ m_GraphDrawer.DrawBlendingGraph(fbValue);
+ EditorGUILayout.PropertyField(m_FrameBlending);
+
+ if (fbValue > 0f)
+ EditorGUILayout.HelpBox("Multi-Frame Blending lowers precision of the final picture for optimization purposes.", MessageType.Info);
+
+
+ EditorGUI.indentLevel--;
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/MotionBlurModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/MotionBlurModelEditor.cs.meta
new file mode 100644
index 0000000..e1d5697
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/MotionBlurModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 870806eda355b5144879155e2ba37eb6
+timeCreated: 1468325681
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ScreenSpaceReflectionModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ScreenSpaceReflectionModelEditor.cs
new file mode 100644
index 0000000..8904c7e
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ScreenSpaceReflectionModelEditor.cs
@@ -0,0 +1,100 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = ScreenSpaceReflectionModel.Settings;
+
+ [PostProcessingModelEditor(typeof(ScreenSpaceReflectionModel))]
+ public class ScreenSpaceReflectionModelEditor : PostProcessingModelEditor
+ {
+ struct IntensitySettings
+ {
+ public SerializedProperty reflectionMultiplier;
+ public SerializedProperty fadeDistance;
+ public SerializedProperty fresnelFade;
+ public SerializedProperty fresnelFadePower;
+ }
+
+ struct ReflectionSettings
+ {
+ public SerializedProperty blendType;
+ public SerializedProperty reflectionQuality;
+ public SerializedProperty maxDistance;
+ public SerializedProperty iterationCount;
+ public SerializedProperty stepSize;
+ public SerializedProperty widthModifier;
+ public SerializedProperty reflectionBlur;
+ public SerializedProperty reflectBackfaces;
+ }
+
+ struct ScreenEdgeMask
+ {
+ public SerializedProperty intensity;
+ }
+
+ IntensitySettings m_Intensity;
+ ReflectionSettings m_Reflection;
+ ScreenEdgeMask m_ScreenEdgeMask;
+
+ public override void OnEnable()
+ {
+ m_Intensity = new IntensitySettings
+ {
+ reflectionMultiplier = FindSetting((Settings x) => x.intensity.reflectionMultiplier),
+ fadeDistance = FindSetting((Settings x) => x.intensity.fadeDistance),
+ fresnelFade = FindSetting((Settings x) => x.intensity.fresnelFade),
+ fresnelFadePower = FindSetting((Settings x) => x.intensity.fresnelFadePower)
+ };
+
+ m_Reflection = new ReflectionSettings
+ {
+ blendType = FindSetting((Settings x) => x.reflection.blendType),
+ reflectionQuality = FindSetting((Settings x) => x.reflection.reflectionQuality),
+ maxDistance = FindSetting((Settings x) => x.reflection.maxDistance),
+ iterationCount = FindSetting((Settings x) => x.reflection.iterationCount),
+ stepSize = FindSetting((Settings x) => x.reflection.stepSize),
+ widthModifier = FindSetting((Settings x) => x.reflection.widthModifier),
+ reflectionBlur = FindSetting((Settings x) => x.reflection.reflectionBlur),
+ reflectBackfaces = FindSetting((Settings x) => x.reflection.reflectBackfaces)
+ };
+
+ m_ScreenEdgeMask = new ScreenEdgeMask
+ {
+ intensity = FindSetting((Settings x) => x.screenEdgeMask.intensity)
+ };
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("This effect only works with the deferred rendering path.", MessageType.Info);
+
+ EditorGUILayout.LabelField("Reflection", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_Reflection.blendType);
+ EditorGUILayout.PropertyField(m_Reflection.reflectionQuality);
+ EditorGUILayout.PropertyField(m_Reflection.maxDistance);
+ EditorGUILayout.PropertyField(m_Reflection.iterationCount);
+ EditorGUILayout.PropertyField(m_Reflection.stepSize);
+ EditorGUILayout.PropertyField(m_Reflection.widthModifier);
+ EditorGUILayout.PropertyField(m_Reflection.reflectionBlur);
+ EditorGUILayout.PropertyField(m_Reflection.reflectBackfaces);
+ EditorGUI.indentLevel--;
+
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Intensity", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_Intensity.reflectionMultiplier);
+ EditorGUILayout.PropertyField(m_Intensity.fadeDistance);
+ EditorGUILayout.PropertyField(m_Intensity.fresnelFade);
+ EditorGUILayout.PropertyField(m_Intensity.fresnelFadePower);
+ EditorGUI.indentLevel--;
+
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Screen Edge Mask", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(m_ScreenEdgeMask.intensity);
+ EditorGUI.indentLevel--;
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ScreenSpaceReflectionModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ScreenSpaceReflectionModelEditor.cs.meta
new file mode 100644
index 0000000..165b77c
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/ScreenSpaceReflectionModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 57bbe1f20eec7bb4d9bc90fc65ef381b
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/UserLutModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/UserLutModelEditor.cs
new file mode 100644
index 0000000..39c96ba
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/UserLutModelEditor.cs
@@ -0,0 +1,87 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using Settings = UserLutModel.Settings;
+
+ [PostProcessingModelEditor(typeof(UserLutModel))]
+ public class UserLutModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_Texture;
+ SerializedProperty m_Contribution;
+
+ public override void OnEnable()
+ {
+ m_Texture = FindSetting((Settings x) => x.lut);
+ m_Contribution = FindSetting((Settings x) => x.contribution);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ var lut = (target as UserLutModel).settings.lut;
+
+ // Checks import settings on the lut, offers to fix them if invalid
+ if (lut != null)
+ {
+ var importer = (TextureImporter)AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(lut));
+
+ if (importer != null) // Fails when using an internal texture
+ {
+#if UNITY_5_5_OR_NEWER
+ bool valid = importer.anisoLevel == 0
+ && importer.mipmapEnabled == false
+ && importer.sRGBTexture == false
+ && (importer.textureCompression == TextureImporterCompression.Uncompressed);
+#else
+ bool valid = importer.anisoLevel == 0
+ && importer.mipmapEnabled == false
+ && importer.linearTexture == true
+ && (importer.textureFormat == TextureImporterFormat.RGB24 || importer.textureFormat == TextureImporterFormat.AutomaticTruecolor);
+#endif
+
+ if (!valid)
+ {
+ EditorGUILayout.HelpBox("Invalid LUT import settings.", MessageType.Warning);
+
+ GUILayout.Space(-32);
+ using (new EditorGUILayout.HorizontalScope())
+ {
+ GUILayout.FlexibleSpace();
+ if (GUILayout.Button("Fix", GUILayout.Width(60)))
+ {
+ SetLUTImportSettings(importer);
+ AssetDatabase.Refresh();
+ }
+ GUILayout.Space(8);
+ }
+ GUILayout.Space(11);
+ }
+ }
+ else
+ {
+ m_Texture.objectReferenceValue = null;
+ }
+ }
+
+ EditorGUILayout.PropertyField(m_Texture);
+ EditorGUILayout.PropertyField(m_Contribution);
+ }
+
+ void SetLUTImportSettings(TextureImporter importer)
+ {
+#if UNITY_5_5_OR_NEWER
+ importer.textureType = TextureImporterType.Default;
+ importer.sRGBTexture = false;
+ importer.textureCompression = TextureImporterCompression.Uncompressed;
+#else
+ importer.textureType = TextureImporterType.Advanced;
+ importer.linearTexture = true;
+ importer.textureFormat = TextureImporterFormat.RGB24;
+#endif
+ importer.anisoLevel = 0;
+ importer.mipmapEnabled = false;
+ importer.SaveAndReimport();
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/UserLutModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/UserLutModelEditor.cs.meta
new file mode 100644
index 0000000..a8acf7e
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/UserLutModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b235eb1c486b38c4fa06470234bbfd32
+timeCreated: 1466769818
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/VignetteModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/VignetteModelEditor.cs
new file mode 100644
index 0000000..a9e231f
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/VignetteModelEditor.cs
@@ -0,0 +1,118 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using VignetteMode = VignetteModel.Mode;
+ using Settings = VignetteModel.Settings;
+
+ [PostProcessingModelEditor(typeof(VignetteModel))]
+ public class VignetteModelEditor : PostProcessingModelEditor
+ {
+ SerializedProperty m_Mode;
+ SerializedProperty m_Color;
+ SerializedProperty m_Center;
+ SerializedProperty m_Intensity;
+ SerializedProperty m_Smoothness;
+ SerializedProperty m_Roundness;
+ SerializedProperty m_Mask;
+ SerializedProperty m_Opacity;
+ SerializedProperty m_Rounded;
+
+ public override void OnEnable()
+ {
+ m_Mode = FindSetting((Settings x) => x.mode);
+ m_Color = FindSetting((Settings x) => x.color);
+ m_Center = FindSetting((Settings x) => x.center);
+ m_Intensity = FindSetting((Settings x) => x.intensity);
+ m_Smoothness = FindSetting((Settings x) => x.smoothness);
+ m_Roundness = FindSetting((Settings x) => x.roundness);
+ m_Mask = FindSetting((Settings x) => x.mask);
+ m_Opacity = FindSetting((Settings x) => x.opacity);
+ m_Rounded = FindSetting((Settings x) => x.rounded);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.PropertyField(m_Mode);
+ EditorGUILayout.PropertyField(m_Color);
+
+ if (m_Mode.intValue < (int)VignetteMode.Masked)
+ {
+ EditorGUILayout.PropertyField(m_Center);
+ EditorGUILayout.PropertyField(m_Intensity);
+ EditorGUILayout.PropertyField(m_Smoothness);
+ EditorGUILayout.PropertyField(m_Roundness);
+ EditorGUILayout.PropertyField(m_Rounded);
+ }
+ else
+ {
+ var mask = (target as VignetteModel).settings.mask;
+
+ // Checks import settings on the mask, offers to fix them if invalid
+ if (mask != null)
+ {
+ var importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(mask)) as TextureImporter;
+
+ if (importer != null) // Fails when using an internal texture
+ {
+#if UNITY_5_5_OR_NEWER
+ bool valid = importer.anisoLevel == 0
+ && importer.mipmapEnabled == false
+ //&& importer.alphaUsage == TextureImporterAlphaUsage.FromGrayScale
+ && importer.alphaSource == TextureImporterAlphaSource.FromGrayScale
+ && importer.textureCompression == TextureImporterCompression.Uncompressed
+ && importer.wrapMode == TextureWrapMode.Clamp;
+#else
+ bool valid = importer.anisoLevel == 0
+ && importer.mipmapEnabled == false
+ && importer.grayscaleToAlpha == true
+ && importer.textureFormat == TextureImporterFormat.Alpha8
+ && importer.wrapMode == TextureWrapMode.Clamp;
+#endif
+
+ if (!valid)
+ {
+ EditorGUILayout.HelpBox("Invalid mask import settings.", MessageType.Warning);
+
+ GUILayout.Space(-32);
+ using (new EditorGUILayout.HorizontalScope())
+ {
+ GUILayout.FlexibleSpace();
+ if (GUILayout.Button("Fix", GUILayout.Width(60)))
+ {
+ SetMaskImportSettings(importer);
+ AssetDatabase.Refresh();
+ }
+ GUILayout.Space(8);
+ }
+ GUILayout.Space(11);
+ }
+ }
+ }
+
+ EditorGUILayout.PropertyField(m_Mask);
+ EditorGUILayout.PropertyField(m_Opacity);
+ }
+ }
+
+ void SetMaskImportSettings(TextureImporter importer)
+ {
+#if UNITY_5_5_OR_NEWER
+ importer.textureType = TextureImporterType.SingleChannel;
+ //importer.alphaUsage = TextureImporterAlphaUsage.FromGrayScale;
+ importer.alphaSource = TextureImporterAlphaSource.FromGrayScale;
+ importer.textureCompression = TextureImporterCompression.Uncompressed;
+#else
+ importer.textureType = TextureImporterType.Advanced;
+ importer.grayscaleToAlpha = true;
+ importer.textureFormat = TextureImporterFormat.Alpha8;
+#endif
+
+ importer.anisoLevel = 0;
+ importer.mipmapEnabled = false;
+ importer.wrapMode = TextureWrapMode.Clamp;
+ importer.SaveAndReimport();
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/VignetteModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/VignetteModelEditor.cs.meta
new file mode 100644
index 0000000..6b291fd
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Models/VignetteModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 745ad42620dabf04b94761acc86189ba
+timeCreated: 1467190133
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors.meta
similarity index 67%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors.meta
index 872280e..3d2e876 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Decorators.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 21a375b704549664589881dfc892e7e7
+guid: e31078d57ac582944ad5e1e76a84f36a
folderAsset: yes
-timeCreated: 1493051174
+timeCreated: 1467188891
licenseType: Pro
DefaultImporter:
userData:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/HistogramMonitor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/HistogramMonitor.cs
new file mode 100644
index 0000000..3748a68
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/HistogramMonitor.cs
@@ -0,0 +1,338 @@
+using UnityEditorInternal;
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ using HistogramMode = PostProcessingProfile.MonitorSettings.HistogramMode;
+
+ public class HistogramMonitor : PostProcessingMonitor
+ {
+ static GUIContent s_MonitorTitle = new GUIContent("Histogram");
+
+ ComputeShader m_ComputeShader;
+ ComputeBuffer m_Buffer;
+ Material m_Material;
+ RenderTexture m_HistogramTexture;
+ Rect m_MonitorAreaRect;
+
+ public HistogramMonitor()
+ {
+ m_ComputeShader = EditorResources.Load("Monitors/HistogramCompute.compute");
+ }
+
+ public override void Dispose()
+ {
+ GraphicsUtils.Destroy(m_Material);
+ GraphicsUtils.Destroy(m_HistogramTexture);
+
+ if (m_Buffer != null)
+ m_Buffer.Release();
+
+ m_Material = null;
+ m_HistogramTexture = null;
+ m_Buffer = null;
+ }
+
+ public override bool IsSupported()
+ {
+ return m_ComputeShader != null && GraphicsUtils.supportsDX11;
+ }
+
+ public override GUIContent GetMonitorTitle()
+ {
+ return s_MonitorTitle;
+ }
+
+ public override void OnMonitorSettings()
+ {
+ EditorGUI.BeginChangeCheck();
+
+ bool refreshOnPlay = m_MonitorSettings.refreshOnPlay;
+ var mode = m_MonitorSettings.histogramMode;
+
+ refreshOnPlay = GUILayout.Toggle(refreshOnPlay, new GUIContent(FxStyles.playIcon, "Keep refreshing the histogram in play mode; this may impact performances."), FxStyles.preButton);
+ mode = (HistogramMode)EditorGUILayout.EnumPopup(mode, FxStyles.preDropdown, GUILayout.MaxWidth(100f));
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ Undo.RecordObject(m_BaseEditor.serializedObject.targetObject, "Histogram Settings Changed");
+ m_MonitorSettings.refreshOnPlay = refreshOnPlay;
+ m_MonitorSettings.histogramMode = mode;
+ InternalEditorUtility.RepaintAllViews();
+ }
+ }
+
+ public override void OnMonitorGUI(Rect r)
+ {
+ if (Event.current.type == EventType.Repaint)
+ {
+ // If m_MonitorAreaRect isn't set the preview was just opened so refresh the render to get the histogram data
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) && Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ InternalEditorUtility.RepaintAllViews();
+
+ // Sizing
+ float width = m_HistogramTexture != null
+ ? Mathf.Min(m_HistogramTexture.width, r.width - 65f)
+ : r.width;
+ float height = m_HistogramTexture != null
+ ? Mathf.Min(m_HistogramTexture.height, r.height - 45f)
+ : r.height;
+
+ m_MonitorAreaRect = new Rect(
+ Mathf.Floor(r.x + r.width / 2f - width / 2f),
+ Mathf.Floor(r.y + r.height / 2f - height / 2f - 5f),
+ width, height
+ );
+
+ if (m_HistogramTexture != null)
+ {
+ Graphics.DrawTexture(m_MonitorAreaRect, m_HistogramTexture);
+
+ var color = Color.white;
+ const float kTickSize = 5f;
+
+ // Rect, lines & ticks points
+ if (m_MonitorSettings.histogramMode == HistogramMode.RGBSplit)
+ {
+ // A B C D E
+ // N F
+ // M G
+ // L K J I H
+
+ var A = new Vector3(m_MonitorAreaRect.x - 1f, m_MonitorAreaRect.y - 1f);
+ var E = new Vector3(A.x + m_MonitorAreaRect.width + 2f, m_MonitorAreaRect.y - 1f);
+ var H = new Vector3(E.x, E.y + m_MonitorAreaRect.height + 2f);
+ var L = new Vector3(A.x, H.y);
+
+ var N = new Vector3(A.x, A.y + (L.y - A.y) / 3f);
+ var M = new Vector3(A.x, A.y + (L.y - A.y) * 2f / 3f);
+ var F = new Vector3(E.x, E.y + (H.y - E.y) / 3f);
+ var G = new Vector3(E.x, E.y + (H.y - E.y) * 2f / 3f);
+
+ var C = new Vector3(A.x + (E.x - A.x) / 2f, A.y);
+ var J = new Vector3(L.x + (H.x - L.x) / 2f, L.y);
+
+ var B = new Vector3(A.x + (C.x - A.x) / 2f, A.y);
+ var D = new Vector3(C.x + (E.x - C.x) / 2f, C.y);
+ var I = new Vector3(J.x + (H.x - J.x) / 2f, J.y);
+ var K = new Vector3(L.x + (J.x - L.x) / 2f, L.y);
+
+ // Borders
+ Handles.color = color;
+ Handles.DrawLine(A, E);
+ Handles.DrawLine(E, H);
+ Handles.DrawLine(H, L);
+ Handles.DrawLine(L, new Vector3(A.x, A.y - 1f));
+
+ // Vertical ticks
+ Handles.DrawLine(A, new Vector3(A.x - kTickSize, A.y));
+ Handles.DrawLine(N, new Vector3(N.x - kTickSize, N.y));
+ Handles.DrawLine(M, new Vector3(M.x - kTickSize, M.y));
+ Handles.DrawLine(L, new Vector3(L.x - kTickSize, L.y));
+
+ Handles.DrawLine(E, new Vector3(E.x + kTickSize, E.y));
+ Handles.DrawLine(F, new Vector3(F.x + kTickSize, F.y));
+ Handles.DrawLine(G, new Vector3(G.x + kTickSize, G.y));
+ Handles.DrawLine(H, new Vector3(H.x + kTickSize, H.y));
+
+ // Horizontal ticks
+ Handles.DrawLine(A, new Vector3(A.x, A.y - kTickSize));
+ Handles.DrawLine(B, new Vector3(B.x, B.y - kTickSize));
+ Handles.DrawLine(C, new Vector3(C.x, C.y - kTickSize));
+ Handles.DrawLine(D, new Vector3(D.x, D.y - kTickSize));
+ Handles.DrawLine(E, new Vector3(E.x, E.y - kTickSize));
+
+ Handles.DrawLine(L, new Vector3(L.x, L.y + kTickSize));
+ Handles.DrawLine(K, new Vector3(K.x, K.y + kTickSize));
+ Handles.DrawLine(J, new Vector3(J.x, J.y + kTickSize));
+ Handles.DrawLine(I, new Vector3(I.x, I.y + kTickSize));
+ Handles.DrawLine(H, new Vector3(H.x, H.y + kTickSize));
+
+ // Separators
+ Handles.DrawLine(N, F);
+ Handles.DrawLine(M, G);
+
+ // Labels
+ GUI.color = color;
+ GUI.Label(new Rect(L.x - 15f, L.y + kTickSize - 4f, 30f, 30f), "0.0", FxStyles.tickStyleCenter);
+ GUI.Label(new Rect(J.x - 15f, J.y + kTickSize - 4f, 30f, 30f), "0.5", FxStyles.tickStyleCenter);
+ GUI.Label(new Rect(H.x - 15f, H.y + kTickSize - 4f, 30f, 30f), "1.0", FxStyles.tickStyleCenter);
+ }
+ else
+ {
+ // A B C D E
+ // P F
+ // O G
+ // N H
+ // M L K J I
+
+ var A = new Vector3(m_MonitorAreaRect.x, m_MonitorAreaRect.y);
+ var E = new Vector3(A.x + m_MonitorAreaRect.width + 1f, m_MonitorAreaRect.y);
+ var I = new Vector3(E.x, E.y + m_MonitorAreaRect.height + 1f);
+ var M = new Vector3(A.x, I.y);
+
+ var C = new Vector3(A.x + (E.x - A.x) / 2f, A.y);
+ var G = new Vector3(E.x, E.y + (I.y - E.y) / 2f);
+ var K = new Vector3(M.x + (I.x - M.x) / 2f, M.y);
+ var O = new Vector3(A.x, A.y + (M.y - A.y) / 2f);
+
+ var P = new Vector3(A.x, A.y + (O.y - A.y) / 2f);
+ var F = new Vector3(E.x, E.y + (G.y - E.y) / 2f);
+ var N = new Vector3(A.x, O.y + (M.y - O.y) / 2f);
+ var H = new Vector3(E.x, G.y + (I.y - G.y) / 2f);
+
+ var B = new Vector3(A.x + (C.x - A.x) / 2f, A.y);
+ var L = new Vector3(M.x + (K.x - M.x) / 2f, M.y);
+ var D = new Vector3(C.x + (E.x - C.x) / 2f, A.y);
+ var J = new Vector3(K.x + (I.x - K.x) / 2f, M.y);
+
+ // Borders
+ Handles.color = color;
+ Handles.DrawLine(A, E);
+ Handles.DrawLine(E, I);
+ Handles.DrawLine(I, M);
+ Handles.DrawLine(M, new Vector3(A.x, A.y - 1f));
+
+ // Vertical ticks
+ Handles.DrawLine(A, new Vector3(A.x - kTickSize, A.y));
+ Handles.DrawLine(P, new Vector3(P.x - kTickSize, P.y));
+ Handles.DrawLine(O, new Vector3(O.x - kTickSize, O.y));
+ Handles.DrawLine(N, new Vector3(N.x - kTickSize, N.y));
+ Handles.DrawLine(M, new Vector3(M.x - kTickSize, M.y));
+
+ Handles.DrawLine(E, new Vector3(E.x + kTickSize, E.y));
+ Handles.DrawLine(F, new Vector3(F.x + kTickSize, F.y));
+ Handles.DrawLine(G, new Vector3(G.x + kTickSize, G.y));
+ Handles.DrawLine(H, new Vector3(H.x + kTickSize, H.y));
+ Handles.DrawLine(I, new Vector3(I.x + kTickSize, I.y));
+
+ // Horizontal ticks
+ Handles.DrawLine(A, new Vector3(A.x, A.y - kTickSize));
+ Handles.DrawLine(B, new Vector3(B.x, B.y - kTickSize));
+ Handles.DrawLine(C, new Vector3(C.x, C.y - kTickSize));
+ Handles.DrawLine(D, new Vector3(D.x, D.y - kTickSize));
+ Handles.DrawLine(E, new Vector3(E.x, E.y - kTickSize));
+
+ Handles.DrawLine(M, new Vector3(M.x, M.y + kTickSize));
+ Handles.DrawLine(L, new Vector3(L.x, L.y + kTickSize));
+ Handles.DrawLine(K, new Vector3(K.x, K.y + kTickSize));
+ Handles.DrawLine(J, new Vector3(J.x, J.y + kTickSize));
+ Handles.DrawLine(I, new Vector3(I.x, I.y + kTickSize));
+
+ // Labels
+ GUI.color = color;
+ GUI.Label(new Rect(A.x - kTickSize - 34f, A.y - 15f, 30f, 30f), "1.0", FxStyles.tickStyleRight);
+ GUI.Label(new Rect(O.x - kTickSize - 34f, O.y - 15f, 30f, 30f), "0.5", FxStyles.tickStyleRight);
+ GUI.Label(new Rect(M.x - kTickSize - 34f, M.y - 15f, 30f, 30f), "0.0", FxStyles.tickStyleRight);
+
+ GUI.Label(new Rect(E.x + kTickSize + 4f, E.y - 15f, 30f, 30f), "1.0", FxStyles.tickStyleLeft);
+ GUI.Label(new Rect(G.x + kTickSize + 4f, G.y - 15f, 30f, 30f), "0.5", FxStyles.tickStyleLeft);
+ GUI.Label(new Rect(I.x + kTickSize + 4f, I.y - 15f, 30f, 30f), "0.0", FxStyles.tickStyleLeft);
+
+ GUI.Label(new Rect(M.x - 15f, M.y + kTickSize - 4f, 30f, 30f), "0.0", FxStyles.tickStyleCenter);
+ GUI.Label(new Rect(K.x - 15f, K.y + kTickSize - 4f, 30f, 30f), "0.5", FxStyles.tickStyleCenter);
+ GUI.Label(new Rect(I.x - 15f, I.y + kTickSize - 4f, 30f, 30f), "1.0", FxStyles.tickStyleCenter);
+ }
+ }
+ }
+ }
+
+ public override void OnFrameData(RenderTexture source)
+ {
+ if (Application.isPlaying && !m_MonitorSettings.refreshOnPlay)
+ return;
+
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) || Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ return;
+
+ float ratio = (float)source.width / (float)source.height;
+ int h = 512;
+ int w = Mathf.FloorToInt(h * ratio);
+
+ var rt = RenderTexture.GetTemporary(w, h, 0, source.format);
+ Graphics.Blit(source, rt);
+ ComputeHistogram(rt);
+ m_BaseEditor.Repaint();
+ RenderTexture.ReleaseTemporary(rt);
+ }
+
+ void CreateBuffer(int width, int height)
+ {
+ m_Buffer = new ComputeBuffer(width * height, sizeof(uint) << 2);
+ }
+
+ void ComputeHistogram(RenderTexture source)
+ {
+ if (m_Buffer == null)
+ {
+ CreateBuffer(256, 1);
+ }
+ else if (m_Buffer.count != 256)
+ {
+ m_Buffer.Release();
+ CreateBuffer(256, 1);
+ }
+
+ if (m_Material == null)
+ {
+ m_Material = new Material(Shader.Find("Hidden/Post FX/Monitors/Histogram Render")) { hideFlags = HideFlags.DontSave };
+ }
+
+ var channels = Vector4.zero;
+ switch (m_MonitorSettings.histogramMode)
+ {
+ case HistogramMode.Red: channels.x = 1f; break;
+ case HistogramMode.Green: channels.y = 1f; break;
+ case HistogramMode.Blue: channels.z = 1f; break;
+ case HistogramMode.Luminance: channels.w = 1f; break;
+ default: channels = new Vector4(1f, 1f, 1f, 0f); break;
+ }
+
+ var cs = m_ComputeShader;
+
+ int kernel = cs.FindKernel("KHistogramClear");
+ cs.SetBuffer(kernel, "_Histogram", m_Buffer);
+ cs.Dispatch(kernel, 1, 1, 1);
+
+ kernel = cs.FindKernel("KHistogramGather");
+ cs.SetBuffer(kernel, "_Histogram", m_Buffer);
+ cs.SetTexture(kernel, "_Source", source);
+ cs.SetInt("_IsLinear", GraphicsUtils.isLinearColorSpace ? 1 : 0);
+ cs.SetVector("_Res", new Vector4(source.width, source.height, 0f, 0f));
+ cs.SetVector("_Channels", channels);
+ cs.Dispatch(kernel, Mathf.CeilToInt(source.width / 16f), Mathf.CeilToInt(source.height / 16f), 1);
+
+ kernel = cs.FindKernel("KHistogramScale");
+ cs.SetBuffer(kernel, "_Histogram", m_Buffer);
+ cs.Dispatch(kernel, 1, 1, 1);
+
+ if (m_HistogramTexture == null || m_HistogramTexture.width != source.width || m_HistogramTexture.height != source.height)
+ {
+ GraphicsUtils.Destroy(m_HistogramTexture);
+ m_HistogramTexture = new RenderTexture(source.width, source.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear)
+ {
+ hideFlags = HideFlags.DontSave,
+ wrapMode = TextureWrapMode.Clamp,
+ filterMode = FilterMode.Bilinear
+ };
+ }
+
+ m_Material.SetBuffer("_Histogram", m_Buffer);
+ m_Material.SetVector("_Size", new Vector2(m_HistogramTexture.width, m_HistogramTexture.height));
+ m_Material.SetColor("_ColorR", new Color(1f, 0f, 0f, 1f));
+ m_Material.SetColor("_ColorG", new Color(0f, 1f, 0f, 1f));
+ m_Material.SetColor("_ColorB", new Color(0f, 0f, 1f, 1f));
+ m_Material.SetColor("_ColorL", new Color(1f, 1f, 1f, 1f));
+ m_Material.SetInt("_Channel", (int)m_MonitorSettings.histogramMode);
+
+ int pass = 0;
+ if (m_MonitorSettings.histogramMode == HistogramMode.RGBMerged)
+ pass = 1;
+ else if (m_MonitorSettings.histogramMode == HistogramMode.RGBSplit)
+ pass = 2;
+
+ Graphics.Blit(null, m_HistogramTexture, m_Material, pass);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/HistogramMonitor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/HistogramMonitor.cs.meta
similarity index 75%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/HistogramMonitor.cs.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/HistogramMonitor.cs.meta
index dd9a92e..8c0fa34 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/HistogramMonitor.cs.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/HistogramMonitor.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: cce62646e6d421c41b0aa1c300fcd0fe
-timeCreated: 1499676418
+guid: 4581c45ac4aa2264187087659a4cc252
+timeCreated: 1460031632
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/ParadeMonitor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/ParadeMonitor.cs
new file mode 100644
index 0000000..03494b1
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/ParadeMonitor.cs
@@ -0,0 +1,257 @@
+using UnityEditorInternal;
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ public class ParadeMonitor : PostProcessingMonitor
+ {
+ static GUIContent s_MonitorTitle = new GUIContent("Parade");
+
+ ComputeShader m_ComputeShader;
+ ComputeBuffer m_Buffer;
+ Material m_Material;
+ RenderTexture m_WaveformTexture;
+ Rect m_MonitorAreaRect;
+
+ public ParadeMonitor()
+ {
+ m_ComputeShader = EditorResources.Load("Monitors/WaveformCompute.compute");
+ }
+
+ public override void Dispose()
+ {
+ GraphicsUtils.Destroy(m_Material);
+ GraphicsUtils.Destroy(m_WaveformTexture);
+
+ if (m_Buffer != null)
+ m_Buffer.Release();
+
+ m_Material = null;
+ m_WaveformTexture = null;
+ m_Buffer = null;
+ }
+
+ public override bool IsSupported()
+ {
+ return m_ComputeShader != null && GraphicsUtils.supportsDX11;
+ }
+
+ public override GUIContent GetMonitorTitle()
+ {
+ return s_MonitorTitle;
+ }
+
+ public override void OnMonitorSettings()
+ {
+ EditorGUI.BeginChangeCheck();
+
+ bool refreshOnPlay = m_MonitorSettings.refreshOnPlay;
+ float exposure = m_MonitorSettings.paradeExposure;
+
+ refreshOnPlay = GUILayout.Toggle(refreshOnPlay, new GUIContent(FxStyles.playIcon, "Keep refreshing the parade in play mode; this may impact performances."), FxStyles.preButton);
+ exposure = GUILayout.HorizontalSlider(exposure, 0.05f, 0.3f, FxStyles.preSlider, FxStyles.preSliderThumb, GUILayout.Width(40f));
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ Undo.RecordObject(m_BaseEditor.serializedObject.targetObject, "Parade Settings Changed");
+ m_MonitorSettings.refreshOnPlay = refreshOnPlay;
+ m_MonitorSettings.paradeExposure = exposure;
+ InternalEditorUtility.RepaintAllViews();
+ }
+ }
+
+ public override void OnMonitorGUI(Rect r)
+ {
+ if (Event.current.type == EventType.Repaint)
+ {
+ // If m_MonitorAreaRect isn't set the preview was just opened so refresh the render to get the waveform data
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) && Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ InternalEditorUtility.RepaintAllViews();
+
+ // Sizing
+ float width = m_WaveformTexture != null
+ ? Mathf.Min(m_WaveformTexture.width, r.width - 65f)
+ : r.width;
+ float height = m_WaveformTexture != null
+ ? Mathf.Min(m_WaveformTexture.height, r.height - 45f)
+ : r.height;
+
+ m_MonitorAreaRect = new Rect(
+ Mathf.Floor(r.x + r.width / 2f - width / 2f),
+ Mathf.Floor(r.y + r.height / 2f - height / 2f - 5f),
+ width, height
+ );
+
+ if (m_WaveformTexture != null)
+ {
+ m_Material.SetFloat("_Exposure", m_MonitorSettings.paradeExposure);
+
+ var oldActive = RenderTexture.active;
+ Graphics.Blit(null, m_WaveformTexture, m_Material, 0);
+ RenderTexture.active = oldActive;
+
+ Graphics.DrawTexture(m_MonitorAreaRect, m_WaveformTexture);
+
+ var color = Color.white;
+ const float kTickSize = 5f;
+
+ // Rect, lines & ticks points
+ // A O B P C Q D
+ // N E
+ // M F
+ // L G
+ // K T J S I R H
+
+ var A = new Vector3(m_MonitorAreaRect.x, m_MonitorAreaRect.y);
+ var D = new Vector3(A.x + m_MonitorAreaRect.width + 1f, m_MonitorAreaRect.y);
+ var H = new Vector3(D.x, D.y + m_MonitorAreaRect.height + 1f);
+ var K = new Vector3(A.x, H.y);
+
+ var F = new Vector3(D.x, D.y + (H.y - D.y) / 2f);
+ var M = new Vector3(A.x, A.y + (K.y - A.y) / 2f);
+
+ var B = new Vector3(A.x + (D.x - A.x) / 3f, A.y);
+ var C = new Vector3(A.x + (D.x - A.x) * 2f / 3f, A.y);
+ var I = new Vector3(K.x + (H.x - K.x) * 2f / 3f, K.y);
+ var J = new Vector3(K.x + (H.x - K.x) / 3f, K.y);
+
+ var N = new Vector3(A.x, A.y + (M.y - A.y) / 2f);
+ var L = new Vector3(A.x, M.y + (K.y - M.y) / 2f);
+ var E = new Vector3(D.x, D.y + (F.y - D.y) / 2f);
+ var G = new Vector3(D.x, F.y + (H.y - F.y) / 2f);
+
+ var O = new Vector3(A.x + (B.x - A.x) / 2f, A.y);
+ var P = new Vector3(B.x + (C.x - B.x) / 2f, B.y);
+ var Q = new Vector3(C.x + (D.x - C.x) / 2f, C.y);
+
+ var R = new Vector3(I.x + (H.x - I.x) / 2f, I.y);
+ var S = new Vector3(J.x + (I.x - J.x) / 2f, J.y);
+ var T = new Vector3(K.x + (J.x - K.x) / 2f, K.y);
+
+ // Borders
+ Handles.color = color;
+ Handles.DrawLine(A, D);
+ Handles.DrawLine(D, H);
+ Handles.DrawLine(H, K);
+ Handles.DrawLine(K, new Vector3(A.x, A.y - 1f));
+
+ Handles.DrawLine(B, J);
+ Handles.DrawLine(C, I);
+
+ // Vertical ticks
+ Handles.DrawLine(A, new Vector3(A.x - kTickSize, A.y));
+ Handles.DrawLine(N, new Vector3(N.x - kTickSize, N.y));
+ Handles.DrawLine(M, new Vector3(M.x - kTickSize, M.y));
+ Handles.DrawLine(L, new Vector3(L.x - kTickSize, L.y));
+ Handles.DrawLine(K, new Vector3(K.x - kTickSize, K.y));
+
+ Handles.DrawLine(D, new Vector3(D.x + kTickSize, D.y));
+ Handles.DrawLine(E, new Vector3(E.x + kTickSize, E.y));
+ Handles.DrawLine(F, new Vector3(F.x + kTickSize, F.y));
+ Handles.DrawLine(G, new Vector3(G.x + kTickSize, G.y));
+ Handles.DrawLine(H, new Vector3(H.x + kTickSize, H.y));
+
+ // Horizontal ticks
+ Handles.DrawLine(A, new Vector3(A.x, A.y - kTickSize));
+ Handles.DrawLine(B, new Vector3(B.x, B.y - kTickSize));
+ Handles.DrawLine(C, new Vector3(C.x, C.y - kTickSize));
+ Handles.DrawLine(D, new Vector3(D.x, D.y - kTickSize));
+ Handles.DrawLine(O, new Vector3(O.x, O.y - kTickSize));
+ Handles.DrawLine(P, new Vector3(P.x, P.y - kTickSize));
+ Handles.DrawLine(Q, new Vector3(Q.x, Q.y - kTickSize));
+
+ Handles.DrawLine(H, new Vector3(H.x, H.y + kTickSize));
+ Handles.DrawLine(I, new Vector3(I.x, I.y + kTickSize));
+ Handles.DrawLine(J, new Vector3(J.x, J.y + kTickSize));
+ Handles.DrawLine(K, new Vector3(K.x, K.y + kTickSize));
+ Handles.DrawLine(R, new Vector3(R.x, R.y + kTickSize));
+ Handles.DrawLine(S, new Vector3(S.x, S.y + kTickSize));
+ Handles.DrawLine(T, new Vector3(T.x, T.y + kTickSize));
+
+ // Labels
+ GUI.color = color;
+ GUI.Label(new Rect(A.x - kTickSize - 34f, A.y - 15f, 30f, 30f), "1.0", FxStyles.tickStyleRight);
+ GUI.Label(new Rect(M.x - kTickSize - 34f, M.y - 15f, 30f, 30f), "0.5", FxStyles.tickStyleRight);
+ GUI.Label(new Rect(K.x - kTickSize - 34f, K.y - 15f, 30f, 30f), "0.0", FxStyles.tickStyleRight);
+
+ GUI.Label(new Rect(D.x + kTickSize + 4f, D.y - 15f, 30f, 30f), "1.0", FxStyles.tickStyleLeft);
+ GUI.Label(new Rect(F.x + kTickSize + 4f, F.y - 15f, 30f, 30f), "0.5", FxStyles.tickStyleLeft);
+ GUI.Label(new Rect(H.x + kTickSize + 4f, H.y - 15f, 30f, 30f), "0.0", FxStyles.tickStyleLeft);
+ }
+ }
+ }
+
+ public override void OnFrameData(RenderTexture source)
+ {
+ if (Application.isPlaying && !m_MonitorSettings.refreshOnPlay)
+ return;
+
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) || Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ return;
+
+ float ratio = ((float)source.width / (float)source.height) / 3f;
+ int h = 384;
+ int w = Mathf.FloorToInt(h * ratio);
+
+ var rt = RenderTexture.GetTemporary(w, h, 0, source.format);
+ Graphics.Blit(source, rt);
+ ComputeWaveform(rt);
+ m_BaseEditor.Repaint();
+ RenderTexture.ReleaseTemporary(rt);
+ }
+
+ void CreateBuffer(int width, int height)
+ {
+ m_Buffer = new ComputeBuffer(width * height, sizeof(uint) << 2);
+ }
+
+ void ComputeWaveform(RenderTexture source)
+ {
+ if (m_Buffer == null)
+ {
+ CreateBuffer(source.width, source.height);
+ }
+ else if (m_Buffer.count != (source.width * source.height))
+ {
+ m_Buffer.Release();
+ CreateBuffer(source.width, source.height);
+ }
+
+ var channels = m_MonitorSettings.waveformY
+ ? new Vector4(0f, 0f, 0f, 1f)
+ : new Vector4(m_MonitorSettings.waveformR ? 1f : 0f, m_MonitorSettings.waveformG ? 1f : 0f, m_MonitorSettings.waveformB ? 1f : 0f, 0f);
+
+ var cs = m_ComputeShader;
+
+ int kernel = cs.FindKernel("KWaveformClear");
+ cs.SetBuffer(kernel, "_Waveform", m_Buffer);
+ cs.Dispatch(kernel, source.width, 1, 1);
+
+ kernel = cs.FindKernel("KWaveform");
+ cs.SetBuffer(kernel, "_Waveform", m_Buffer);
+ cs.SetTexture(kernel, "_Source", source);
+ cs.SetInt("_IsLinear", GraphicsUtils.isLinearColorSpace ? 1 : 0);
+ cs.SetVector("_Channels", channels);
+ cs.Dispatch(kernel, source.width, 1, 1);
+
+ if (m_WaveformTexture == null || m_WaveformTexture.width != (source.width * 3) || m_WaveformTexture.height != source.height)
+ {
+ GraphicsUtils.Destroy(m_WaveformTexture);
+ m_WaveformTexture = new RenderTexture(source.width * 3, source.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear)
+ {
+ hideFlags = HideFlags.DontSave,
+ wrapMode = TextureWrapMode.Clamp,
+ filterMode = FilterMode.Bilinear
+ };
+ }
+
+ if (m_Material == null)
+ m_Material = new Material(Shader.Find("Hidden/Post FX/Monitors/Parade Render")) { hideFlags = HideFlags.DontSave };
+
+ m_Material.SetBuffer("_Waveform", m_Buffer);
+ m_Material.SetVector("_Size", new Vector2(m_WaveformTexture.width, m_WaveformTexture.height));
+ m_Material.SetVector("_Channels", channels);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/ParadeMonitor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/ParadeMonitor.cs.meta
new file mode 100644
index 0000000..ecd150c
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/ParadeMonitor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b1f878f3742072e40a280683573bd0ee
+timeCreated: 1460031643
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/VectorscopeMonitor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/VectorscopeMonitor.cs
new file mode 100644
index 0000000..8514549
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/VectorscopeMonitor.cs
@@ -0,0 +1,241 @@
+using UnityEditorInternal;
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ public class VectorscopeMonitor : PostProcessingMonitor
+ {
+ static GUIContent s_MonitorTitle = new GUIContent("Vectorscope");
+
+ ComputeShader m_ComputeShader;
+ ComputeBuffer m_Buffer;
+ Material m_Material;
+ RenderTexture m_VectorscopeTexture;
+ Rect m_MonitorAreaRect;
+
+ public VectorscopeMonitor()
+ {
+ m_ComputeShader = EditorResources.Load("Monitors/VectorscopeCompute.compute");
+ }
+
+ public override void Dispose()
+ {
+ GraphicsUtils.Destroy(m_Material);
+ GraphicsUtils.Destroy(m_VectorscopeTexture);
+
+ if (m_Buffer != null)
+ m_Buffer.Release();
+
+ m_Material = null;
+ m_VectorscopeTexture = null;
+ m_Buffer = null;
+ }
+
+ public override bool IsSupported()
+ {
+ return m_ComputeShader != null && GraphicsUtils.supportsDX11;
+ }
+
+ public override GUIContent GetMonitorTitle()
+ {
+ return s_MonitorTitle;
+ }
+
+ public override void OnMonitorSettings()
+ {
+ EditorGUI.BeginChangeCheck();
+
+ bool refreshOnPlay = m_MonitorSettings.refreshOnPlay;
+ float exposure = m_MonitorSettings.vectorscopeExposure;
+ bool showBackground = m_MonitorSettings.vectorscopeShowBackground;
+
+ refreshOnPlay = GUILayout.Toggle(refreshOnPlay, new GUIContent(FxStyles.playIcon, "Keep refreshing the vectorscope in play mode; this may impact performances."), FxStyles.preButton);
+ exposure = GUILayout.HorizontalSlider(exposure, 0.05f, 0.3f, FxStyles.preSlider, FxStyles.preSliderThumb, GUILayout.Width(40f));
+ showBackground = GUILayout.Toggle(showBackground, new GUIContent(FxStyles.checkerIcon, "Show an YUV background in the vectorscope."), FxStyles.preButton);
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ Undo.RecordObject(m_BaseEditor.serializedObject.targetObject, "Vectorscope Settings Changed");
+ m_MonitorSettings.refreshOnPlay = refreshOnPlay;
+ m_MonitorSettings.vectorscopeExposure = exposure;
+ m_MonitorSettings.vectorscopeShowBackground = showBackground;
+ InternalEditorUtility.RepaintAllViews();
+ }
+ }
+
+ public override void OnMonitorGUI(Rect r)
+ {
+ if (Event.current.type == EventType.Repaint)
+ {
+ // If m_MonitorAreaRect isn't set the preview was just opened so refresh the render to get the vectoscope data
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) && Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ InternalEditorUtility.RepaintAllViews();
+
+ // Sizing
+ float size = 0f;
+
+ if (r.width < r.height)
+ {
+ size = m_VectorscopeTexture != null
+ ? Mathf.Min(m_VectorscopeTexture.width, r.width - 35f)
+ : r.width;
+ }
+ else
+ {
+ size = m_VectorscopeTexture != null
+ ? Mathf.Min(m_VectorscopeTexture.height, r.height - 25f)
+ : r.height;
+ }
+
+ m_MonitorAreaRect = new Rect(
+ Mathf.Floor(r.x + r.width / 2f - size / 2f),
+ Mathf.Floor(r.y + r.height / 2f - size / 2f - 5f),
+ size, size
+ );
+
+ if (m_VectorscopeTexture != null)
+ {
+ m_Material.SetFloat("_Exposure", m_MonitorSettings.vectorscopeExposure);
+
+ var oldActive = RenderTexture.active;
+ Graphics.Blit(null, m_VectorscopeTexture, m_Material, m_MonitorSettings.vectorscopeShowBackground ? 0 : 1);
+ RenderTexture.active = oldActive;
+
+ Graphics.DrawTexture(m_MonitorAreaRect, m_VectorscopeTexture);
+
+ var color = Color.white;
+ const float kTickSize = 10f;
+ const int kTickCount = 24;
+
+ float radius = m_MonitorAreaRect.width / 2f;
+ float midX = m_MonitorAreaRect.x + radius;
+ float midY = m_MonitorAreaRect.y + radius;
+ var center = new Vector2(midX, midY);
+
+ // Cross
+ color.a *= 0.5f;
+ Handles.color = color;
+ Handles.DrawLine(new Vector2(midX, m_MonitorAreaRect.y), new Vector2(midX, m_MonitorAreaRect.y + m_MonitorAreaRect.height));
+ Handles.DrawLine(new Vector2(m_MonitorAreaRect.x, midY), new Vector2(m_MonitorAreaRect.x + m_MonitorAreaRect.width, midY));
+
+ if (m_MonitorAreaRect.width > 100f)
+ {
+ color.a = 1f;
+
+ // Ticks
+ Handles.color = color;
+ for (int i = 0; i < kTickCount; i++)
+ {
+ float a = (float)i / (float)kTickCount;
+ float theta = a * (Mathf.PI * 2f);
+ float tx = Mathf.Cos(theta + (Mathf.PI / 2f));
+ float ty = Mathf.Sin(theta - (Mathf.PI / 2f));
+ var innerVec = center + new Vector2(tx, ty) * (radius - kTickSize);
+ var outerVec = center + new Vector2(tx, ty) * radius;
+ Handles.DrawAAPolyLine(3f, innerVec, outerVec);
+ }
+
+ // Labels (where saturation reaches 75%)
+ color.a = 1f;
+ var oldColor = GUI.color;
+ GUI.color = color * 2f;
+
+ var point = new Vector2(-0.254f, -0.750f) * radius + center;
+ var rect = new Rect(point.x - 10f, point.y - 10f, 20f, 20f);
+ GUI.Label(rect, "[R]", FxStyles.tickStyleCenter);
+
+ point = new Vector2(-0.497f, 0.629f) * radius + center;
+ rect = new Rect(point.x - 10f, point.y - 10f, 20f, 20f);
+ GUI.Label(rect, "[G]", FxStyles.tickStyleCenter);
+
+ point = new Vector2(0.750f, 0.122f) * radius + center;
+ rect = new Rect(point.x - 10f, point.y - 10f, 20f, 20f);
+ GUI.Label(rect, "[B]", FxStyles.tickStyleCenter);
+
+ point = new Vector2(-0.750f, -0.122f) * radius + center;
+ rect = new Rect(point.x - 10f, point.y - 10f, 20f, 20f);
+ GUI.Label(rect, "[Y]", FxStyles.tickStyleCenter);
+
+ point = new Vector2(0.254f, 0.750f) * radius + center;
+ rect = new Rect(point.x - 10f, point.y - 10f, 20f, 20f);
+ GUI.Label(rect, "[C]", FxStyles.tickStyleCenter);
+
+ point = new Vector2(0.497f, -0.629f) * radius + center;
+ rect = new Rect(point.x - 10f, point.y - 10f, 20f, 20f);
+ GUI.Label(rect, "[M]", FxStyles.tickStyleCenter);
+ GUI.color = oldColor;
+ }
+ }
+ }
+ }
+
+ public override void OnFrameData(RenderTexture source)
+ {
+ if (Application.isPlaying && !m_MonitorSettings.refreshOnPlay)
+ return;
+
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) || Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ return;
+
+ float ratio = (float)source.width / (float)source.height;
+ int h = 384;
+ int w = Mathf.FloorToInt(h * ratio);
+
+ var rt = RenderTexture.GetTemporary(w, h, 0, source.format);
+ Graphics.Blit(source, rt);
+ ComputeVectorscope(rt);
+ m_BaseEditor.Repaint();
+ RenderTexture.ReleaseTemporary(rt);
+ }
+
+ void CreateBuffer(int width, int height)
+ {
+ m_Buffer = new ComputeBuffer(width * height, sizeof(uint));
+ }
+
+ void ComputeVectorscope(RenderTexture source)
+ {
+ if (m_Buffer == null)
+ {
+ CreateBuffer(source.width, source.height);
+ }
+ else if (m_Buffer.count != (source.width * source.height))
+ {
+ m_Buffer.Release();
+ CreateBuffer(source.width, source.height);
+ }
+
+ var cs = m_ComputeShader;
+
+ int kernel = cs.FindKernel("KVectorscopeClear");
+ cs.SetBuffer(kernel, "_Vectorscope", m_Buffer);
+ cs.SetVector("_Res", new Vector4(source.width, source.height, 0f, 0f));
+ cs.Dispatch(kernel, Mathf.CeilToInt(source.width / 32f), Mathf.CeilToInt(source.height / 32f), 1);
+
+ kernel = cs.FindKernel("KVectorscope");
+ cs.SetBuffer(kernel, "_Vectorscope", m_Buffer);
+ cs.SetTexture(kernel, "_Source", source);
+ cs.SetInt("_IsLinear", GraphicsUtils.isLinearColorSpace ? 1 : 0);
+ cs.SetVector("_Res", new Vector4(source.width, source.height, 0f, 0f));
+ cs.Dispatch(kernel, Mathf.CeilToInt(source.width / 32f), Mathf.CeilToInt(source.height / 32f), 1);
+
+ if (m_VectorscopeTexture == null || m_VectorscopeTexture.width != source.width || m_VectorscopeTexture.height != source.height)
+ {
+ GraphicsUtils.Destroy(m_VectorscopeTexture);
+ m_VectorscopeTexture = new RenderTexture(source.width, source.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear)
+ {
+ hideFlags = HideFlags.DontSave,
+ wrapMode = TextureWrapMode.Clamp,
+ filterMode = FilterMode.Bilinear
+ };
+ }
+
+ if (m_Material == null)
+ m_Material = new Material(Shader.Find("Hidden/Post FX/Monitors/Vectorscope Render")) { hideFlags = HideFlags.DontSave };
+
+ m_Material.SetBuffer("_Vectorscope", m_Buffer);
+ m_Material.SetVector("_Size", new Vector2(m_VectorscopeTexture.width, m_VectorscopeTexture.height));
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/VectorscopeMonitor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/VectorscopeMonitor.cs.meta
similarity index 75%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/VectorscopeMonitor.cs.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/VectorscopeMonitor.cs.meta
index 5b15b30..f831bdc 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/VectorscopeMonitor.cs.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/VectorscopeMonitor.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 279b45d82a92b4d4fa0b30d03486fa68
-timeCreated: 1499676436
+guid: 805119df0d94800418006c621cc99cc2
+timeCreated: 1461748750
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/WaveformMonitor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/WaveformMonitor.cs
new file mode 100644
index 0000000..98d3f8e
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/WaveformMonitor.cs
@@ -0,0 +1,280 @@
+using UnityEditorInternal;
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ public class WaveformMonitor : PostProcessingMonitor
+ {
+ static GUIContent s_MonitorTitle = new GUIContent("Waveform");
+
+ ComputeShader m_ComputeShader;
+ ComputeBuffer m_Buffer;
+ Material m_Material;
+ RenderTexture m_WaveformTexture;
+ Rect m_MonitorAreaRect;
+
+ public WaveformMonitor()
+ {
+ m_ComputeShader = EditorResources.Load("Monitors/WaveformCompute.compute");
+ }
+
+ public override void Dispose()
+ {
+ GraphicsUtils.Destroy(m_Material);
+ GraphicsUtils.Destroy(m_WaveformTexture);
+
+ if (m_Buffer != null)
+ m_Buffer.Release();
+
+ m_Material = null;
+ m_WaveformTexture = null;
+ m_Buffer = null;
+ }
+
+ public override bool IsSupported()
+ {
+ return m_ComputeShader != null && GraphicsUtils.supportsDX11;
+ }
+
+ public override GUIContent GetMonitorTitle()
+ {
+ return s_MonitorTitle;
+ }
+
+ public override void OnMonitorSettings()
+ {
+ EditorGUI.BeginChangeCheck();
+
+ bool refreshOnPlay = m_MonitorSettings.refreshOnPlay;
+ float exposure = m_MonitorSettings.waveformExposure;
+ bool Y = m_MonitorSettings.waveformY;
+ bool R = m_MonitorSettings.waveformR;
+ bool G = m_MonitorSettings.waveformG;
+ bool B = m_MonitorSettings.waveformB;
+
+ refreshOnPlay = GUILayout.Toggle(refreshOnPlay, new GUIContent(FxStyles.playIcon, "Keep refreshing the waveform in play mode; this may impact performances."), FxStyles.preButton);
+
+ exposure = GUILayout.HorizontalSlider(exposure, 0.05f, 0.3f, FxStyles.preSlider, FxStyles.preSliderThumb, GUILayout.Width(40f));
+
+ Y = GUILayout.Toggle(Y, new GUIContent("Y", "Show the luminance waveform only."), FxStyles.preButton);
+
+ if (Y)
+ {
+ R = false;
+ G = false;
+ B = false;
+ }
+
+ R = GUILayout.Toggle(R, new GUIContent("R", "Show the red waveform."), FxStyles.preButton);
+ G = GUILayout.Toggle(G, new GUIContent("G", "Show the green waveform."), FxStyles.preButton);
+ B = GUILayout.Toggle(B, new GUIContent("B", "Show the blue waveform."), FxStyles.preButton);
+
+ if (R || G || B)
+ Y = false;
+
+ if (!Y && !R && !G && !B)
+ {
+ R = true;
+ G = true;
+ B = true;
+ }
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ Undo.RecordObject(m_BaseEditor.serializedObject.targetObject, "Waveforme Settings Changed");
+ m_MonitorSettings.refreshOnPlay = refreshOnPlay;
+ m_MonitorSettings.waveformExposure = exposure;
+ m_MonitorSettings.waveformY = Y;
+ m_MonitorSettings.waveformR = R;
+ m_MonitorSettings.waveformG = G;
+ m_MonitorSettings.waveformB = B;
+ InternalEditorUtility.RepaintAllViews();
+ }
+ }
+
+ public override void OnMonitorGUI(Rect r)
+ {
+ if (Event.current.type == EventType.Repaint)
+ {
+ // If m_MonitorAreaRect isn't set the preview was just opened so refresh the render to get the waveform data
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) && Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ InternalEditorUtility.RepaintAllViews();
+
+ // Sizing
+ float width = m_WaveformTexture != null
+ ? Mathf.Min(m_WaveformTexture.width, r.width - 65f)
+ : r.width;
+ float height = m_WaveformTexture != null
+ ? Mathf.Min(m_WaveformTexture.height, r.height - 45f)
+ : r.height;
+
+ m_MonitorAreaRect = new Rect(
+ Mathf.Floor(r.x + r.width / 2f - width / 2f),
+ Mathf.Floor(r.y + r.height / 2f - height / 2f - 5f),
+ width, height
+ );
+
+ if (m_WaveformTexture != null)
+ {
+ m_Material.SetFloat("_Exposure", m_MonitorSettings.waveformExposure);
+
+ var oldActive = RenderTexture.active;
+ Graphics.Blit(null, m_WaveformTexture, m_Material, 0);
+ RenderTexture.active = oldActive;
+
+ Graphics.DrawTexture(m_MonitorAreaRect, m_WaveformTexture);
+
+ var color = Color.white;
+ const float kTickSize = 5f;
+
+ // Rect, lines & ticks points
+ // A B C D E
+ // P F
+ // O G
+ // N H
+ // M L K J I
+
+ var A = new Vector3(m_MonitorAreaRect.x, m_MonitorAreaRect.y);
+ var E = new Vector3(A.x + m_MonitorAreaRect.width + 1f, m_MonitorAreaRect.y);
+ var I = new Vector3(E.x, E.y + m_MonitorAreaRect.height + 1f);
+ var M = new Vector3(A.x, I.y);
+
+ var C = new Vector3(A.x + (E.x - A.x) / 2f, A.y);
+ var G = new Vector3(E.x, E.y + (I.y - E.y) / 2f);
+ var K = new Vector3(M.x + (I.x - M.x) / 2f, M.y);
+ var O = new Vector3(A.x, A.y + (M.y - A.y) / 2f);
+
+ var P = new Vector3(A.x, A.y + (O.y - A.y) / 2f);
+ var F = new Vector3(E.x, E.y + (G.y - E.y) / 2f);
+ var N = new Vector3(A.x, O.y + (M.y - O.y) / 2f);
+ var H = new Vector3(E.x, G.y + (I.y - G.y) / 2f);
+
+ var B = new Vector3(A.x + (C.x - A.x) / 2f, A.y);
+ var L = new Vector3(M.x + (K.x - M.x) / 2f, M.y);
+ var D = new Vector3(C.x + (E.x - C.x) / 2f, A.y);
+ var J = new Vector3(K.x + (I.x - K.x) / 2f, M.y);
+
+ // Borders
+ Handles.color = color;
+ Handles.DrawLine(A, E);
+ Handles.DrawLine(E, I);
+ Handles.DrawLine(I, M);
+ Handles.DrawLine(M, new Vector3(A.x, A.y - 1f));
+
+ // Vertical ticks
+ Handles.DrawLine(A, new Vector3(A.x - kTickSize, A.y));
+ Handles.DrawLine(P, new Vector3(P.x - kTickSize, P.y));
+ Handles.DrawLine(O, new Vector3(O.x - kTickSize, O.y));
+ Handles.DrawLine(N, new Vector3(N.x - kTickSize, N.y));
+ Handles.DrawLine(M, new Vector3(M.x - kTickSize, M.y));
+
+ Handles.DrawLine(E, new Vector3(E.x + kTickSize, E.y));
+ Handles.DrawLine(F, new Vector3(F.x + kTickSize, F.y));
+ Handles.DrawLine(G, new Vector3(G.x + kTickSize, G.y));
+ Handles.DrawLine(H, new Vector3(H.x + kTickSize, H.y));
+ Handles.DrawLine(I, new Vector3(I.x + kTickSize, I.y));
+
+ // Horizontal ticks
+ Handles.DrawLine(A, new Vector3(A.x, A.y - kTickSize));
+ Handles.DrawLine(B, new Vector3(B.x, B.y - kTickSize));
+ Handles.DrawLine(C, new Vector3(C.x, C.y - kTickSize));
+ Handles.DrawLine(D, new Vector3(D.x, D.y - kTickSize));
+ Handles.DrawLine(E, new Vector3(E.x, E.y - kTickSize));
+
+ Handles.DrawLine(M, new Vector3(M.x, M.y + kTickSize));
+ Handles.DrawLine(L, new Vector3(L.x, L.y + kTickSize));
+ Handles.DrawLine(K, new Vector3(K.x, K.y + kTickSize));
+ Handles.DrawLine(J, new Vector3(J.x, J.y + kTickSize));
+ Handles.DrawLine(I, new Vector3(I.x, I.y + kTickSize));
+
+ // Labels
+ GUI.color = color;
+ GUI.Label(new Rect(A.x - kTickSize - 34f, A.y - 15f, 30f, 30f), "1.0", FxStyles.tickStyleRight);
+ GUI.Label(new Rect(O.x - kTickSize - 34f, O.y - 15f, 30f, 30f), "0.5", FxStyles.tickStyleRight);
+ GUI.Label(new Rect(M.x - kTickSize - 34f, M.y - 15f, 30f, 30f), "0.0", FxStyles.tickStyleRight);
+
+ GUI.Label(new Rect(E.x + kTickSize + 4f, E.y - 15f, 30f, 30f), "1.0", FxStyles.tickStyleLeft);
+ GUI.Label(new Rect(G.x + kTickSize + 4f, G.y - 15f, 30f, 30f), "0.5", FxStyles.tickStyleLeft);
+ GUI.Label(new Rect(I.x + kTickSize + 4f, I.y - 15f, 30f, 30f), "0.0", FxStyles.tickStyleLeft);
+
+ GUI.Label(new Rect(M.x - 15f, M.y + kTickSize - 4f, 30f, 30f), "0.0", FxStyles.tickStyleCenter);
+ GUI.Label(new Rect(K.x - 15f, K.y + kTickSize - 4f, 30f, 30f), "0.5", FxStyles.tickStyleCenter);
+ GUI.Label(new Rect(I.x - 15f, I.y + kTickSize - 4f, 30f, 30f), "1.0", FxStyles.tickStyleCenter);
+ }
+ }
+ }
+
+ public override void OnFrameData(RenderTexture source)
+ {
+ if (Application.isPlaying && !m_MonitorSettings.refreshOnPlay)
+ return;
+
+ if (Mathf.Approximately(m_MonitorAreaRect.width, 0) || Mathf.Approximately(m_MonitorAreaRect.height, 0))
+ return;
+
+ float ratio = (float)source.width / (float)source.height;
+ int h = 384;
+ int w = Mathf.FloorToInt(h * ratio);
+
+ var rt = RenderTexture.GetTemporary(w, h, 0, source.format);
+ Graphics.Blit(source, rt);
+ ComputeWaveform(rt);
+ m_BaseEditor.Repaint();
+ RenderTexture.ReleaseTemporary(rt);
+ }
+
+ void CreateBuffer(int width, int height)
+ {
+ m_Buffer = new ComputeBuffer(width * height, sizeof(uint) << 2);
+ }
+
+ void ComputeWaveform(RenderTexture source)
+ {
+ if (m_Buffer == null)
+ {
+ CreateBuffer(source.width, source.height);
+ }
+ else if (m_Buffer.count != (source.width * source.height))
+ {
+ m_Buffer.Release();
+ CreateBuffer(source.width, source.height);
+ }
+
+ var channels = m_MonitorSettings.waveformY
+ ? new Vector4(0f, 0f, 0f, 1f)
+ : new Vector4(m_MonitorSettings.waveformR ? 1f : 0f, m_MonitorSettings.waveformG ? 1f : 0f, m_MonitorSettings.waveformB ? 1f : 0f, 0f);
+
+ var cs = m_ComputeShader;
+
+ int kernel = cs.FindKernel("KWaveformClear");
+ cs.SetBuffer(kernel, "_Waveform", m_Buffer);
+ cs.Dispatch(kernel, source.width, 1, 1);
+
+ kernel = cs.FindKernel("KWaveform");
+ cs.SetBuffer(kernel, "_Waveform", m_Buffer);
+ cs.SetTexture(kernel, "_Source", source);
+ cs.SetInt("_IsLinear", GraphicsUtils.isLinearColorSpace ? 1 : 0);
+ cs.SetVector("_Channels", channels);
+ cs.Dispatch(kernel, source.width, 1, 1);
+
+ if (m_WaveformTexture == null || m_WaveformTexture.width != source.width || m_WaveformTexture.height != source.height)
+ {
+ GraphicsUtils.Destroy(m_WaveformTexture);
+ m_WaveformTexture = new RenderTexture(source.width, source.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear)
+ {
+ hideFlags = HideFlags.DontSave,
+ wrapMode = TextureWrapMode.Clamp,
+ filterMode = FilterMode.Bilinear
+ };
+ }
+
+ if (m_Material == null)
+ m_Material = new Material(Shader.Find("Hidden/Post FX/Monitors/Waveform Render")) { hideFlags = HideFlags.DontSave };
+
+ m_Material.SetBuffer("_Waveform", m_Buffer);
+ m_Material.SetVector("_Size", new Vector2(m_WaveformTexture.width, m_WaveformTexture.height));
+ m_Material.SetVector("_Channels", channels);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/WaveformMonitor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/WaveformMonitor.cs.meta
similarity index 75%
rename from Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/WaveformMonitor.cs.meta
rename to Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/WaveformMonitor.cs.meta
index a5f61be..cd79e68 100644
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Runtime/Monitors/WaveformMonitor.cs.meta
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Monitors/WaveformMonitor.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: d579562c49280d84cb532cd67d19da5d
-timeCreated: 1499676423
+guid: 2d45bc7edb5916446b4fa1ae1b6f9065
+timeCreated: 1459957472
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessDebugEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessDebugEditor.cs
deleted file mode 100644
index 37a2008..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessDebugEditor.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [CustomEditor(typeof(PostProcessDebug))]
- public sealed class PostProcessDebugEditor : BaseEditor
- {
- SerializedProperty m_PostProcessLayer;
- SerializedProperty m_LightMeterEnabled;
- SerializedProperty m_HistogramEnabled;
- SerializedProperty m_WaveformEnabled;
- SerializedProperty m_VectorscopeEnabled;
- SerializedProperty m_Overlay;
-
- SerializedObject m_LayerObject;
-
- SerializedProperty m_LightMeterShowCurves;
- SerializedProperty m_HistogramChannel;
- SerializedProperty m_WaveformExposure;
- SerializedProperty m_VectorscopeExposure;
-
- SerializedProperty m_MotionColorIntensity;
- SerializedProperty m_MotionGridSize;
- SerializedProperty m_ColorBlindness;
- SerializedProperty m_ColorBlindnessStrength;
-
- void OnEnable()
- {
- m_PostProcessLayer = FindProperty(x => x.postProcessLayer);
- m_LightMeterEnabled = FindProperty(x => x.lightMeter);
- m_HistogramEnabled = FindProperty(x => x.histogram);
- m_WaveformEnabled = FindProperty(x => x.waveform);
- m_VectorscopeEnabled = FindProperty(x => x.vectorscope);
- m_Overlay = FindProperty(x => x.debugOverlay);
-
- if (m_PostProcessLayer.objectReferenceValue != null)
- RebuildProperties();
- }
-
- void RebuildProperties()
- {
- if (m_PostProcessLayer.objectReferenceValue == null)
- return;
-
- m_LayerObject = new SerializedObject(m_Target.postProcessLayer);
-
- m_LightMeterShowCurves = m_LayerObject.FindProperty("debugLayer.lightMeter.showCurves");
- m_HistogramChannel = m_LayerObject.FindProperty("debugLayer.histogram.channel");
- m_WaveformExposure = m_LayerObject.FindProperty("debugLayer.waveform.exposure");
- m_VectorscopeExposure = m_LayerObject.FindProperty("debugLayer.vectorscope.exposure");
-
- m_MotionColorIntensity = m_LayerObject.FindProperty("debugLayer.overlaySettings.motionColorIntensity");
- m_MotionGridSize = m_LayerObject.FindProperty("debugLayer.overlaySettings.motionGridSize");
- m_ColorBlindness = m_LayerObject.FindProperty("debugLayer.overlaySettings.colorBlindnessType");
- m_ColorBlindnessStrength = m_LayerObject.FindProperty("debugLayer.overlaySettings.colorBlindnessStrength");
- }
-
- public override void OnInspectorGUI()
- {
- serializedObject.Update();
-
- using (var changed = new EditorGUI.ChangeCheckScope())
- {
- EditorGUILayout.PropertyField(m_PostProcessLayer);
- serializedObject.ApplyModifiedProperties(); // Needed to rebuild properties after a change
- serializedObject.Update();
-
- if (changed.changed)
- RebuildProperties();
- }
-
- if (m_PostProcessLayer.objectReferenceValue != null)
- {
- m_LayerObject.Update();
-
- // Overlays
- EditorGUILayout.Space();
- EditorGUILayout.LabelField(EditorUtilities.GetContent("Overlay"), EditorStyles.boldLabel);
- EditorGUI.indentLevel++;
- EditorGUILayout.PropertyField(m_Overlay);
- DoOverlayGUI(DebugOverlay.MotionVectors, m_MotionColorIntensity, m_MotionGridSize);
- DoOverlayGUI(DebugOverlay.ColorBlindnessSimulation, m_ColorBlindness, m_ColorBlindnessStrength);
-
- // Special cases
- if (m_Overlay.intValue == (int)DebugOverlay.NANTracker && m_Target.postProcessLayer.stopNaNPropagation)
- EditorGUILayout.HelpBox("Disable \"Stop NaN Propagation\" in the Post-process layer or NaNs will be overwritten!", MessageType.Warning);
-
- EditorGUI.indentLevel--;
-
- // Monitors
- EditorGUILayout.Space();
- EditorGUILayout.LabelField(EditorUtilities.GetContent("Monitors"), EditorStyles.boldLabel);
- EditorGUI.indentLevel++;
- DoMonitorGUI(EditorUtilities.GetContent("Light Meter"), m_LightMeterEnabled, m_LightMeterShowCurves);
- DoMonitorGUI(EditorUtilities.GetContent("Histogram"), m_HistogramEnabled, m_HistogramChannel);
- DoMonitorGUI(EditorUtilities.GetContent("Waveform"), m_WaveformEnabled, m_WaveformExposure);
- DoMonitorGUI(EditorUtilities.GetContent("Vectoscope"), m_VectorscopeEnabled, m_VectorscopeExposure);
- EditorGUI.indentLevel--;
-
- m_LayerObject.ApplyModifiedProperties();
- }
-
- serializedObject.ApplyModifiedProperties();
- }
-
- void DoMonitorGUI(GUIContent content, SerializedProperty prop, params SerializedProperty[] settings)
- {
- EditorGUILayout.PropertyField(prop, content);
-
- if (settings == null || settings.Length == 0)
- return;
-
- if (prop.boolValue)
- {
- EditorGUI.indentLevel++;
- foreach (var p in settings)
- EditorGUILayout.PropertyField(p);
- EditorGUI.indentLevel--;
- }
- }
-
- void DoOverlayGUI(DebugOverlay overlay, params SerializedProperty[] settings)
- {
- if (m_Overlay.intValue != (int)overlay)
- return;
-
- if (settings == null || settings.Length == 0)
- return;
-
- foreach (var p in settings)
- EditorGUILayout.PropertyField(p);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessDebugEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessDebugEditor.cs.meta
deleted file mode 100644
index c58dbc5..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessDebugEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 75be0b76c5da33a41a2e679cfb7f453c
-timeCreated: 1499771607
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectBaseEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectBaseEditor.cs
deleted file mode 100644
index ab74be9..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectBaseEditor.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-using System;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public class PostProcessEffectBaseEditor
- {
- internal PostProcessEffectSettings target { get; private set; }
- internal SerializedObject serializedObject { get; private set; }
-
- internal SerializedProperty baseProperty;
- internal SerializedProperty activeProperty;
-
- SerializedProperty m_Enabled;
- Editor m_Inspector;
-
- internal PostProcessEffectBaseEditor()
- {
- }
-
- public void Repaint()
- {
- m_Inspector.Repaint();
- }
-
- internal void Init(PostProcessEffectSettings target, Editor inspector)
- {
- this.target = target;
- m_Inspector = inspector;
- serializedObject = new SerializedObject(target);
- m_Enabled = serializedObject.FindProperty("enabled.value");
- activeProperty = serializedObject.FindProperty("active");
- OnEnable();
- }
-
- public virtual void OnEnable()
- {
- }
-
- public virtual void OnDisable()
- {
- }
-
- internal void OnInternalInspectorGUI()
- {
- serializedObject.Update();
- TopRowFields();
- OnInspectorGUI();
- EditorGUILayout.Space();
- serializedObject.ApplyModifiedProperties();
- }
-
- public virtual void OnInspectorGUI()
- {
- }
-
- public virtual string GetDisplayTitle()
- {
- return ObjectNames.NicifyVariableName(target.GetType().Name);
- }
-
- void TopRowFields()
- {
- using (new EditorGUILayout.HorizontalScope())
- {
- if (GUILayout.Button(EditorUtilities.GetContent("All|Toggle all overrides on. To maximize performances you should only toggle overrides that you actually need."), Styling.miniLabelButton, GUILayout.Width(17f), GUILayout.ExpandWidth(false)))
- SetAllOverridesTo(true);
-
- if (GUILayout.Button(EditorUtilities.GetContent("None|Toggle all overrides off."), Styling.miniLabelButton, GUILayout.Width(32f), GUILayout.ExpandWidth(false)))
- SetAllOverridesTo(false);
-
- GUILayout.FlexibleSpace();
-
- bool enabled = m_Enabled.boolValue;
- enabled = GUILayout.Toggle(enabled, EditorUtilities.GetContent("On|Enable this effect."), EditorStyles.miniButtonLeft, GUILayout.Width(35f), GUILayout.ExpandWidth(false));
- enabled = !GUILayout.Toggle(!enabled, EditorUtilities.GetContent("Off|Disable this effect."), EditorStyles.miniButtonRight, GUILayout.Width(35f), GUILayout.ExpandWidth(false));
- m_Enabled.boolValue = enabled;
- }
- }
-
- void SetAllOverridesTo(bool state)
- {
- Undo.RecordObject(target, "Toggle All");
- target.SetAllOverridesTo(state);
- serializedObject.Update();
- }
-
- protected void PropertyField(SerializedParameterOverride property)
- {
- var title = EditorUtilities.GetContent(property.displayName);
- PropertyField(property, title);
- }
-
- protected void PropertyField(SerializedParameterOverride property, GUIContent title)
- {
- // Check for DisplayNameAttribute first
- var displayNameAttr = property.GetAttribute();
- if (displayNameAttr != null)
- title.text = displayNameAttr.displayName;
-
- // Add tooltip if it's missing and an attribute is available
- if (string.IsNullOrEmpty(title.tooltip))
- {
- var tooltipAttr = property.GetAttribute();
- if (tooltipAttr != null)
- title.tooltip = tooltipAttr.tooltip;
- }
-
- // Look for a compatible attribute decorator
- AttributeDecorator decorator = null;
- Attribute attribute = null;
-
- foreach (var attr in property.attributes)
- {
- // Use the first decorator we found
- if (decorator == null)
- {
- decorator = EditorUtilities.GetDecorator(attr.GetType());
- attribute = attr;
- }
-
- // Draw unity built-in Decorators (Space, Header)
- if (attr is PropertyAttribute)
- {
- if (attr is SpaceAttribute)
- {
- EditorGUILayout.GetControlRect(false, (attr as SpaceAttribute).height);
- }
- else if (attr is HeaderAttribute)
- {
- var rect = EditorGUILayout.GetControlRect(false, 24f);
- rect.y += 8f;
- rect = EditorGUI.IndentedRect(rect);
- EditorGUI.LabelField(rect, (attr as HeaderAttribute).header, Styling.labelHeader);
- }
- }
- }
-
- bool invalidProp = false;
-
- if (decorator != null && !decorator.IsAutoProperty())
- {
- if (decorator.OnGUI(property.value, property.overrideState, title, attribute))
- return;
-
- // Attribute is invalid for the specified property; use default unity field instead
- invalidProp = true;
- }
-
- using (new EditorGUILayout.HorizontalScope())
- {
- // Override checkbox
- var overrideRect = GUILayoutUtility.GetRect(17f, 17f, GUILayout.ExpandWidth(false));
- overrideRect.yMin += 4f;
- EditorUtilities.DrawOverrideCheckbox(overrideRect, property.overrideState);
-
- // Property
- using (new EditorGUI.DisabledScope(!property.overrideState.boolValue))
- {
- if (decorator != null && !invalidProp)
- {
- if (decorator.OnGUI(property.value, property.overrideState, title, attribute))
- return;
- }
-
- // Default unity field
- if (property.value.hasVisibleChildren
- && property.value.propertyType != SerializedPropertyType.Vector2
- && property.value.propertyType != SerializedPropertyType.Vector3)
- {
- GUILayout.Space(12f);
- EditorGUILayout.PropertyField(property.value, title, true);
- }
- else
- {
- EditorGUILayout.PropertyField(property.value, title);
- }
- }
- }
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectBaseEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectBaseEditor.cs.meta
deleted file mode 100644
index 9cf37b8..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectBaseEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 5a7e5d36c781f1a469ea8f981b785506
-timeCreated: 1492689813
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectEditor.cs
deleted file mode 100644
index d8a8c82..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectEditor.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using System.Linq.Expressions;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public class PostProcessEffectEditor : PostProcessEffectBaseEditor
- where T : PostProcessEffectSettings
- {
- protected SerializedProperty FindProperty(Expression> expr)
- {
- return serializedObject.FindProperty(RuntimeUtilities.GetFieldPath(expr));
- }
-
- protected SerializedParameterOverride FindParameterOverride(Expression> expr)
- {
- var property = serializedObject.FindProperty(RuntimeUtilities.GetFieldPath(expr));
- var attributes = RuntimeUtilities.GetMemberAttributes(expr);
- return new SerializedParameterOverride(property, attributes);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectEditor.cs.meta
deleted file mode 100644
index dd6be58..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessEffectEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: e81ec1796a6c9844f9ab3847494d7911
-timeCreated: 1492690838
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessLayerEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessLayerEditor.cs
deleted file mode 100644
index 09f3bf2..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessLayerEditor.cs
+++ /dev/null
@@ -1,412 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-using UnityEditorInternal;
-using System.IO;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- using SerializedBundleRef = PostProcessLayer.SerializedBundleRef;
- using EXRFlags = Texture2D.EXRFlags;
-
- [CanEditMultipleObjects, CustomEditor(typeof(PostProcessLayer))]
- public sealed class PostProcessLayerEditor : BaseEditor
- {
- SerializedProperty m_StopNaNPropagation;
- SerializedProperty m_VolumeTrigger;
- SerializedProperty m_VolumeLayer;
-
- SerializedProperty m_AntialiasingMode;
- SerializedProperty m_TaaJitterSpread;
- SerializedProperty m_TaaSharpness;
- SerializedProperty m_TaaStationaryBlending;
- SerializedProperty m_TaaMotionBlending;
- SerializedProperty m_SmaaQuality;
- SerializedProperty m_FxaaFastMode;
- SerializedProperty m_FxaaKeepAlpha;
-
- SerializedProperty m_FogEnabled;
- SerializedProperty m_FogExcludeSkybox;
-
- SerializedProperty m_ShowToolkit;
- SerializedProperty m_ShowCustomSorter;
-
- Dictionary m_CustomLists;
-
- static GUIContent[] s_AntialiasingMethodNames =
- {
- new GUIContent("No Anti-aliasing"),
- new GUIContent("Fast Approximate Anti-aliasing (FXAA)"),
- new GUIContent("Subpixel Morphological Anti-aliasing (SMAA)"),
- new GUIContent("Temporal Anti-aliasing (TAA)")
- };
-
- enum ExportMode
- {
- FullFrame,
- DisablePost,
- BreakBeforeColorGradingLinear,
- BreakBeforeColorGradingLog
- }
-
- void OnEnable()
- {
- m_StopNaNPropagation = FindProperty(x => x.stopNaNPropagation);
- m_VolumeTrigger = FindProperty(x => x.volumeTrigger);
- m_VolumeLayer = FindProperty(x => x.volumeLayer);
-
- m_AntialiasingMode = FindProperty(x => x.antialiasingMode);
- m_TaaJitterSpread = FindProperty(x => x.temporalAntialiasing.jitterSpread);
- m_TaaSharpness = FindProperty(x => x.temporalAntialiasing.sharpness);
- m_TaaStationaryBlending = FindProperty(x => x.temporalAntialiasing.stationaryBlending);
- m_TaaMotionBlending = FindProperty(x => x.temporalAntialiasing.motionBlending);
- m_SmaaQuality = FindProperty(x => x.subpixelMorphologicalAntialiasing.quality);
- m_FxaaFastMode = FindProperty(x => x.fastApproximateAntialiasing.fastMode);
- m_FxaaKeepAlpha = FindProperty(x => x.fastApproximateAntialiasing.keepAlpha);
-
- m_FogEnabled = FindProperty(x => x.fog.enabled);
- m_FogExcludeSkybox = FindProperty(x => x.fog.excludeSkybox);
-
- m_ShowToolkit = serializedObject.FindProperty("m_ShowToolkit");
- m_ShowCustomSorter = serializedObject.FindProperty("m_ShowCustomSorter");
- }
-
- void OnDisable()
- {
- m_CustomLists = null;
- }
-
- public override void OnInspectorGUI()
- {
- serializedObject.Update();
-
- var camera = m_Target.GetComponent();
-
- #if !UNITY_2017_2_OR_NEWER
- if (RuntimeUtilities.isSinglePassStereoSelected)
- EditorGUILayout.HelpBox("Unity 2017.2+ required for full Single-pass stereo rendering support.", MessageType.Warning);
- #endif
-
- DoVolumeBlending();
- DoAntialiasing();
- DoFog(camera);
-
- EditorGUILayout.PropertyField(m_StopNaNPropagation, EditorUtilities.GetContent("Stop NaN Propagation|Automatically replaces NaN/Inf in shaders by a black pixel to avoid breaking some effects. This will slightly affect performances and should only be used if you experience NaN issues that you can't fix. Has no effect on GLES2 platforms."));
- EditorGUILayout.Space();
-
- DoToolkit();
- DoCustomEffectSorter();
-
- EditorUtilities.DrawSplitter();
- EditorGUILayout.Space();
-
- serializedObject.ApplyModifiedProperties();
- }
-
- void DoVolumeBlending()
- {
- EditorGUILayout.LabelField(EditorUtilities.GetContent("Volume blending"), EditorStyles.boldLabel);
- EditorGUI.indentLevel++;
- {
- // The layout system sort of break alignement when mixing inspector fields with
- // custom layouted fields, do the layout manually instead
- var indentOffset = EditorGUI.indentLevel * 15f;
- var lineRect = GUILayoutUtility.GetRect(1, EditorGUIUtility.singleLineHeight);
- var labelRect = new Rect(lineRect.x, lineRect.y, EditorGUIUtility.labelWidth - indentOffset, lineRect.height);
- var fieldRect = new Rect(labelRect.xMax, lineRect.y, lineRect.width - labelRect.width - 60f, lineRect.height);
- var buttonRect = new Rect(fieldRect.xMax, lineRect.y, 60f, lineRect.height);
-
- EditorGUI.PrefixLabel(labelRect, EditorUtilities.GetContent("Trigger|A transform that will act as a trigger for volume blending."));
- m_VolumeTrigger.objectReferenceValue = (Transform)EditorGUI.ObjectField(fieldRect, m_VolumeTrigger.objectReferenceValue, typeof(Transform), true);
- if (GUI.Button(buttonRect, EditorUtilities.GetContent("This|Assigns the current GameObject as a trigger."), EditorStyles.miniButton))
- m_VolumeTrigger.objectReferenceValue = m_Target.transform;
-
- if (m_VolumeTrigger.objectReferenceValue == null)
- EditorGUILayout.HelpBox("No trigger has been set, the camera will only be affected by global volumes.", MessageType.Info);
-
- EditorGUILayout.PropertyField(m_VolumeLayer, EditorUtilities.GetContent("Layer|This camera will only be affected by volumes in the selected scene-layers."));
-
- int mask = m_VolumeLayer.intValue;
- if (mask == 0)
- EditorGUILayout.HelpBox("No layer has been set, the trigger will never be affected by volumes.", MessageType.Warning);
- else if (mask == -1 || ((mask & 1) != 0))
- EditorGUILayout.HelpBox("Do not use \"Everything\" or \"Default\" as a layer mask as it will slow down the volume blending process! Put post-processing volumes in their own dedicated layer for best performances.", MessageType.Warning);
- }
- EditorGUI.indentLevel--;
-
- EditorGUILayout.Space();
- }
-
- void DoAntialiasing()
- {
- EditorGUILayout.LabelField(EditorUtilities.GetContent("Anti-aliasing"), EditorStyles.boldLabel);
- EditorGUI.indentLevel++;
- {
- m_AntialiasingMode.intValue = EditorGUILayout.Popup(EditorUtilities.GetContent("Mode|The anti-aliasing method to use. FXAA is fast but low quality. SMAA works well for non-HDR scenes. TAA is a bit slower but higher quality and works well with HDR."), m_AntialiasingMode.intValue, s_AntialiasingMethodNames);
-
- if (m_AntialiasingMode.intValue == (int)PostProcessLayer.Antialiasing.TemporalAntialiasing)
- {
- #if !UNITY_2017_3_OR_NEWER
- if (RuntimeUtilities.isSinglePassStereoSelected)
- EditorGUILayout.HelpBox("TAA requires Unity 2017.3+ for Single-pass stereo rendering support.", MessageType.Warning);
- #endif
-
- EditorGUILayout.PropertyField(m_TaaJitterSpread);
- EditorGUILayout.PropertyField(m_TaaStationaryBlending);
- EditorGUILayout.PropertyField(m_TaaMotionBlending);
- EditorGUILayout.PropertyField(m_TaaSharpness);
- }
- else if (m_AntialiasingMode.intValue == (int)PostProcessLayer.Antialiasing.SubpixelMorphologicalAntialiasing)
- {
- if (RuntimeUtilities.isSinglePassStereoSelected)
- EditorGUILayout.HelpBox("SMAA doesn't work with Single-pass stereo rendering.", MessageType.Warning);
-
- EditorGUILayout.PropertyField(m_SmaaQuality);
-
- if (m_SmaaQuality.intValue != (int)SubpixelMorphologicalAntialiasing.Quality.Low && EditorUtilities.isTargetingConsolesOrMobiles)
- EditorGUILayout.HelpBox("For performance reasons it is recommended to use Low Quality on mobile and console platforms.", MessageType.Warning);
- }
- else if (m_AntialiasingMode.intValue == (int)PostProcessLayer.Antialiasing.FastApproximateAntialiasing)
- {
- EditorGUILayout.PropertyField(m_FxaaFastMode);
- EditorGUILayout.PropertyField(m_FxaaKeepAlpha);
-
- if (!m_FxaaFastMode.boolValue && EditorUtilities.isTargetingConsolesOrMobiles)
- EditorGUILayout.HelpBox("For performance reasons it is recommended to use Fast Mode on mobile and console platforms.", MessageType.Warning);
- }
- }
- EditorGUI.indentLevel--;
-
- EditorGUILayout.Space();
- }
-
- void DoFog(Camera camera)
- {
- if (camera == null || camera.actualRenderingPath != RenderingPath.DeferredShading)
- return;
-
- EditorGUILayout.LabelField(EditorUtilities.GetContent("Deferred Fog"), EditorStyles.boldLabel);
- EditorGUI.indentLevel++;
- {
- EditorGUILayout.PropertyField(m_FogEnabled);
-
- if (m_FogEnabled.boolValue)
- {
- EditorGUILayout.PropertyField(m_FogExcludeSkybox);
- EditorGUILayout.HelpBox("This adds fog compatibility to the deferred rendering path; actual fog settings should be set in the Lighting panel.", MessageType.Info);
- }
- }
- EditorGUI.indentLevel--;
-
- EditorGUILayout.Space();
- }
-
- void DoToolkit()
- {
- EditorUtilities.DrawSplitter();
- m_ShowToolkit.boolValue = EditorUtilities.DrawHeader("Toolkit", m_ShowToolkit.boolValue);
-
- if (m_ShowToolkit.boolValue)
- {
- GUILayout.Space(2);
-
- if (GUILayout.Button(EditorUtilities.GetContent("Export frame to EXR..."), EditorStyles.miniButton))
- {
- var menu = new GenericMenu();
- menu.AddItem(EditorUtilities.GetContent("Full Frame (as displayed)"), false, () => ExportFrameToExr(ExportMode.FullFrame));
- menu.AddItem(EditorUtilities.GetContent("Disable post-processing"), false, () => ExportFrameToExr(ExportMode.DisablePost));
- menu.AddItem(EditorUtilities.GetContent("Break before Color Grading (Linear)"), false, () => ExportFrameToExr(ExportMode.BreakBeforeColorGradingLinear));
- menu.AddItem(EditorUtilities.GetContent("Break before Color Grading (Log)"), false, () => ExportFrameToExr(ExportMode.BreakBeforeColorGradingLog));
- menu.ShowAsContext();
- }
-
- if (GUILayout.Button(EditorUtilities.GetContent("Select all layer volumes|Selects all the volumes that will influence this layer."), EditorStyles.miniButton))
- {
- var volumes = RuntimeUtilities.GetAllSceneObjects()
- .Where(x => (m_VolumeLayer.intValue & (1 << x.gameObject.layer)) != 0)
- .Select(x => x.gameObject)
- .Cast()
- .ToArray();
-
- if (volumes.Length > 0)
- Selection.objects = volumes;
- }
-
- if (GUILayout.Button(EditorUtilities.GetContent("Select all active volumes|Selects all volumes currently affecting the layer."), EditorStyles.miniButton))
- {
- var volumes = new List();
- PostProcessManager.instance.GetActiveVolumes(m_Target, volumes);
-
- if (volumes.Count > 0)
- {
- Selection.objects = volumes
- .Select(x => x.gameObject)
- .Cast()
- .ToArray();
- }
- }
-
- GUILayout.Space(3);
- }
- }
-
- void DoCustomEffectSorter()
- {
- EditorUtilities.DrawSplitter();
- m_ShowCustomSorter.boolValue = EditorUtilities.DrawHeader("Custom Effect Sorting", m_ShowCustomSorter.boolValue);
-
- if (m_ShowCustomSorter.boolValue)
- {
- bool isInPrefab = false;
-
- // Init lists if needed
- if (m_CustomLists == null)
- {
- // In some cases the editor will refresh before components which means
- // components might not have been fully initialized yet. In this case we also
- // need to make sure that we're not in a prefab as sorteBundles isn't a
- // serializable object and won't exist until put on a scene.
- if (m_Target.sortedBundles == null)
- {
- isInPrefab = string.IsNullOrEmpty(m_Target.gameObject.scene.name);
-
- if (!isInPrefab)
- {
- // sortedBundles will be initialized and ready to use on the next frame
- Repaint();
- }
- }
- else
- {
- // Create a reorderable list for each injection event
- m_CustomLists = new Dictionary();
- foreach (var evt in Enum.GetValues(typeof(PostProcessEvent)).Cast())
- {
- var bundles = m_Target.sortedBundles[evt];
- var listName = ObjectNames.NicifyVariableName(evt.ToString());
-
- var list = new ReorderableList(bundles, typeof(SerializedBundleRef), true, true, false, false);
-
- list.drawHeaderCallback = (rect) =>
- {
- EditorGUI.LabelField(rect, listName);
- };
-
- list.drawElementCallback = (rect, index, isActive, isFocused) =>
- {
- var sbr = (SerializedBundleRef)list.list[index];
- EditorGUI.LabelField(rect, sbr.bundle.attribute.menuItem);
- };
-
- list.onReorderCallback = (l) =>
- {
- EditorUtility.SetDirty(m_Target);
- };
-
- m_CustomLists.Add(evt, list);
- }
- }
- }
-
- GUILayout.Space(5);
-
- if (isInPrefab)
- {
- EditorGUILayout.HelpBox("Not supported in prefabs.", MessageType.Info);
- GUILayout.Space(3);
- return;
- }
-
- bool anyList = false;
- if (m_CustomLists != null)
- {
- foreach (var kvp in m_CustomLists)
- {
- var list = kvp.Value;
-
- // Skip empty lists to avoid polluting the inspector
- if (list.count == 0)
- continue;
-
- list.DoLayoutList();
- anyList = true;
- }
- }
-
- if (!anyList)
- {
- EditorGUILayout.HelpBox("No custom effect loaded.", MessageType.Info);
- GUILayout.Space(3);
- }
- }
- }
-
- void ExportFrameToExr(ExportMode mode)
- {
- string path = EditorUtility.SaveFilePanel("Export EXR...", "", "Frame", "exr");
-
- if (string.IsNullOrEmpty(path))
- return;
-
- EditorUtility.DisplayProgressBar("Export EXR", "Rendering...", 0f);
-
- var camera = m_Target.GetComponent();
- var w = camera.pixelWidth;
- var h = camera.pixelHeight;
-
- var texOut = new Texture2D(w, h, TextureFormat.RGBAFloat, false, true);
- var target = RenderTexture.GetTemporary(w, h, 24, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear);
-
- var lastActive = RenderTexture.active;
- var lastTargetSet = camera.targetTexture;
- var lastPostFXState = m_Target.enabled;
- var lastBreakColorGradingState = m_Target.breakBeforeColorGrading;
-
- if (mode == ExportMode.DisablePost)
- m_Target.enabled = false;
- else if (mode == ExportMode.BreakBeforeColorGradingLinear || mode == ExportMode.BreakBeforeColorGradingLog)
- m_Target.breakBeforeColorGrading = true;
-
- camera.targetTexture = target;
- camera.Render();
- camera.targetTexture = lastTargetSet;
-
- EditorUtility.DisplayProgressBar("Export EXR", "Reading...", 0.25f);
-
- m_Target.enabled = lastPostFXState;
- m_Target.breakBeforeColorGrading = lastBreakColorGradingState;
-
- if (mode == ExportMode.BreakBeforeColorGradingLog)
- {
- // Convert to log
- var material = new Material(Shader.Find("Hidden/PostProcessing/Editor/ConvertToLog"));
- var newTarget = RenderTexture.GetTemporary(w, h, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear);
- Graphics.Blit(target, newTarget, material, 0);
- RenderTexture.ReleaseTemporary(target);
- DestroyImmediate(material);
- target = newTarget;
- }
-
- RenderTexture.active = target;
- texOut.ReadPixels(new Rect(0, 0, w, h), 0, 0);
- texOut.Apply();
- RenderTexture.active = lastActive;
-
- EditorUtility.DisplayProgressBar("Export EXR", "Encoding...", 0.5f);
-
- var bytes = texOut.EncodeToEXR(EXRFlags.OutputAsFloat | EXRFlags.CompressZIP);
-
- EditorUtility.DisplayProgressBar("Export EXR", "Saving...", 0.75f);
-
- File.WriteAllBytes(path, bytes);
-
- EditorUtility.ClearProgressBar();
- AssetDatabase.Refresh();
-
- RenderTexture.ReleaseTemporary(target);
- DestroyImmediate(texOut);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessLayerEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessLayerEditor.cs.meta
deleted file mode 100644
index 1819aa2..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessLayerEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 2c89984c2a3e6cd4492c6f695f07bae6
-timeCreated: 1488275719
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessProfileEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessProfileEditor.cs
deleted file mode 100644
index 2f586c3..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessProfileEditor.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [CustomEditor(typeof(PostProcessProfile))]
- sealed class PostProcessProfileEditor : Editor
- {
- EffectListEditor m_EffectList;
-
- void OnEnable()
- {
- m_EffectList = new EffectListEditor(this);
- m_EffectList.Init(target as PostProcessProfile, serializedObject);
- }
-
- void OnDisable()
- {
- if (m_EffectList != null)
- m_EffectList.Clear();
- }
-
- public override void OnInspectorGUI()
- {
- serializedObject.Update();
- m_EffectList.OnGUI();
- serializedObject.ApplyModifiedProperties();
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessProfileEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessProfileEditor.cs.meta
deleted file mode 100644
index 6357b95..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessProfileEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 1fcb2f1e4a7d9ba42bc5940a5611f302
-timeCreated: 1494339151
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessResourceStripper.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessResourceStripper.cs
deleted file mode 100644
index 5d0b2b5..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessResourceStripper.cs
+++ /dev/null
@@ -1,211 +0,0 @@
-using System;
-using UnityEditor.Build;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public sealed class PostProcessResourceStripper : ScriptableObject
- {
- [SerializeField] private PostProcessResources resources;
- [SerializeField] private PostProcessResources unstrippedResources;
- [SerializeField] private PostProcessStrippingConfig stripping;
-
- public const string DefaultStrippingConfigAssetPath = "Assets/PostProcessStrippingConfig.asset";
- bool enabled = true;
-
- static PostProcessResourceStripper s_Instance;
-
- public static PostProcessResourceStripper instance
- {
- get
- {
- if (s_Instance == null)
- {
- s_Instance = CreateInstance();
- s_Instance.unstrippedResources.changeHandler = Update;
- }
-
- return s_Instance;
- }
- }
-
- static private string FindPostProcessStrippingConfigGUID()
- {
- var guids = AssetDatabase.FindAssets("t:PostProcessStrippingConfig", null);
- if (guids.Length > 0)
- return guids[0];
- else
- return null;
- }
-
- static public string EnsurePostProcessStrippingConfigAssetExists()
- {
- var guid = FindPostProcessStrippingConfigGUID();
- if (guid != null)
- return guid;
-
- bool wasEnabled = instance.enabled;
- instance.enabled = false;
- AssetDatabase.CreateAsset(CreateInstance(), DefaultStrippingConfigAssetPath);
- AssetDatabase.SaveAssets();
- AssetDatabase.Refresh();
- instance.enabled = wasEnabled;
- return FindPostProcessStrippingConfigGUID();
- }
-
- private void LazyLoadStrippingConfig()
- {
- if (stripping != null)
- return;
-
- var guid = EnsurePostProcessStrippingConfigAssetExists();
- if (guid != null)
- {
- bool wasEnabled = instance.enabled;
- instance.enabled = false;
- stripping = (PostProcessStrippingConfig)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guid), typeof(PostProcessStrippingConfig));
- instance.enabled = wasEnabled;
- }
- }
-
- void OnDestroy()
- {
- unstrippedResources.changeHandler = null;
- }
-
- private void StripMultiScaleAO()
- {
- resources.computeShaders.multiScaleAODownsample1 = null;
- resources.computeShaders.multiScaleAODownsample2 = null;
- resources.computeShaders.multiScaleAORender = null;
- resources.computeShaders.multiScaleAOUpsample = null;
- resources.shaders.multiScaleAO = null;
- }
-
- private void StripScreenSpaceReflections()
- {
- resources.shaders.screenSpaceReflections = null;
- resources.computeShaders.gaussianDownsample = null;
- }
-
- private void StripDebugShaders()
- {
- resources.shaders.lightMeter = null;
- resources.shaders.gammaHistogram = null;
- resources.shaders.waveform = null;
- resources.shaders.vectorscope = null;
- resources.shaders.debugOverlays = null;
-
- resources.computeShaders.gammaHistogram = null;
- resources.computeShaders.waveform = null;
- resources.computeShaders.vectorscope = null;
- }
-
- private void Apply(BuildTarget target)
- {
- if (!enabled)
- return;
-
- if (resources == null)
- return;
-
- if (unstrippedResources == null)
- return;
-
- LazyLoadStrippingConfig();
- if (stripping == null)
- return;
-
- resources.computeShaders = unstrippedResources.computeShaders.Clone();
- resources.shaders = unstrippedResources.shaders.Clone();
-
- // We don't support multi scale AO on mobile
- if (stripping.stripUnsupportedShaders &&
- (target == BuildTarget.Android || target == BuildTarget.iOS || target == BuildTarget.tvOS))
- {
- StripMultiScaleAO();
- }
-
- if (stripping.stripDebugShaders)
- {
- StripDebugShaders();
- }
-
- if (stripping.stripComputeShaders)
- {
- resources.computeShaders = new PostProcessResources.ComputeShaders();
- resources.shaders.autoExposure = null;
- StripScreenSpaceReflections();
- StripMultiScaleAO();
- StripDebugShaders();
- }
-
- if (stripping.stripUnsupportedShaders && !RuntimeUtilities.supportsDeferredShading)
- {
- StripScreenSpaceReflections();
- resources.shaders.deferredFog = null;
- if (!RuntimeUtilities.supportsDepthNormals)
- resources.shaders.scalableAO = null;
- }
-
- if (stripping.stripUnsupportedShaders && !SystemInfo.supportsMotionVectors)
- {
- resources.shaders.motionBlur = null;
- resources.shaders.temporalAntialiasing = null;
- resources.shaders.screenSpaceReflections = null;
- resources.computeShaders.gaussianDownsample = null;
- }
- }
-
- public static void Update()
- {
- Update(EditorUserBuildSettings.activeBuildTarget);
- }
-
- public static void Update(BuildTarget target)
- {
- instance.Apply(EditorUserBuildSettings.activeBuildTarget);
- }
- }
-
-#if UNITY_2017_1_OR_NEWER
- sealed class UpdateStrippingOnBuildTargetChange : IActiveBuildTargetChanged
- {
- public int callbackOrder { get { return 0; } }
- public void OnActiveBuildTargetChanged(BuildTarget previousTarget, BuildTarget newTarget)
- {
- PostProcessResourceStripper.Update(newTarget);
- }
- }
-
- sealed class UpdateStrippingBeforeBuild : IPreprocessBuild
- {
- public int callbackOrder { get { return 0; } }
-
- #if UNITY_2018_1_OR_NEWER
- public void OnPreprocessBuild(Build.Reporting.BuildReport report)
- {
- PostProcessResourceStripper.Update(report.summary.platform);
- }
-
- #else
- public void OnPreprocessBuild(BuildTarget target, string path)
- {
- PostProcessResourceStripper.Update(target);
- }
-
- #endif
- }
-#endif
-
-
- [InitializeOnLoad]
- public class SetupStrippingConfig
- {
- static SetupStrippingConfig()
- {
- PostProcessResourceStripper.EnsurePostProcessStrippingConfigAssetExists();
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessResourceStripper.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessResourceStripper.cs.meta
deleted file mode 100644
index 4f57238..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessResourceStripper.cs.meta
+++ /dev/null
@@ -1,17 +0,0 @@
-fileFormatVersion: 2
-guid: 39fd865e83c22c54ea18f4b72b707a10
-timeCreated: 1516717074
-licenseType: Pro
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences:
- - resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2}
- - unstrippedResources: {fileID: 11400000, guid: fef5d8f16dc2eb84b9b0c1b962d72095,
- type: 2}
- - stripping: {fileID: 11400000, guid: 2d01135b2873ca145ab1fc265f2acf6a, type: 2}
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessStrippingConfig.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessStrippingConfig.cs
deleted file mode 100644
index a0351e1..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessStrippingConfig.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using UnityEngine;
-using UnityEditor.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public sealed class PostProcessStrippingConfig : ScriptableObject
- {
- public bool stripUnsupportedShaders = true;
- public bool stripDebugShaders = false;
- public bool stripComputeShaders = false;
-
- public void Awake()
- {
- PostProcessResourceStripper.Update();
- }
-
- public void OnValidate()
- {
- PostProcessResourceStripper.Update();
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessStrippingConfig.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessStrippingConfig.cs.meta
deleted file mode 100644
index 0490335..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessStrippingConfig.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 2f29da58f3a63f649a512733d24af22c
-timeCreated: 1516720968
-licenseType: Pro
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessVolumeEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessVolumeEditor.cs
deleted file mode 100644
index 498d181..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessVolumeEditor.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [CanEditMultipleObjects, CustomEditor(typeof(PostProcessVolume))]
- public sealed class PostProcessVolumeEditor : BaseEditor
- {
- SerializedProperty m_Profile;
-
- SerializedProperty m_IsGlobal;
- SerializedProperty m_BlendRadius;
- SerializedProperty m_Weight;
- SerializedProperty m_Priority;
-
- EffectListEditor m_EffectList;
-
- void OnEnable()
- {
- m_Profile = FindProperty(x => x.sharedProfile);
-
- m_IsGlobal = FindProperty(x => x.isGlobal);
- m_BlendRadius = FindProperty(x => x.blendDistance);
- m_Weight = FindProperty(x => x.weight);
- m_Priority = FindProperty(x => x.priority);
-
- m_EffectList = new EffectListEditor(this);
- RefreshEffectListEditor(m_Target.sharedProfile);
- }
-
- void OnDisable()
- {
- if (m_EffectList != null)
- m_EffectList.Clear();
- }
-
- void RefreshEffectListEditor(PostProcessProfile asset)
- {
- m_EffectList.Clear();
-
- if (asset != null)
- m_EffectList.Init(asset, new SerializedObject(asset));
- }
-
- public override void OnInspectorGUI()
- {
- serializedObject.Update();
-
- EditorGUILayout.PropertyField(m_IsGlobal);
-
- if (!m_IsGlobal.boolValue) // Blend radius is not needed for global volumes
- EditorGUILayout.PropertyField(m_BlendRadius);
-
- EditorGUILayout.PropertyField(m_Weight);
- EditorGUILayout.PropertyField(m_Priority);
-
- bool assetHasChanged = false;
- bool showCopy = m_Profile.objectReferenceValue != null;
- bool multiEdit = m_Profile.hasMultipleDifferentValues;
-
- // The layout system sort of break alignement when mixing inspector fields with custom
- // layouted fields, do the layout manually instead
- int buttonWidth = showCopy ? 45 : 60;
- float indentOffset = EditorGUI.indentLevel * 15f;
- var lineRect = GUILayoutUtility.GetRect(1, EditorGUIUtility.singleLineHeight);
- var labelRect = new Rect(lineRect.x, lineRect.y, EditorGUIUtility.labelWidth - indentOffset, lineRect.height);
- var fieldRect = new Rect(labelRect.xMax, lineRect.y, lineRect.width - labelRect.width - buttonWidth * (showCopy ? 2 : 1), lineRect.height);
- var buttonNewRect = new Rect(fieldRect.xMax, lineRect.y, buttonWidth, lineRect.height);
- var buttonCopyRect = new Rect(buttonNewRect.xMax, lineRect.y, buttonWidth, lineRect.height);
-
- EditorGUI.PrefixLabel(labelRect, EditorUtilities.GetContent("Profile|A reference to a profile asset."));
-
- using (var scope = new EditorGUI.ChangeCheckScope())
- {
- EditorGUI.BeginProperty(fieldRect, GUIContent.none, m_Profile);
-
- var profile = (PostProcessProfile)EditorGUI.ObjectField(fieldRect, m_Profile.objectReferenceValue, typeof(PostProcessProfile), false);
-
- if (scope.changed)
- {
- assetHasChanged = true;
- m_Profile.objectReferenceValue = profile;
- }
-
- EditorGUI.EndProperty();
- }
-
- using (new EditorGUI.DisabledScope(multiEdit))
- {
- if (GUI.Button(buttonNewRect, EditorUtilities.GetContent("New|Create a new profile."), showCopy ? EditorStyles.miniButtonLeft : EditorStyles.miniButton))
- {
- // By default, try to put assets in a folder next to the currently active
- // scene file. If the user isn't a scene, put them in root instead.
- var targetName = m_Target.name;
- var scene = m_Target.gameObject.scene;
- var asset = ProfileFactory.CreatePostProcessProfile(scene, targetName);
- m_Profile.objectReferenceValue = asset;
- assetHasChanged = true;
- }
-
- if (showCopy && GUI.Button(buttonCopyRect, EditorUtilities.GetContent("Clone|Create a new profile and copy the content of the currently assigned profile."), EditorStyles.miniButtonRight))
- {
- // Duplicate the currently assigned profile and save it as a new profile
- var origin = (PostProcessProfile)m_Profile.objectReferenceValue;
- var path = AssetDatabase.GetAssetPath(origin);
- path = AssetDatabase.GenerateUniqueAssetPath(path);
-
- var asset = Instantiate(origin);
- asset.settings.Clear();
- AssetDatabase.CreateAsset(asset, path);
-
- foreach (var item in origin.settings)
- {
- var itemCopy = Instantiate(item);
- itemCopy.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
- itemCopy.name = item.name;
- asset.settings.Add(itemCopy);
- AssetDatabase.AddObjectToAsset(itemCopy, asset);
- }
-
- AssetDatabase.SaveAssets();
- AssetDatabase.Refresh();
-
- m_Profile.objectReferenceValue = asset;
- assetHasChanged = true;
- }
- }
-
- EditorGUILayout.Space();
-
- if (m_Profile.objectReferenceValue == null)
- {
- if (assetHasChanged)
- m_EffectList.Clear(); // Asset wasn't null before, do some cleanup
-
- EditorGUILayout.HelpBox("Assign a Post-process Profile to this volume using the \"Asset\" field or create one automatically by clicking the \"New\" button.\nAssets are automatically put in a folder next to your scene file. If you scene hasn't been saved yet they will be created at the root of the Assets folder.", MessageType.Info);
- }
- else
- {
- if (assetHasChanged)
- RefreshEffectListEditor((PostProcessProfile)m_Profile.objectReferenceValue);
-
- if (!multiEdit)
- m_EffectList.OnGUI();
- }
-
- serializedObject.ApplyModifiedProperties();
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessVolumeEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessVolumeEditor.cs.meta
deleted file mode 100644
index 237ca4d..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessVolumeEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 4e487364a0cd33f4a9ef2ed93819d4d7
-timeCreated: 1488201040
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingBehaviourEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingBehaviourEditor.cs
new file mode 100644
index 0000000..08550b2
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingBehaviourEditor.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Linq.Expressions;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ [CustomEditor(typeof(PostProcessingBehaviour))]
+ public class PostProcessingBehaviourEditor : Editor
+ {
+ SerializedProperty m_Profile;
+
+ public void OnEnable()
+ {
+ m_Profile = FindSetting((PostProcessingBehaviour x) => x.profile);
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ EditorGUILayout.PropertyField(m_Profile);
+
+ serializedObject.ApplyModifiedProperties();
+ }
+
+ SerializedProperty FindSetting(Expression> expr)
+ {
+ return serializedObject.FindProperty(ReflectionUtils.GetFieldPath(expr));
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingBehaviourEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingBehaviourEditor.cs.meta
new file mode 100644
index 0000000..3f156ac
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingBehaviourEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0c12e797b02402246a52aa270c45059b
+timeCreated: 1476193645
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingFactory.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingFactory.cs
new file mode 100644
index 0000000..6ac50f2
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingFactory.cs
@@ -0,0 +1,35 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+using UnityEditor.ProjectWindowCallback;
+using System.IO;
+
+namespace UnityEditor.PostProcessing
+{
+ public class PostProcessingFactory
+ {
+ [MenuItem("Assets/Create/Post-Processing Profile", priority = 201)]
+ static void MenuCreatePostProcessingProfile()
+ {
+ var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon");
+ ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "New Post-Processing Profile.asset", icon, null);
+ }
+
+ internal static PostProcessingProfile CreatePostProcessingProfileAtPath(string path)
+ {
+ var profile = ScriptableObject.CreateInstance();
+ profile.name = Path.GetFileName(path);
+ profile.fog.enabled = true;
+ AssetDatabase.CreateAsset(profile, path);
+ return profile;
+ }
+ }
+
+ class DoCreatePostProcessingProfile : EndNameEditAction
+ {
+ public override void Action(int instanceId, string pathName, string resourceFile)
+ {
+ PostProcessingProfile profile = PostProcessingFactory.CreatePostProcessingProfileAtPath(pathName);
+ ProjectWindowUtil.ShowCreatedAsset(profile);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingFactory.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingFactory.cs.meta
new file mode 100644
index 0000000..c7efcf9
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingFactory.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0dfcadb180d67014cb0a6e18d6b11f90
+timeCreated: 1466586271
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingInspector.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingInspector.cs
new file mode 100644
index 0000000..b2baa94
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingInspector.cs
@@ -0,0 +1,208 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+
+namespace UnityEditor.PostProcessing
+{
+ //[CanEditMultipleObjects]
+ [CustomEditor(typeof(PostProcessingProfile))]
+ public class PostProcessingInspector : Editor
+ {
+ static GUIContent s_PreviewTitle = new GUIContent("Monitors");
+
+ PostProcessingProfile m_ConcreteTarget
+ {
+ get { return target as PostProcessingProfile; }
+ }
+
+ int m_CurrentMonitorID
+ {
+ get { return m_ConcreteTarget.monitors.currentMonitorID; }
+ set { m_ConcreteTarget.monitors.currentMonitorID = value; }
+ }
+
+ List m_Monitors;
+ GUIContent[] m_MonitorNames;
+ Dictionary m_CustomEditors = new Dictionary();
+
+ public bool IsInteractivePreviewOpened { get; private set; }
+
+ void OnEnable()
+ {
+ if (target == null)
+ return;
+
+ // Aggregate custom post-fx editors
+ var assembly = Assembly.GetAssembly(typeof(PostProcessingInspector));
+
+ var editorTypes = assembly.GetTypes()
+ .Where(x => x.IsDefined(typeof(PostProcessingModelEditorAttribute), false));
+
+ var customEditors = new Dictionary();
+ foreach (var editor in editorTypes)
+ {
+ var attr = (PostProcessingModelEditorAttribute)editor.GetCustomAttributes(typeof(PostProcessingModelEditorAttribute), false)[0];
+ var effectType = attr.type;
+ var alwaysEnabled = attr.alwaysEnabled;
+
+ var editorInst = (PostProcessingModelEditor)Activator.CreateInstance(editor);
+ editorInst.alwaysEnabled = alwaysEnabled;
+ editorInst.profile = target as PostProcessingProfile;
+ editorInst.inspector = this;
+ customEditors.Add(effectType, editorInst);
+ }
+
+ // ... and corresponding models
+ var baseType = target.GetType();
+ var property = serializedObject.GetIterator();
+
+ while (property.Next(true))
+ {
+ if (!property.hasChildren)
+ continue;
+
+ var type = baseType;
+ var srcObject = ReflectionUtils.GetFieldValueFromPath(serializedObject.targetObject, ref type, property.propertyPath);
+
+ if (srcObject == null)
+ continue;
+
+ PostProcessingModelEditor editor;
+ if (customEditors.TryGetValue(type, out editor))
+ {
+ var effect = (PostProcessingModel)srcObject;
+
+ if (editor.alwaysEnabled)
+ effect.enabled = editor.alwaysEnabled;
+
+ m_CustomEditors.Add(editor, effect);
+ editor.target = effect;
+ editor.serializedProperty = property.Copy();
+ editor.OnPreEnable();
+ }
+ }
+
+ // Prepare monitors
+ m_Monitors = new List();
+
+ var monitors = new List
+ {
+ new HistogramMonitor(),
+ new WaveformMonitor(),
+ new ParadeMonitor(),
+ new VectorscopeMonitor()
+ };
+
+ var monitorNames = new List();
+
+ foreach (var monitor in monitors)
+ {
+ if (monitor.IsSupported())
+ {
+ monitor.Init(m_ConcreteTarget.monitors, this);
+ m_Monitors.Add(monitor);
+ monitorNames.Add(monitor.GetMonitorTitle());
+ }
+ }
+
+ m_MonitorNames = monitorNames.ToArray();
+
+ if (m_Monitors.Count > 0)
+ m_ConcreteTarget.monitors.onFrameEndEditorOnly = OnFrameEnd;
+ }
+
+ void OnDisable()
+ {
+ if (m_CustomEditors != null)
+ {
+ foreach (var editor in m_CustomEditors.Keys)
+ editor.OnDisable();
+
+ m_CustomEditors.Clear();
+ }
+
+ if (m_Monitors != null)
+ {
+ foreach (var monitor in m_Monitors)
+ monitor.Dispose();
+
+ m_Monitors.Clear();
+ }
+
+ if (m_ConcreteTarget != null)
+ m_ConcreteTarget.monitors.onFrameEndEditorOnly = null;
+ }
+
+ void OnFrameEnd(RenderTexture source)
+ {
+ if (!IsInteractivePreviewOpened)
+ return;
+
+ if (m_CurrentMonitorID < m_Monitors.Count)
+ m_Monitors[m_CurrentMonitorID].OnFrameData(source);
+
+ IsInteractivePreviewOpened = false;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ // Handles undo/redo events first (before they get used by the editors' widgets)
+ var e = Event.current;
+ if (e.type == EventType.ValidateCommand && e.commandName == "UndoRedoPerformed")
+ {
+ foreach (var editor in m_CustomEditors)
+ editor.Value.OnValidate();
+ }
+
+ if (!m_ConcreteTarget.debugViews.IsModeActive(BuiltinDebugViewsModel.Mode.None))
+ EditorGUILayout.HelpBox("A debug view is currently enabled. Changes done to an effect might not be visible.", MessageType.Info);
+
+ foreach (var editor in m_CustomEditors)
+ {
+ EditorGUI.BeginChangeCheck();
+
+ editor.Key.OnGUI();
+
+ if (EditorGUI.EndChangeCheck())
+ editor.Value.OnValidate();
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+
+ public override GUIContent GetPreviewTitle()
+ {
+ return s_PreviewTitle;
+ }
+
+ public override bool HasPreviewGUI()
+ {
+ return GraphicsUtils.supportsDX11 && m_Monitors.Count > 0;
+ }
+
+ public override void OnPreviewSettings()
+ {
+ using (new EditorGUILayout.HorizontalScope())
+ {
+ if (m_CurrentMonitorID < m_Monitors.Count)
+ m_Monitors[m_CurrentMonitorID].OnMonitorSettings();
+
+ GUILayout.Space(5);
+ m_CurrentMonitorID = EditorGUILayout.Popup(m_CurrentMonitorID, m_MonitorNames, FxStyles.preDropdown, GUILayout.MaxWidth(100f));
+ }
+ }
+
+ public override void OnInteractivePreviewGUI(Rect r, GUIStyle background)
+ {
+ IsInteractivePreviewOpened = true;
+
+ if (m_CurrentMonitorID < m_Monitors.Count)
+ m_Monitors[m_CurrentMonitorID].OnMonitorGUI(r);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingInspector.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingInspector.cs.meta
new file mode 100644
index 0000000..a08a2dd
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingInspector.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 27fa95984763d9d47bbad59e7fdb66fe
+timeCreated: 1467188923
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingModelEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingModelEditor.cs
new file mode 100644
index 0000000..844f9e8
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingModelEditor.cs
@@ -0,0 +1,79 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+using System;
+using System.Linq.Expressions;
+
+namespace UnityEditor.PostProcessing
+{
+ public class PostProcessingModelEditor
+ {
+ public PostProcessingModel target { get; internal set; }
+ public SerializedProperty serializedProperty { get; internal set; }
+
+ protected SerializedProperty m_SettingsProperty;
+ protected SerializedProperty m_EnabledProperty;
+
+ internal bool alwaysEnabled = false;
+ internal PostProcessingProfile profile;
+ internal PostProcessingInspector inspector;
+
+ internal void OnPreEnable()
+ {
+ m_SettingsProperty = serializedProperty.FindPropertyRelative("m_Settings");
+ m_EnabledProperty = serializedProperty.FindPropertyRelative("m_Enabled");
+
+ OnEnable();
+ }
+
+ public virtual void OnEnable()
+ {}
+
+ public virtual void OnDisable()
+ {}
+
+ internal void OnGUI()
+ {
+ GUILayout.Space(5);
+
+ var display = alwaysEnabled
+ ? EditorGUIHelper.Header(serializedProperty.displayName, m_SettingsProperty, Reset)
+ : EditorGUIHelper.Header(serializedProperty.displayName, m_SettingsProperty, m_EnabledProperty, Reset);
+
+ if (display)
+ {
+ EditorGUI.indentLevel++;
+ using (new EditorGUI.DisabledGroupScope(!m_EnabledProperty.boolValue))
+ {
+ OnInspectorGUI();
+ }
+ EditorGUI.indentLevel--;
+ }
+ }
+
+ void Reset()
+ {
+ var obj = serializedProperty.serializedObject;
+ Undo.RecordObject(obj.targetObject, "Reset");
+ target.Reset();
+ EditorUtility.SetDirty(obj.targetObject);
+ }
+
+ public virtual void OnInspectorGUI()
+ {}
+
+ public void Repaint()
+ {
+ inspector.Repaint();
+ }
+
+ protected SerializedProperty FindSetting(Expression> expr)
+ {
+ return m_SettingsProperty.FindPropertyRelative(ReflectionUtils.GetFieldPath(expr));
+ }
+
+ protected SerializedProperty FindSetting(SerializedProperty prop, Expression> expr)
+ {
+ return prop.FindPropertyRelative(ReflectionUtils.GetFieldPath(expr));
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingModelEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingModelEditor.cs.meta
new file mode 100644
index 0000000..73b32b5
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingModelEditor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: afe296d4ede60a0479734dc8c7df82c2
+timeCreated: 1467188923
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingMonitor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingMonitor.cs
new file mode 100644
index 0000000..04edf84
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingMonitor.cs
@@ -0,0 +1,34 @@
+using System;
+using UnityEngine;
+
+namespace UnityEditor.PostProcessing
+{
+ using MonitorSettings = UnityEngine.PostProcessing.PostProcessingProfile.MonitorSettings;
+
+ public abstract class PostProcessingMonitor : IDisposable
+ {
+ protected MonitorSettings m_MonitorSettings;
+ protected PostProcessingInspector m_BaseEditor;
+
+ public void Init(MonitorSettings monitorSettings, PostProcessingInspector baseEditor)
+ {
+ m_MonitorSettings = monitorSettings;
+ m_BaseEditor = baseEditor;
+ }
+
+ public abstract bool IsSupported();
+
+ public abstract GUIContent GetMonitorTitle();
+
+ public virtual void OnMonitorSettings()
+ {}
+
+ public abstract void OnMonitorGUI(Rect r);
+
+ public virtual void OnFrameData(RenderTexture source)
+ {}
+
+ public virtual void Dispose()
+ {}
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingMonitor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingMonitor.cs.meta
new file mode 100644
index 0000000..ea43213
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PostProcessingMonitor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 801186e9e649457469bcddd8ee391c71
+timeCreated: 1467188912
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers.meta
new file mode 100644
index 0000000..eaf616a
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: ced92f1cc2085ae48acacc79a2b8e196
+folderAsset: yes
+timeCreated: 1467189428
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs
new file mode 100644
index 0000000..a56c201
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs
@@ -0,0 +1,36 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ [CustomPropertyDrawer(typeof(GetSetAttribute))]
+ sealed class GetSetDrawer : PropertyDrawer
+ {
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ var attribute = (GetSetAttribute)base.attribute;
+
+ EditorGUI.BeginChangeCheck();
+ EditorGUI.PropertyField(position, property, label);
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ attribute.dirty = true;
+ }
+ else if (attribute.dirty)
+ {
+ var parent = ReflectionUtils.GetParentObject(property.propertyPath, property.serializedObject.targetObject);
+
+ var type = parent.GetType();
+ var info = type.GetProperty(attribute.name);
+
+ if (info == null)
+ Debug.LogError("Invalid property name \"" + attribute.name + "\"");
+ else
+ info.SetValue(parent, fieldInfo.GetValue(parent), null);
+
+ attribute.dirty = false;
+ }
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs.meta
new file mode 100644
index 0000000..d952551
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e1a43b92f2bbd914ca2e6b4c6a5dba48
+timeCreated: 1460383963
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs
new file mode 100644
index 0000000..59791f5
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs
@@ -0,0 +1,29 @@
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ [CustomPropertyDrawer(typeof(MinAttribute))]
+ sealed class MinDrawer : PropertyDrawer
+ {
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ MinAttribute attribute = (MinAttribute)base.attribute;
+
+ if (property.propertyType == SerializedPropertyType.Integer)
+ {
+ int v = EditorGUI.IntField(position, label, property.intValue);
+ property.intValue = (int)Mathf.Max(v, attribute.min);
+ }
+ else if (property.propertyType == SerializedPropertyType.Float)
+ {
+ float v = EditorGUI.FloatField(position, label, property.floatValue);
+ property.floatValue = Mathf.Max(v, attribute.min);
+ }
+ else
+ {
+ EditorGUI.LabelField(position, label.text, "Use Min with float or int.");
+ }
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs.meta
new file mode 100644
index 0000000..6861111
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8995f52f410f0fb4cb1bdaa71a16e04e
+timeCreated: 1467364278
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/TrackballGroupDrawer.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/TrackballGroupDrawer.cs
new file mode 100644
index 0000000..c86c88f
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/TrackballGroupDrawer.cs
@@ -0,0 +1,244 @@
+using System.Collections.Generic;
+using System.Reflection;
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ [CustomPropertyDrawer(typeof(TrackballGroupAttribute))]
+ sealed class TrackballGroupDrawer : PropertyDrawer
+ {
+ static Material s_Material;
+
+ const int k_MinWheelSize = 80;
+ const int k_MaxWheelSize = 256;
+
+ bool m_ResetState;
+
+ // Cached trackball computation methods (for speed reasons)
+ static Dictionary m_TrackballMethods = new Dictionary();
+
+ internal static int m_Size
+ {
+ get
+ {
+ int size = Mathf.FloorToInt(EditorGUIUtility.currentViewWidth / 3f) - 18;
+ size = Mathf.Clamp(size, k_MinWheelSize, k_MaxWheelSize);
+ return size;
+ }
+ }
+
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ if (s_Material == null)
+ s_Material = new Material(Shader.Find("Hidden/Post FX/UI/Trackball")) { hideFlags = HideFlags.HideAndDontSave };
+
+ position = new Rect(position.x, position.y, position.width / 3f, position.height);
+ int size = m_Size;
+ position.x += 5f;
+
+ var enumerator = property.GetEnumerator();
+ while (enumerator.MoveNext())
+ {
+ var prop = enumerator.Current as SerializedProperty;
+ if (prop == null || prop.propertyType != SerializedPropertyType.Color)
+ continue;
+
+ OnWheelGUI(position, size, prop.Copy());
+ position.x += position.width;
+ }
+ }
+
+ void OnWheelGUI(Rect position, int size, SerializedProperty property)
+ {
+ if (Event.current.type == EventType.Layout)
+ return;
+
+ var value = property.colorValue;
+ float offset = value.a;
+
+ var wheelDrawArea = position;
+ wheelDrawArea.height = size;
+
+ if (wheelDrawArea.width > wheelDrawArea.height)
+ {
+ wheelDrawArea.x += (wheelDrawArea.width - wheelDrawArea.height) / 2.0f;
+ wheelDrawArea.width = position.height;
+ }
+
+ wheelDrawArea.width = wheelDrawArea.height;
+
+ float hsize = size / 2f;
+ float radius = 0.38f * size;
+ Vector3 hsv;
+ Color.RGBToHSV(value, out hsv.x, out hsv.y, out hsv.z);
+
+ if (Event.current.type == EventType.Repaint)
+ {
+ float scale = EditorGUIUtility.pixelsPerPoint;
+
+ // Wheel texture
+ var oldRT = RenderTexture.active;
+ var rt = RenderTexture.GetTemporary((int)(size * scale), (int)(size * scale), 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear);
+ s_Material.SetFloat("_Offset", offset);
+ s_Material.SetFloat("_DisabledState", GUI.enabled ? 1f : 0.5f);
+ s_Material.SetVector("_Resolution", new Vector2(size * scale, size * scale / 2f));
+ Graphics.Blit(null, rt, s_Material, EditorGUIUtility.isProSkin ? 0 : 1);
+ RenderTexture.active = oldRT;
+
+ GUI.DrawTexture(wheelDrawArea, rt);
+ RenderTexture.ReleaseTemporary(rt);
+
+ // Thumb
+ var thumbPos = Vector2.zero;
+ float theta = hsv.x * (Mathf.PI * 2f);
+ float len = hsv.y * radius;
+ thumbPos.x = Mathf.Cos(theta + (Mathf.PI / 2f));
+ thumbPos.y = Mathf.Sin(theta - (Mathf.PI / 2f));
+ thumbPos *= len;
+ var thumbSize = FxStyles.wheelThumbSize;
+ var thumbSizeH = thumbSize / 2f;
+ FxStyles.wheelThumb.Draw(new Rect(wheelDrawArea.x + hsize + thumbPos.x - thumbSizeH.x, wheelDrawArea.y + hsize + thumbPos.y - thumbSizeH.y, thumbSize.x, thumbSize.y), false, false, false, false);
+ }
+
+ var bounds = wheelDrawArea;
+ bounds.x += hsize - radius;
+ bounds.y += hsize - radius;
+ bounds.width = bounds.height = radius * 2f;
+ hsv = GetInput(bounds, hsv, radius);
+ value = Color.HSVToRGB(hsv.x, hsv.y, 1f);
+ value.a = offset;
+
+ // Luminosity booster
+ position = wheelDrawArea;
+ float oldX = position.x;
+ float oldW = position.width;
+ position.y += position.height + 4f;
+ position.x += (position.width - (position.width * 0.75f)) / 2f;
+ position.width = position.width * 0.75f;
+ position.height = EditorGUIUtility.singleLineHeight;
+ value.a = GUI.HorizontalSlider(position, value.a, -1f, 1f);
+
+ // Advanced controls
+ var data = Vector3.zero;
+
+ if (TryGetDisplayValue(value, property, out data))
+ {
+ position.x = oldX;
+ position.y += position.height;
+ position.width = oldW / 3f;
+
+ using (new EditorGUI.DisabledGroupScope(true))
+ {
+ GUI.Label(position, data.x.ToString("F2"), EditorStyles.centeredGreyMiniLabel);
+ position.x += position.width;
+ GUI.Label(position, data.y.ToString("F2"), EditorStyles.centeredGreyMiniLabel);
+ position.x += position.width;
+ GUI.Label(position, data.z.ToString("F2"), EditorStyles.centeredGreyMiniLabel);
+ position.x += position.width;
+ }
+ }
+
+ // Title
+ position.x = oldX;
+ position.y += position.height;
+ position.width = oldW;
+ GUI.Label(position, property.displayName, EditorStyles.centeredGreyMiniLabel);
+
+ if (m_ResetState)
+ {
+ value = Color.clear;
+ m_ResetState = false;
+ }
+
+ property.colorValue = value;
+ }
+
+ bool TryGetDisplayValue(Color color, SerializedProperty property, out Vector3 output)
+ {
+ output = Vector3.zero;
+ MethodInfo method;
+
+ if (!m_TrackballMethods.TryGetValue(property.name, out method))
+ {
+ var field = ReflectionUtils.GetFieldInfoFromPath(property.serializedObject.targetObject, property.propertyPath);
+
+ if (!field.IsDefined(typeof(TrackballAttribute), false))
+ return false;
+
+ var attr = (TrackballAttribute)field.GetCustomAttributes(typeof(TrackballAttribute), false)[0];
+ const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static;
+ method = typeof(ColorGradingComponent).GetMethod(attr.method, flags);
+ m_TrackballMethods.Add(property.name, method);
+ }
+
+ if (method == null)
+ return false;
+
+ output = (Vector3)method.Invoke(property.serializedObject.targetObject, new object[] { color });
+ return true;
+ }
+
+ static readonly int k_ThumbHash = "colorWheelThumb".GetHashCode();
+
+ Vector3 GetInput(Rect bounds, Vector3 hsv, float radius)
+ {
+ var e = Event.current;
+ var id = GUIUtility.GetControlID(k_ThumbHash, FocusType.Passive, bounds);
+
+ var mousePos = e.mousePosition;
+ var relativePos = mousePos - new Vector2(bounds.x, bounds.y);
+
+ if (e.type == EventType.MouseDown && GUIUtility.hotControl == 0 && bounds.Contains(mousePos))
+ {
+ if (e.button == 0)
+ {
+ var center = new Vector2(bounds.x + radius, bounds.y + radius);
+ float dist = Vector2.Distance(center, mousePos);
+
+ if (dist <= radius)
+ {
+ e.Use();
+ GetWheelHueSaturation(relativePos.x, relativePos.y, radius, out hsv.x, out hsv.y);
+ GUIUtility.hotControl = id;
+ GUI.changed = true;
+ }
+ }
+ else if (e.button == 1)
+ {
+ e.Use();
+ GUI.changed = true;
+ m_ResetState = true;
+ }
+ }
+ else if (e.type == EventType.MouseDrag && e.button == 0 && GUIUtility.hotControl == id)
+ {
+ e.Use();
+ GUI.changed = true;
+ GetWheelHueSaturation(relativePos.x, relativePos.y, radius, out hsv.x, out hsv.y);
+ }
+ else if (e.rawType == EventType.MouseUp && e.button == 0 && GUIUtility.hotControl == id)
+ {
+ e.Use();
+ GUIUtility.hotControl = 0;
+ }
+
+ return hsv;
+ }
+
+ void GetWheelHueSaturation(float x, float y, float radius, out float hue, out float saturation)
+ {
+ float dx = (x - radius) / radius;
+ float dy = (y - radius) / radius;
+ float d = Mathf.Sqrt(dx * dx + dy * dy);
+ hue = Mathf.Atan2(dx, -dy);
+ hue = 1f - ((hue > 0) ? hue : (Mathf.PI * 2f) + hue) / (Mathf.PI * 2f);
+ saturation = Mathf.Clamp01(d);
+ }
+
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
+ {
+ return m_Size + 4f * 2f + EditorGUIUtility.singleLineHeight * 3f;
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/TrackballGroupDrawer.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/TrackballGroupDrawer.cs.meta
new file mode 100644
index 0000000..c882f77
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/PropertyDrawers/TrackballGroupDrawer.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a668d493c5ed56d448b53c19b2c3dfd2
+timeCreated: 1460563239
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetFactory.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetFactory.cs
deleted file mode 100644
index 2110ee0..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetFactory.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- // CUBE lut specs:
- // http://wwwimages.adobe.com/content/dam/Adobe/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf
- static class CubeLutAssetFactory
- {
- const int kVersion = 1;
- const int kSize = 33;
-
-#if POSTFX_DEBUG_MENUS
- [MenuItem("Tools/Post-processing/Create Utility Luts")]
-#endif
- static void CreateLuts()
- {
- Dump("Linear to Unity Log r" + kVersion, ColorUtilities.LinearToLogC);
- Dump("Unity Log to Linear r" + kVersion, ColorUtilities.LogCToLinear);
- Dump("sRGB to Unity Log r" + kVersion, x => ColorUtilities.LinearToLogC(Mathf.GammaToLinearSpace(x)));
- Dump("Unity Log to sRGB r" + kVersion, x => Mathf.LinearToGammaSpace(ColorUtilities.LogCToLinear(x)));
- Dump("Linear to sRGB r" + kVersion, Mathf.LinearToGammaSpace);
- Dump("sRGB to Linear r" + kVersion, Mathf.GammaToLinearSpace);
-
- AssetDatabase.Refresh();
- }
-
- static void Dump(string title, Func eval)
- {
- var sb = new StringBuilder();
- sb.AppendFormat("TITLE \"{0}\"\n", title);
- sb.AppendFormat("LUT_3D_SIZE {0}\n", kSize);
- sb.AppendFormat("DOMAIN_MIN {0} {0} {0}\n", 0f);
- sb.AppendFormat("DOMAIN_MAX {0} {0} {0}\n", 1f);
-
- const float kSizeMinusOne = (float)kSize - 1f;
-
- for (int x = 0; x < kSize; x++)
- for (int y = 0; y < kSize; y++)
- for (int z = 0; z < kSize; z++)
- {
- float ox = eval((float)x / kSizeMinusOne);
- float oy = eval((float)y / kSizeMinusOne);
- float oz = eval((float)z / kSizeMinusOne);
-
- // Resolve & Photoshop use BGR as default, let's make it easier for users
- sb.AppendFormat("{0} {1} {2}\n", oz, oy, ox);
- }
-
- var content = sb.ToString();
- var path = Path.Combine(Application.dataPath, string.Format("{0}.cube", title));
- File.WriteAllText(path, content);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetFactory.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetFactory.cs.meta
deleted file mode 100644
index e3de84f..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetFactory.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 4d506bd5da20d0248bfa343c6693d655
-timeCreated: 1496740688
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetImporter.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetImporter.cs
deleted file mode 100644
index a902d03..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetImporter.cs
+++ /dev/null
@@ -1,217 +0,0 @@
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using UnityEngine;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- sealed class CubeLutAssetImporter : AssetPostprocessor
- {
- static List s_Excluded = new List()
- {
- "Linear to sRGB r1",
- "Linear to Unity Log r1",
- "sRGB to Linear r1",
- "sRGB to Unity Log r1",
- "Unity Log to Linear r1",
- "Unity Log to sRGB r1"
- };
-
- static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] moved, string[] movedFrom)
- {
- foreach (string path in imported)
- {
- string ext = Path.GetExtension(path);
- string filename = Path.GetFileNameWithoutExtension(path);
-
- if (string.IsNullOrEmpty(ext) || s_Excluded.Contains(filename))
- continue;
-
- ext = ext.ToLowerInvariant();
- if (ext.Equals(".cube"))
- ImportCubeLut(path);
- }
- }
-
- // Basic CUBE lut parser
- // Specs: http://wwwimages.adobe.com/content/dam/Adobe/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf
- static void ImportCubeLut(string path)
- {
- // Remove the 'Assets' part of the path & build absolute path
- string fullpath = path.Substring(7);
- fullpath = Path.Combine(Application.dataPath, fullpath);
-
- // Read the lut data
- string[] lines = File.ReadAllLines(fullpath);
-
- // Start parsing
- int i = 0;
- int size = -1;
- int sizeCube = -1;
- var table = new List();
- var domainMin = Color.black;
- var domainMax = Color.white;
-
- while (true)
- {
- if (i >= lines.Length)
- {
- if (table.Count != sizeCube)
- Debug.LogError("Premature end of file");
-
- break;
- }
-
- string line = FilterLine(lines[i]);
-
- if (string.IsNullOrEmpty(line))
- goto next;
-
- // Header data
- if (line.StartsWith("TITLE"))
- goto next; // Skip the title tag, we don't need it
-
- if (line.StartsWith("LUT_3D_SIZE"))
- {
- string sizeStr = line.Substring(11).TrimStart();
-
- if (!int.TryParse(sizeStr, out size))
- {
- Debug.LogError("Invalid data on line " + i);
- break;
- }
-
- if (size < 2 || size > 256)
- {
- Debug.LogError("LUT size out of range");
- break;
- }
-
- sizeCube = size * size * size;
- goto next;
- }
-
- if (line.StartsWith("DOMAIN_MIN"))
- {
- if (!ParseDomain(i, line, ref domainMin)) break;
- goto next;
- }
-
- if (line.StartsWith("DOMAIN_MAX"))
- {
- if (!ParseDomain(i, line, ref domainMax)) break;
- goto next;
- }
-
- // Table
- string[] row = line.Split();
-
- if (row.Length != 3)
- {
- Debug.LogError("Invalid data on line " + i);
- break;
- }
-
- var color = Color.black;
- for (int j = 0; j < 3; j++)
- {
- float d;
- if (!float.TryParse(row[j], out d))
- {
- Debug.LogError("Invalid data on line " + i);
- break;
- }
-
- color[j] = d;
- }
-
- table.Add(color);
-
- next:
- i++;
- }
-
- if (sizeCube != table.Count)
- {
- Debug.LogError("Wrong table size - Expected " + sizeCube + " elements, got " + table.Count);
- return;
- }
-
- // Check if the Texture3D already exists, update it in this case (better workflow for
- // the user)
- string assetPath = Path.ChangeExtension(path, ".asset");
- var tex = AssetDatabase.LoadAssetAtPath(assetPath);
-
- if (tex != null)
- {
- tex.SetPixels(table.ToArray(), 0);
- tex.Apply();
- }
- else
- {
- // Generate a new Texture3D
- tex = new Texture3D(size, size, size, TextureFormat.RGBAHalf, false)
- {
- anisoLevel = 0,
- filterMode = FilterMode.Bilinear,
- wrapMode = TextureWrapMode.Clamp,
- };
-
- tex.SetPixels(table.ToArray(), 0);
- tex.Apply();
-
- // Save to disk
- AssetDatabase.CreateAsset(tex, assetPath);
- }
-
- AssetDatabase.SaveAssets();
- AssetDatabase.Refresh();
- }
-
- static string FilterLine(string line)
- {
- var filtered = new StringBuilder();
- line = line.TrimStart().TrimEnd();
- int len = line.Length;
- int i = 0;
-
- while (i < len)
- {
- char c = line[i];
-
- if (c == '#') // Filters comment out
- break;
-
- filtered.Append(c);
- i++;
- }
-
- return filtered.ToString();
- }
-
- static bool ParseDomain(int i, string line, ref Color domain)
- {
- string[] domainStrs = line.Substring(10).TrimStart().Split();
-
- if (domainStrs.Length != 3)
- {
- Debug.LogError("Invalid data on line " + i);
- return false;
- }
-
- for (int j = 0; j < 3; j++)
- {
- float d;
- if (!float.TryParse(domainStrs[j], out d))
- {
- Debug.LogError("Invalid data on line " + i);
- return false;
- }
-
- domain[j] = d;
- }
-
- return true;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetImporter.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetImporter.cs.meta
deleted file mode 100644
index e53d8c5..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/CubeLutAssetImporter.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 3e4b5d9a1abab984cbe0cbdb31fca939
-timeCreated: 1496737252
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/DefineSetter.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/DefineSetter.cs
deleted file mode 100644
index 1083590..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/DefineSetter.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System;
-using System.Linq;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- [InitializeOnLoad]
- sealed class DefineSetter
- {
- const string k_Define = "UNITY_POST_PROCESSING_STACK_V2";
-
- static DefineSetter()
- {
- var targets = Enum.GetValues(typeof(BuildTargetGroup))
- .Cast()
- .Where(x => x != BuildTargetGroup.Unknown)
- .Where(x => !IsObsolete(x));
-
- foreach (var target in targets)
- {
- var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target).Trim();
-
- var list = defines.Split(';', ' ')
- .Where(x => !string.IsNullOrEmpty(x))
- .ToList();
-
- if (list.Contains(k_Define))
- continue;
-
- list.Add(k_Define);
- defines = list.Aggregate((a, b) => a + ";" + b);
-
- PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
- }
- }
-
- static bool IsObsolete(BuildTargetGroup group)
- {
- var attrs = typeof(BuildTargetGroup)
- .GetField(group.ToString())
- .GetCustomAttributes(typeof(ObsoleteAttribute), false);
-
- return attrs != null && attrs.Length > 0;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/DefineSetter.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/DefineSetter.cs.meta
deleted file mode 100644
index d68eb21..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/DefineSetter.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 21c950a797aa518438786fc341790e14
-timeCreated: 1499857026
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ProfileFactory.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ProfileFactory.cs
deleted file mode 100644
index 70e461f..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ProfileFactory.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using UnityEngine;
-using UnityEditor.ProjectWindowCallback;
-using System.IO;
-using UnityEngine.SceneManagement;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public class ProfileFactory
- {
- [MenuItem("Assets/Create/Post-processing Profile", priority = 201)]
- static void CreatePostProcessProfile()
- {
- //var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon");
- ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "New Post-processing Profile.asset", null, null);
- }
-
- public static PostProcessProfile CreatePostProcessProfileAtPath(string path)
- {
- var profile = ScriptableObject.CreateInstance();
- profile.name = Path.GetFileName(path);
- AssetDatabase.CreateAsset(profile, path);
- AssetDatabase.SaveAssets();
- AssetDatabase.Refresh();
- return profile;
- }
-
- public static PostProcessProfile CreatePostProcessProfile(Scene scene, string targetName)
- {
- var path = string.Empty;
-
- if (string.IsNullOrEmpty(scene.path))
- {
- path = "Assets/";
- }
- else
- {
- var scenePath = Path.GetDirectoryName(scene.path);
- var extPath = scene.name + "_Profiles";
- var profilePath = scenePath + "/" + extPath;
-
- if (!AssetDatabase.IsValidFolder(profilePath))
- AssetDatabase.CreateFolder(scenePath, extPath);
-
- path = profilePath + "/";
- }
-
- path += targetName + " Profile.asset";
- path = AssetDatabase.GenerateUniqueAssetPath(path);
-
- var profile = ScriptableObject.CreateInstance();
- AssetDatabase.CreateAsset(profile, path);
- AssetDatabase.SaveAssets();
- AssetDatabase.Refresh();
- return profile;
- }
- }
-
- class DoCreatePostProcessProfile : EndNameEditAction
- {
- public override void Action(int instanceId, string pathName, string resourceFile)
- {
- var profile = ProfileFactory.CreatePostProcessProfileAtPath(pathName);
- ProjectWindowUtil.ShowCreatedAsset(profile);
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ProfileFactory.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ProfileFactory.cs.meta
deleted file mode 100644
index 3ae3175..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ProfileFactory.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: ac5668592895c1742a0c6e9d111f870b
-timeCreated: 1498836357
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ResourceAssetFactory.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ResourceAssetFactory.cs
deleted file mode 100644
index 0ea2470..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ResourceAssetFactory.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- static class ResourceAssetFactory
- {
-#if POSTFX_DEBUG_MENUS
- [MenuItem("Tools/Post-processing/Create Resources Asset")]
-#endif
- static void CreateAsset()
- {
- var asset = ScriptableObject.CreateInstance();
- AssetDatabase.CreateAsset(asset, "Assets/PostProcessResources.asset");
- AssetDatabase.SaveAssets();
- AssetDatabase.Refresh();
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ResourceAssetFactory.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ResourceAssetFactory.cs.meta
deleted file mode 100644
index 7ac577f..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/ResourceAssetFactory.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: d4351734f8a0aaa42a51a99db92e92e2
-timeCreated: 1496736723
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/VolumeFactory.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/VolumeFactory.cs
deleted file mode 100644
index 978b4d6..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/VolumeFactory.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public static class VolumeFactory
- {
- [MenuItem("GameObject/3D Object/Post-process Volume")]
- static void CreateVolume()
- {
- var gameObject = new GameObject("Post-process Volume");
- var collider = gameObject.AddComponent();
- collider.size = Vector3.one;
- collider.isTrigger = true;
- gameObject.AddComponent();
-
- Selection.objects = new [] { gameObject };
- EditorApplication.ExecuteMenuItem("GameObject/Move To View");
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/VolumeFactory.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/VolumeFactory.cs.meta
deleted file mode 100644
index 9c81e30..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Tools/VolumeFactory.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 0f3902e2aa2609f47ab0c956e56ea0bf
-timeCreated: 1497707764
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/CurveEditor.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/CurveEditor.cs
deleted file mode 100644
index fd4adaa..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/CurveEditor.cs
+++ /dev/null
@@ -1,859 +0,0 @@
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public sealed class CurveEditor
- {
- #region Enums
-
- enum EditMode
- {
- None,
- Moving,
- TangentEdit
- }
-
- enum Tangent
- {
- In,
- Out
- }
-
- #endregion
-
- #region Structs
-
- public struct Settings
- {
- public Rect bounds;
- public RectOffset padding;
- public Color selectionColor;
- public float curvePickingDistance;
- public float keyTimeClampingDistance;
-
- public static Settings defaultSettings
- {
- get
- {
- return new Settings
- {
- bounds = new Rect(0f, 0f, 1f, 1f),
- padding = new RectOffset(10, 10, 10, 10),
- selectionColor = Color.yellow,
- curvePickingDistance = 6f,
- keyTimeClampingDistance = 1e-4f
- };
- }
- }
- }
-
- public struct CurveState
- {
- public bool visible;
- public bool editable;
- public uint minPointCount;
- public float zeroKeyConstantValue;
- public Color color;
- public float width;
- public float handleWidth;
- public bool showNonEditableHandles;
- public bool onlyShowHandlesOnSelection;
- public bool loopInBounds;
-
- public static CurveState defaultState
- {
- get
- {
- return new CurveState
- {
- visible = true,
- editable = true,
- minPointCount = 2,
- zeroKeyConstantValue = 0f,
- color = Color.white,
- width = 2f,
- handleWidth = 2f,
- showNonEditableHandles = true,
- onlyShowHandlesOnSelection = false,
- loopInBounds = false
- };
- }
- }
- }
-
- public struct Selection
- {
- public SerializedProperty curve;
- public int keyframeIndex;
- public Keyframe? keyframe;
-
- public Selection(SerializedProperty curve, int keyframeIndex, Keyframe? keyframe)
- {
- this.curve = curve;
- this.keyframeIndex = keyframeIndex;
- this.keyframe = keyframe;
- }
- }
-
- internal struct MenuAction
- {
- internal SerializedProperty curve;
- internal int index;
- internal Vector3 position;
-
- internal MenuAction(SerializedProperty curve)
- {
- this.curve = curve;
- this.index = -1;
- this.position = Vector3.zero;
- }
-
- internal MenuAction(SerializedProperty curve, int index)
- {
- this.curve = curve;
- this.index = index;
- this.position = Vector3.zero;
- }
-
- internal MenuAction(SerializedProperty curve, Vector3 position)
- {
- this.curve = curve;
- this.index = -1;
- this.position = position;
- }
- }
-
- #endregion
-
- #region Fields & properties
-
- public Settings settings { get; private set; }
-
- readonly Dictionary m_Curves;
- Rect m_CurveArea;
-
- SerializedProperty m_SelectedCurve;
- int m_SelectedKeyframeIndex = -1;
-
- EditMode m_EditMode = EditMode.None;
- Tangent m_TangentEditMode;
-
- bool m_Dirty;
-
- #endregion
-
- #region Constructors & destructors
-
- public CurveEditor()
- : this(Settings.defaultSettings)
- { }
-
- public CurveEditor(Settings settings)
- {
- this.settings = settings;
- m_Curves = new Dictionary();
- }
-
- #endregion
-
- #region Public API
-
- public void Add(params SerializedProperty[] curves)
- {
- foreach (var curve in curves)
- Add(curve, CurveState.defaultState);
- }
-
- public void Add(SerializedProperty curve)
- {
- Add(curve, CurveState.defaultState);
- }
-
- public void Add(SerializedProperty curve, CurveState state)
- {
- // Make sure the property is in fact an AnimationCurve
- var animCurve = curve.animationCurveValue;
- if (animCurve == null)
- throw new ArgumentException("curve");
-
- if (m_Curves.ContainsKey(curve))
- Debug.LogWarning("Curve has already been added to the editor");
-
- m_Curves.Add(curve, state);
- }
-
- public void Remove(SerializedProperty curve)
- {
- m_Curves.Remove(curve);
- }
-
- public void RemoveAll()
- {
- m_Curves.Clear();
- }
-
- public CurveState GetCurveState(SerializedProperty curve)
- {
- CurveState state;
- if (!m_Curves.TryGetValue(curve, out state))
- throw new KeyNotFoundException("curve");
-
- return state;
- }
-
- public void SetCurveState(SerializedProperty curve, CurveState state)
- {
- if (!m_Curves.ContainsKey(curve))
- throw new KeyNotFoundException("curve");
-
- m_Curves[curve] = state;
- }
-
- public Selection GetSelection()
- {
- Keyframe? key = null;
- if (m_SelectedKeyframeIndex > -1)
- {
- var curve = m_SelectedCurve.animationCurveValue;
-
- if (m_SelectedKeyframeIndex >= curve.length)
- m_SelectedKeyframeIndex = -1;
- else
- key = curve[m_SelectedKeyframeIndex];
- }
-
- return new Selection(m_SelectedCurve, m_SelectedKeyframeIndex, key);
- }
-
- public void SetKeyframe(SerializedProperty curve, int keyframeIndex, Keyframe keyframe)
- {
- var animCurve = curve.animationCurveValue;
- SetKeyframe(animCurve, keyframeIndex, keyframe);
- SaveCurve(curve, animCurve);
- }
-
- public bool OnGUI(Rect rect)
- {
- if (Event.current.type == EventType.Repaint)
- m_Dirty = false;
-
- GUI.BeginClip(rect);
- {
- var area = new Rect(Vector2.zero, rect.size);
- m_CurveArea = settings.padding.Remove(area);
-
- foreach (var curve in m_Curves)
- OnCurveGUI(area, curve.Key, curve.Value);
-
- OnGeneralUI(area);
- }
- GUI.EndClip();
-
- return m_Dirty;
- }
-
- #endregion
-
- #region UI & events
-
- void OnCurveGUI(Rect rect, SerializedProperty curve, CurveState state)
- {
- // Discard invisible curves
- if (!state.visible)
- return;
-
- var animCurve = curve.animationCurveValue;
- var keys = animCurve.keys;
- var length = keys.Length;
-
- // Curve drawing
- // Slightly dim non-editable curves
- var color = state.color;
- if (!state.editable || !GUI.enabled)
- color.a *= 0.5f;
-
- Handles.color = color;
- var bounds = settings.bounds;
-
- if (length == 0)
- {
- var p1 = CurveToCanvas(new Vector3(bounds.xMin, state.zeroKeyConstantValue));
- var p2 = CurveToCanvas(new Vector3(bounds.xMax, state.zeroKeyConstantValue));
- Handles.DrawAAPolyLine(state.width, p1, p2);
- }
- else if (length == 1)
- {
- var p1 = CurveToCanvas(new Vector3(bounds.xMin, keys[0].value));
- var p2 = CurveToCanvas(new Vector3(bounds.xMax, keys[0].value));
- Handles.DrawAAPolyLine(state.width, p1, p2);
- }
- else
- {
- var prevKey = keys[0];
- for (int k = 1; k < length; k++)
- {
- var key = keys[k];
- var pts = BezierSegment(prevKey, key);
-
- if (float.IsInfinity(prevKey.outTangent) || float.IsInfinity(key.inTangent))
- {
- var s = HardSegment(prevKey, key);
- Handles.DrawAAPolyLine(state.width, s[0], s[1], s[2]);
- }
- else Handles.DrawBezier(pts[0], pts[3], pts[1], pts[2], color, null, state.width);
-
- prevKey = key;
- }
-
- // Curve extents & loops
- if (keys[0].time > bounds.xMin)
- {
- if (state.loopInBounds)
- {
- var p1 = keys[length - 1];
- p1.time -= settings.bounds.width;
- var p2 = keys[0];
- var pts = BezierSegment(p1, p2);
-
- if (float.IsInfinity(p1.outTangent) || float.IsInfinity(p2.inTangent))
- {
- var s = HardSegment(p1, p2);
- Handles.DrawAAPolyLine(state.width, s[0], s[1], s[2]);
- }
- else Handles.DrawBezier(pts[0], pts[3], pts[1], pts[2], color, null, state.width);
- }
- else
- {
- var p1 = CurveToCanvas(new Vector3(bounds.xMin, keys[0].value));
- var p2 = CurveToCanvas(keys[0]);
- Handles.DrawAAPolyLine(state.width, p1, p2);
- }
- }
-
- if (keys[length - 1].time < bounds.xMax)
- {
- if (state.loopInBounds)
- {
- var p1 = keys[length - 1];
- var p2 = keys[0];
- p2.time += settings.bounds.width;
- var pts = BezierSegment(p1, p2);
-
- if (float.IsInfinity(p1.outTangent) || float.IsInfinity(p2.inTangent))
- {
- var s = HardSegment(p1, p2);
- Handles.DrawAAPolyLine(state.width, s[0], s[1], s[2]);
- }
- else Handles.DrawBezier(pts[0], pts[3], pts[1], pts[2], color, null, state.width);
- }
- else
- {
- var p1 = CurveToCanvas(keys[length - 1]);
- var p2 = CurveToCanvas(new Vector3(bounds.xMax, keys[length - 1].value));
- Handles.DrawAAPolyLine(state.width, p1, p2);
- }
- }
- }
-
- // Make sure selection is correct (undo can break it)
- bool isCurrentlySelectedCurve = curve == m_SelectedCurve;
-
- if (isCurrentlySelectedCurve && m_SelectedKeyframeIndex >= length)
- m_SelectedKeyframeIndex = -1;
-
- if (!state.editable)
- m_SelectedKeyframeIndex = -1;
-
- float enabledFactor = GUI.enabled ? 1f : 0.8f;
-
- // Handles & keys
- for (int k = 0; k < length; k++)
- {
- bool isCurrentlySelectedKeyframe = k == m_SelectedKeyframeIndex;
- var e = Event.current;
-
- var pos = CurveToCanvas(keys[k]);
- var hitRect = new Rect(pos.x - 8f, pos.y - 8f, 16f, 16f);
- var offset = isCurrentlySelectedCurve
- ? new RectOffset(5, 5, 5, 5)
- : new RectOffset(6, 6, 6, 6);
-
- var outTangent = pos + CurveTangentToCanvas(keys[k].outTangent).normalized * 40f;
- var inTangent = pos - CurveTangentToCanvas(keys[k].inTangent).normalized * 40f;
- var inTangentHitRect = new Rect(inTangent.x - 7f, inTangent.y - 7f, 14f, 14f);
- var outTangentHitrect = new Rect(outTangent.x - 7f, outTangent.y - 7f, 14f, 14f);
-
- // Draw
- if (state.editable || state.showNonEditableHandles)
- {
- if (e.type == EventType.Repaint)
- {
- var selectedColor = (isCurrentlySelectedCurve && isCurrentlySelectedKeyframe)
- ? settings.selectionColor
- : state.color;
-
- // Keyframe
- EditorGUI.DrawRect(offset.Remove(hitRect), selectedColor * enabledFactor);
-
- // Tangents
- if (isCurrentlySelectedCurve && (!state.onlyShowHandlesOnSelection || (state.onlyShowHandlesOnSelection && isCurrentlySelectedKeyframe)))
- {
- Handles.color = selectedColor * enabledFactor;
-
- if (k > 0 || state.loopInBounds)
- {
- Handles.DrawAAPolyLine(state.handleWidth, pos, inTangent);
- EditorGUI.DrawRect(offset.Remove(inTangentHitRect), selectedColor);
- }
-
- if (k < length - 1 || state.loopInBounds)
- {
- Handles.DrawAAPolyLine(state.handleWidth, pos, outTangent);
- EditorGUI.DrawRect(offset.Remove(outTangentHitrect), selectedColor);
- }
- }
- }
- }
-
- // Events
- if (state.editable)
- {
- // Keyframe move
- if (m_EditMode == EditMode.Moving && e.type == EventType.MouseDrag && isCurrentlySelectedCurve && isCurrentlySelectedKeyframe)
- {
- EditMoveKeyframe(animCurve, keys, k);
- }
-
- // Tangent editing
- if (m_EditMode == EditMode.TangentEdit && e.type == EventType.MouseDrag && isCurrentlySelectedCurve && isCurrentlySelectedKeyframe)
- {
- bool alreadyBroken = !(Mathf.Approximately(keys[k].inTangent, keys[k].outTangent) || (float.IsInfinity(keys[k].inTangent) && float.IsInfinity(keys[k].outTangent)));
- EditMoveTangent(animCurve, keys, k, m_TangentEditMode, e.shift || !(alreadyBroken || e.control));
- }
-
- // Keyframe selection & context menu
- if (e.type == EventType.MouseDown && rect.Contains(e.mousePosition))
- {
- if (hitRect.Contains(e.mousePosition))
- {
- if (e.button == 0)
- {
- SelectKeyframe(curve, k);
- m_EditMode = EditMode.Moving;
- e.Use();
- }
- else if (e.button == 1)
- {
- // Keyframe context menu
- var menu = new GenericMenu();
- menu.AddItem(new GUIContent("Delete Key"), false, (x) =>
- {
- var action = (MenuAction)x;
- var curveValue = action.curve.animationCurveValue;
- action.curve.serializedObject.Update();
- RemoveKeyframe(curveValue, action.index);
- m_SelectedKeyframeIndex = -1;
- SaveCurve(action.curve, curveValue);
- action.curve.serializedObject.ApplyModifiedProperties();
- }, new MenuAction(curve, k));
- menu.ShowAsContext();
- e.Use();
- }
- }
- }
-
- // Tangent selection & edit mode
- if (e.type == EventType.MouseDown && rect.Contains(e.mousePosition))
- {
- if (inTangentHitRect.Contains(e.mousePosition) && (k > 0 || state.loopInBounds))
- {
- SelectKeyframe(curve, k);
- m_EditMode = EditMode.TangentEdit;
- m_TangentEditMode = Tangent.In;
- e.Use();
- }
- else if (outTangentHitrect.Contains(e.mousePosition) && (k < length - 1 || state.loopInBounds))
- {
- SelectKeyframe(curve, k);
- m_EditMode = EditMode.TangentEdit;
- m_TangentEditMode = Tangent.Out;
- e.Use();
- }
- }
-
- // Mouse up - clean up states
- if (e.rawType == EventType.MouseUp && m_EditMode != EditMode.None)
- {
- m_EditMode = EditMode.None;
- }
-
- // Set cursors
- {
- EditorGUIUtility.AddCursorRect(hitRect, MouseCursor.MoveArrow);
-
- if (k > 0 || state.loopInBounds)
- EditorGUIUtility.AddCursorRect(inTangentHitRect, MouseCursor.RotateArrow);
-
- if (k < length - 1 || state.loopInBounds)
- EditorGUIUtility.AddCursorRect(outTangentHitrect, MouseCursor.RotateArrow);
- }
- }
- }
-
- Handles.color = Color.white;
- SaveCurve(curve, animCurve);
- }
-
- void OnGeneralUI(Rect rect)
- {
- var e = Event.current;
-
- // Selection
- if (e.type == EventType.MouseDown)
- {
- GUI.FocusControl(null);
- m_SelectedCurve = null;
- m_SelectedKeyframeIndex = -1;
- bool used = false;
-
- var hit = CanvasToCurve(e.mousePosition);
- float curvePickValue = CurveToCanvas(hit).y;
-
- // Try and select a curve
- foreach (var curve in m_Curves)
- {
- if (!curve.Value.editable || !curve.Value.visible)
- continue;
-
- var prop = curve.Key;
- var state = curve.Value;
- var animCurve = prop.animationCurveValue;
- float hitY = animCurve.length == 0
- ? state.zeroKeyConstantValue
- : animCurve.Evaluate(hit.x);
-
- var curvePos = CurveToCanvas(new Vector3(hit.x, hitY));
-
- if (Mathf.Abs(curvePos.y - curvePickValue) < settings.curvePickingDistance)
- {
- m_SelectedCurve = prop;
-
- if (e.clickCount == 2 && e.button == 0)
- {
- // Create a keyframe on double-click on this curve
- EditCreateKeyframe(animCurve, hit, true, state.zeroKeyConstantValue);
- SaveCurve(prop, animCurve);
- }
- else if (e.button == 1)
- {
- // Curve context menu
- var menu = new GenericMenu();
- menu.AddItem(new GUIContent("Add Key"), false, (x) =>
- {
- var action = (MenuAction)x;
- var curveValue = action.curve.animationCurveValue;
- action.curve.serializedObject.Update();
- EditCreateKeyframe(curveValue, hit, true, 0f);
- SaveCurve(action.curve, curveValue);
- action.curve.serializedObject.ApplyModifiedProperties();
- }, new MenuAction(prop, hit));
- menu.ShowAsContext();
- e.Use();
- used = true;
- }
- }
- }
-
- if (e.clickCount == 2 && e.button == 0 && m_SelectedCurve == null)
- {
- // Create a keyframe on every curve on double-click
- foreach (var curve in m_Curves)
- {
- if (!curve.Value.editable || !curve.Value.visible)
- continue;
-
- var prop = curve.Key;
- var state = curve.Value;
- var animCurve = prop.animationCurveValue;
- EditCreateKeyframe(animCurve, hit, e.alt, state.zeroKeyConstantValue);
- SaveCurve(prop, animCurve);
- }
- }
- else if (!used && e.button == 1)
- {
- // Global context menu
- var menu = new GenericMenu();
- menu.AddItem(new GUIContent("Add Key At Position"), false, () => ContextMenuAddKey(hit, false));
- menu.AddItem(new GUIContent("Add Key On Curves"), false, () => ContextMenuAddKey(hit, true));
- menu.ShowAsContext();
- }
-
- e.Use();
- }
-
- // Delete selected key(s)
- if (e.type == EventType.KeyDown && (e.keyCode == KeyCode.Delete || e.keyCode == KeyCode.Backspace))
- {
- if (m_SelectedKeyframeIndex != -1 && m_SelectedCurve != null)
- {
- var animCurve = m_SelectedCurve.animationCurveValue;
- var length = animCurve.length;
-
- if (m_Curves[m_SelectedCurve].minPointCount < length && length >= 0)
- {
- EditDeleteKeyframe(animCurve, m_SelectedKeyframeIndex);
- m_SelectedKeyframeIndex = -1;
- SaveCurve(m_SelectedCurve, animCurve);
- }
-
- e.Use();
- }
- }
- }
-
- void SaveCurve(SerializedProperty prop, AnimationCurve curve)
- {
- prop.animationCurveValue = curve;
- }
-
- void Invalidate()
- {
- m_Dirty = true;
- }
-
- #endregion
-
- #region Keyframe manipulations
-
- void SelectKeyframe(SerializedProperty curve, int keyframeIndex)
- {
- m_SelectedKeyframeIndex = keyframeIndex;
- m_SelectedCurve = curve;
- Invalidate();
- }
-
- void ContextMenuAddKey(Vector3 hit, bool createOnCurve)
- {
- SerializedObject serializedObject = null;
-
- foreach (var curve in m_Curves)
- {
- if (!curve.Value.editable || !curve.Value.visible)
- continue;
-
- var prop = curve.Key;
- var state = curve.Value;
-
- if (serializedObject == null)
- {
- serializedObject = prop.serializedObject;
- serializedObject.Update();
- }
-
- var animCurve = prop.animationCurveValue;
- EditCreateKeyframe(animCurve, hit, createOnCurve, state.zeroKeyConstantValue);
- SaveCurve(prop, animCurve);
- }
-
- if (serializedObject != null)
- serializedObject.ApplyModifiedProperties();
-
- Invalidate();
- }
-
- void EditCreateKeyframe(AnimationCurve curve, Vector3 position, bool createOnCurve, float zeroKeyConstantValue)
- {
- float tangent = EvaluateTangent(curve, position.x);
-
- if (createOnCurve)
- {
- position.y = curve.length == 0
- ? zeroKeyConstantValue
- : curve.Evaluate(position.x);
- }
-
- AddKeyframe(curve, new Keyframe(position.x, position.y, tangent, tangent));
- }
-
- void EditDeleteKeyframe(AnimationCurve curve, int keyframeIndex)
- {
- RemoveKeyframe(curve, keyframeIndex);
- }
-
- void AddKeyframe(AnimationCurve curve, Keyframe newValue)
- {
- curve.AddKey(newValue);
- Invalidate();
- }
-
- void RemoveKeyframe(AnimationCurve curve, int keyframeIndex)
- {
- curve.RemoveKey(keyframeIndex);
- Invalidate();
- }
-
- void SetKeyframe(AnimationCurve curve, int keyframeIndex, Keyframe newValue)
- {
- var keys = curve.keys;
-
- if (keyframeIndex > 0)
- newValue.time = Mathf.Max(keys[keyframeIndex - 1].time + settings.keyTimeClampingDistance, newValue.time);
-
- if (keyframeIndex < keys.Length - 1)
- newValue.time = Mathf.Min(keys[keyframeIndex + 1].time - settings.keyTimeClampingDistance, newValue.time);
-
- curve.MoveKey(keyframeIndex, newValue);
- Invalidate();
- }
-
- void EditMoveKeyframe(AnimationCurve curve, Keyframe[] keys, int keyframeIndex)
- {
- var key = CanvasToCurve(Event.current.mousePosition);
- float inTgt = keys[keyframeIndex].inTangent;
- float outTgt = keys[keyframeIndex].outTangent;
- SetKeyframe(curve, keyframeIndex, new Keyframe(key.x, key.y, inTgt, outTgt));
- }
-
- void EditMoveTangent(AnimationCurve curve, Keyframe[] keys, int keyframeIndex, Tangent targetTangent, bool linkTangents)
- {
- var pos = CanvasToCurve(Event.current.mousePosition);
-
- float time = keys[keyframeIndex].time;
- float value = keys[keyframeIndex].value;
-
- pos -= new Vector3(time, value);
-
- if (targetTangent == Tangent.In && pos.x > 0f)
- pos.x = 0f;
-
- if (targetTangent == Tangent.Out && pos.x < 0f)
- pos.x = 0f;
-
- float tangent;
-
- if (Mathf.Approximately(pos.x, 0f))
- tangent = pos.y < 0f ? float.PositiveInfinity : float.NegativeInfinity;
- else
- tangent = pos.y / pos.x;
-
- float inTangent = keys[keyframeIndex].inTangent;
- float outTangent = keys[keyframeIndex].outTangent;
-
- if (targetTangent == Tangent.In || linkTangents)
- inTangent = tangent;
- if (targetTangent == Tangent.Out || linkTangents)
- outTangent = tangent;
-
- SetKeyframe(curve, keyframeIndex, new Keyframe(time, value, inTangent, outTangent));
- }
-
- #endregion
-
- #region Maths utilities
-
- Vector3 CurveToCanvas(Keyframe keyframe)
- {
- return CurveToCanvas(new Vector3(keyframe.time, keyframe.value));
- }
-
- Vector3 CurveToCanvas(Vector3 position)
- {
- var bounds = settings.bounds;
- var output = new Vector3((position.x - bounds.x) / (bounds.xMax - bounds.x), (position.y - bounds.y) / (bounds.yMax - bounds.y));
- output.x = output.x * (m_CurveArea.xMax - m_CurveArea.xMin) + m_CurveArea.xMin;
- output.y = (1f - output.y) * (m_CurveArea.yMax - m_CurveArea.yMin) + m_CurveArea.yMin;
- return output;
- }
-
- Vector3 CanvasToCurve(Vector3 position)
- {
- var bounds = settings.bounds;
- var output = position;
- output.x = (output.x - m_CurveArea.xMin) / (m_CurveArea.xMax - m_CurveArea.xMin);
- output.y = (output.y - m_CurveArea.yMin) / (m_CurveArea.yMax - m_CurveArea.yMin);
- output.x = Mathf.Lerp(bounds.x, bounds.xMax, output.x);
- output.y = Mathf.Lerp(bounds.yMax, bounds.y, output.y);
- return output;
- }
-
- Vector3 CurveTangentToCanvas(float tangent)
- {
- if (!float.IsInfinity(tangent))
- {
- var bounds = settings.bounds;
- float ratio = (m_CurveArea.width / m_CurveArea.height) / ((bounds.xMax - bounds.x) / (bounds.yMax - bounds.y));
- return new Vector3(1f, -tangent / ratio).normalized;
- }
-
- return float.IsPositiveInfinity(tangent) ? Vector3.up : Vector3.down;
- }
-
- Vector3[] BezierSegment(Keyframe start, Keyframe end)
- {
- var segment = new Vector3[4];
-
- segment[0] = CurveToCanvas(new Vector3(start.time, start.value));
- segment[3] = CurveToCanvas(new Vector3(end.time, end.value));
-
- float middle = start.time + ((end.time - start.time) * 0.333333f);
- float middle2 = start.time + ((end.time - start.time) * 0.666666f);
-
- segment[1] = CurveToCanvas(new Vector3(middle, ProjectTangent(start.time, start.value, start.outTangent, middle)));
- segment[2] = CurveToCanvas(new Vector3(middle2, ProjectTangent(end.time, end.value, end.inTangent, middle2)));
-
- return segment;
- }
-
- Vector3[] HardSegment(Keyframe start, Keyframe end)
- {
- var segment = new Vector3[3];
-
- segment[0] = CurveToCanvas(start);
- segment[1] = CurveToCanvas(new Vector3(end.time, start.value));
- segment[2] = CurveToCanvas(end);
-
- return segment;
- }
-
- float ProjectTangent(float inPosition, float inValue, float inTangent, float projPosition)
- {
- return inValue + ((projPosition - inPosition) * inTangent);
- }
-
- float EvaluateTangent(AnimationCurve curve, float time)
- {
- int prev = -1, next = 0;
- for (int i = 0; i < curve.keys.Length; i++)
- {
- if (time > curve.keys[i].time)
- {
- prev = i;
- next = i + 1;
- }
- else break;
- }
-
- if (next == 0)
- return 0f;
-
- if (prev == curve.keys.Length - 1)
- return 0f;
-
- const float kD = 1e-3f;
- float tp = Mathf.Max(time - kD, curve.keys[prev].time);
- float tn = Mathf.Min(time + kD, curve.keys[next].time);
-
- float vp = curve.Evaluate(tp);
- float vn = curve.Evaluate(tn);
-
- if (Mathf.Approximately(tn, tp))
- return (vn - vp > 0f) ? float.PositiveInfinity : float.NegativeInfinity;
-
- return (vn - vp) / (tn - tp);
- }
-
- #endregion
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/CurveEditor.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/CurveEditor.cs.meta
deleted file mode 100644
index c76f2b0..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/CurveEditor.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: ce0f0631fee52da41884853337cab99d
-timeCreated: 1493979438
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorGUIHelper.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorGUIHelper.cs
new file mode 100644
index 0000000..c0d4e1e
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorGUIHelper.cs
@@ -0,0 +1,194 @@
+using System;
+using UnityEngine;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Reflection;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ public static class EditorGUIHelper
+ {
+ static EditorGUIHelper()
+ {
+ s_GUIContentCache = new Dictionary();
+ }
+
+ #region GUIContent caching
+
+ static Dictionary s_GUIContentCache;
+
+ public static GUIContent GetContent(string textAndTooltip)
+ {
+ if (string.IsNullOrEmpty(textAndTooltip))
+ return GUIContent.none;
+
+ GUIContent content;
+
+ if (!s_GUIContentCache.TryGetValue(textAndTooltip, out content))
+ {
+ var s = textAndTooltip.Split('|');
+ content = new GUIContent(s[0]);
+
+ if (s.Length > 1 && !string.IsNullOrEmpty(s[1]))
+ content.tooltip = s[1];
+
+ s_GUIContentCache.Add(textAndTooltip, content);
+ }
+
+ return content;
+ }
+
+ #endregion
+
+ public static bool Header(string title, SerializedProperty group, Action resetAction)
+ {
+ var rect = GUILayoutUtility.GetRect(16f, 22f, FxStyles.header);
+ GUI.Box(rect, title, FxStyles.header);
+
+ var display = group == null || group.isExpanded;
+
+ var foldoutRect = new Rect(rect.x + 4f, rect.y + 2f, 13f, 13f);
+ var e = Event.current;
+
+ var popupRect = new Rect(rect.x + rect.width - FxStyles.paneOptionsIcon.width - 5f, rect.y + FxStyles.paneOptionsIcon.height / 2f + 1f, FxStyles.paneOptionsIcon.width, FxStyles.paneOptionsIcon.height);
+ GUI.DrawTexture(popupRect, FxStyles.paneOptionsIcon);
+
+ if (e.type == EventType.Repaint)
+ FxStyles.headerFoldout.Draw(foldoutRect, false, false, display, false);
+
+ if (e.type == EventType.MouseDown)
+ {
+ if (popupRect.Contains(e.mousePosition))
+ {
+ var popup = new GenericMenu();
+ popup.AddItem(GetContent("Reset"), false, () => resetAction());
+ popup.AddSeparator(string.Empty);
+ popup.AddItem(GetContent("Copy Settings"), false, () => CopySettings(group));
+
+ if (CanPaste(group))
+ popup.AddItem(GetContent("Paste Settings"), false, () => PasteSettings(group));
+ else
+ popup.AddDisabledItem(GetContent("Paste Settings"));
+
+ popup.ShowAsContext();
+ }
+ else if (rect.Contains(e.mousePosition) && group != null)
+ {
+ display = !display;
+
+ if (group != null)
+ group.isExpanded = !group.isExpanded;
+
+ e.Use();
+ }
+ }
+
+ return display;
+ }
+
+ public static bool Header(string title, SerializedProperty group, SerializedProperty enabledField, Action resetAction)
+ {
+ var field = ReflectionUtils.GetFieldInfoFromPath(enabledField.serializedObject.targetObject, enabledField.propertyPath);
+ object parent = null;
+ PropertyInfo prop = null;
+
+ if (field != null && field.IsDefined(typeof(GetSetAttribute), false))
+ {
+ var attr = (GetSetAttribute)field.GetCustomAttributes(typeof(GetSetAttribute), false)[0];
+ parent = ReflectionUtils.GetParentObject(enabledField.propertyPath, enabledField.serializedObject.targetObject);
+ prop = parent.GetType().GetProperty(attr.name);
+ }
+
+ var display = group == null || group.isExpanded;
+ var enabled = enabledField.boolValue;
+
+ var rect = GUILayoutUtility.GetRect(16f, 22f, FxStyles.header);
+ GUI.Box(rect, title, FxStyles.header);
+
+ var toggleRect = new Rect(rect.x + 4f, rect.y + 4f, 13f, 13f);
+ var e = Event.current;
+
+ var popupRect = new Rect(rect.x + rect.width - FxStyles.paneOptionsIcon.width - 5f, rect.y + FxStyles.paneOptionsIcon.height / 2f + 1f, FxStyles.paneOptionsIcon.width, FxStyles.paneOptionsIcon.height);
+ GUI.DrawTexture(popupRect, FxStyles.paneOptionsIcon);
+
+ if (e.type == EventType.Repaint)
+ FxStyles.headerCheckbox.Draw(toggleRect, false, false, enabled, false);
+
+ if (e.type == EventType.MouseDown)
+ {
+ const float kOffset = 2f;
+ toggleRect.x -= kOffset;
+ toggleRect.y -= kOffset;
+ toggleRect.width += kOffset * 2f;
+ toggleRect.height += kOffset * 2f;
+
+ if (toggleRect.Contains(e.mousePosition))
+ {
+ enabledField.boolValue = !enabledField.boolValue;
+
+ if (prop != null)
+ prop.SetValue(parent, enabledField.boolValue, null);
+
+ e.Use();
+ }
+ else if (popupRect.Contains(e.mousePosition))
+ {
+ var popup = new GenericMenu();
+ popup.AddItem(GetContent("Reset"), false, () => resetAction());
+ popup.AddSeparator(string.Empty);
+ popup.AddItem(GetContent("Copy Settings"), false, () => CopySettings(group));
+
+ if (CanPaste(group))
+ popup.AddItem(GetContent("Paste Settings"), false, () => PasteSettings(group));
+ else
+ popup.AddDisabledItem(GetContent("Paste Settings"));
+
+ popup.ShowAsContext();
+ }
+ else if (rect.Contains(e.mousePosition) && group != null)
+ {
+ display = !display;
+ group.isExpanded = !group.isExpanded;
+ e.Use();
+ }
+ }
+
+ return display;
+ }
+
+ static void CopySettings(SerializedProperty settings)
+ {
+ var t = typeof(PostProcessingProfile);
+ var settingsStruct = ReflectionUtils.GetFieldValueFromPath(settings.serializedObject.targetObject, ref t, settings.propertyPath);
+ var serializedString = t.ToString() + '|' + JsonUtility.ToJson(settingsStruct);
+ EditorGUIUtility.systemCopyBuffer = serializedString;
+ }
+
+ static bool CanPaste(SerializedProperty settings)
+ {
+ var data = EditorGUIUtility.systemCopyBuffer;
+
+ if (string.IsNullOrEmpty(data))
+ return false;
+
+ var parts = data.Split('|');
+
+ if (string.IsNullOrEmpty(parts[0]))
+ return false;
+
+ var field = ReflectionUtils.GetFieldInfoFromPath(settings.serializedObject.targetObject, settings.propertyPath);
+ return parts[0] == field.FieldType.ToString();
+ }
+
+ static void PasteSettings(SerializedProperty settings)
+ {
+ Undo.RecordObject(settings.serializedObject.targetObject, "Paste effect settings");
+ var field = ReflectionUtils.GetFieldInfoFromPath(settings.serializedObject.targetObject, settings.propertyPath);
+ var json = EditorGUIUtility.systemCopyBuffer.Substring(field.FieldType.ToString().Length + 1);
+ var obj = JsonUtility.FromJson(json, field.FieldType);
+ var parent = ReflectionUtils.GetParentObject(settings.propertyPath, settings.serializedObject.targetObject);
+ field.SetValue(parent, obj, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, CultureInfo.CurrentCulture);
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorGUIHelper.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorGUIHelper.cs.meta
new file mode 100644
index 0000000..4ce250e
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorGUIHelper.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7226e17fa48c86148a3d15584e21b4cb
+timeCreated: 1460477750
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorResources.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorResources.cs
new file mode 100644
index 0000000..aea193c
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorResources.cs
@@ -0,0 +1,58 @@
+using UnityEngine;
+
+namespace UnityEditor.PostProcessing
+{
+ using UnityObject = Object;
+
+ static class EditorResources
+ {
+ static string m_EditorResourcesPath = string.Empty;
+
+ internal static string editorResourcesPath
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(m_EditorResourcesPath))
+ {
+ string path;
+
+ if (SearchForEditorResourcesPath(out path))
+ m_EditorResourcesPath = path;
+ else
+ Debug.LogError("Unable to locate editor resources. Make sure the PostProcessing package has been installed correctly.");
+ }
+
+ return m_EditorResourcesPath;
+ }
+ }
+
+ internal static T Load(string name)
+ where T : UnityObject
+ {
+ return AssetDatabase.LoadAssetAtPath(editorResourcesPath + name);
+ }
+
+ static bool SearchForEditorResourcesPath(out string path)
+ {
+ path = string.Empty;
+
+ string searchStr = "/PostProcessing/Editor Resources/";
+ string str = null;
+
+ foreach (var assetPath in AssetDatabase.GetAllAssetPaths())
+ {
+ if (assetPath.Contains(searchStr))
+ {
+ str = assetPath;
+ break;
+ }
+ }
+
+ if (str == null)
+ return false;
+
+ path = str.Substring(0, str.LastIndexOf(searchStr) + searchStr.Length);
+ return true;
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorResources.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorResources.cs.meta
new file mode 100644
index 0000000..cdcbe17
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorResources.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a66d7b0165140a1439be89b5afc000fb
+timeCreated: 1476177015
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorUtilities.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorUtilities.cs
deleted file mode 100644
index 1fe6060..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorUtilities.cs
+++ /dev/null
@@ -1,311 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using UnityEngine;
-using UnityEngine.Assertions;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- public static class EditorUtilities
- {
- static Dictionary s_GUIContentCache;
- static Dictionary s_AttributeDecorators;
-
- static PostProcessEffectSettings s_ClipboardContent;
-
- public static bool isTargetingConsoles
- {
- get
- {
- var t = EditorUserBuildSettings.activeBuildTarget;
- return t == BuildTarget.PS4
- || t == BuildTarget.XboxOne
- || t == BuildTarget.Switch;
- }
- }
-
- public static bool isTargetingMobiles
- {
- get
- {
- var t = EditorUserBuildSettings.activeBuildTarget;
- return t == BuildTarget.Android
- || t == BuildTarget.iOS
- || t == BuildTarget.tvOS
- || t == BuildTarget.Tizen
- || t == BuildTarget.N3DS
- || t == BuildTarget.PSP2;
- }
- }
-
- public static bool isTargetingConsolesOrMobiles
- {
- get { return isTargetingConsoles || isTargetingMobiles; }
- }
-
- static EditorUtilities()
- {
- s_GUIContentCache = new Dictionary();
- s_AttributeDecorators = new Dictionary();
- ReloadDecoratorTypes();
- }
-
- [Callbacks.DidReloadScripts]
- static void OnEditorReload()
- {
- ReloadDecoratorTypes();
- }
-
- static void ReloadDecoratorTypes()
- {
- s_AttributeDecorators.Clear();
-
- // Look for all the valid attribute decorators
- var types = RuntimeUtilities.GetAllAssemblyTypes()
- .Where(
- t => t.IsSubclassOf(typeof(AttributeDecorator))
- && t.IsDefined(typeof(DecoratorAttribute), false)
- && !t.IsAbstract
- );
-
- // Store them
- foreach (var type in types)
- {
- var attr = type.GetAttribute();
- var decorator = (AttributeDecorator)Activator.CreateInstance(type);
- s_AttributeDecorators.Add(attr.attributeType, decorator);
- }
- }
-
- internal static AttributeDecorator GetDecorator(Type attributeType)
- {
- AttributeDecorator decorator;
- return !s_AttributeDecorators.TryGetValue(attributeType, out decorator)
- ? null
- : decorator;
- }
-
- public static GUIContent GetContent(string textAndTooltip)
- {
- if (string.IsNullOrEmpty(textAndTooltip))
- return GUIContent.none;
-
- GUIContent content;
-
- if (!s_GUIContentCache.TryGetValue(textAndTooltip, out content))
- {
- var s = textAndTooltip.Split('|');
- content = new GUIContent(s[0]);
-
- if (s.Length > 1 && !string.IsNullOrEmpty(s[1]))
- content.tooltip = s[1];
-
- s_GUIContentCache.Add(textAndTooltip, content);
- }
-
- return content;
- }
-
- public static void DrawFixMeBox(string text, Action action)
- {
- Assert.IsNotNull(action);
-
- EditorGUILayout.HelpBox(text, MessageType.Warning);
-
- GUILayout.Space(-32);
- using (new EditorGUILayout.HorizontalScope())
- {
- GUILayout.FlexibleSpace();
-
- if (GUILayout.Button("Fix", GUILayout.Width(60)))
- action();
-
- GUILayout.Space(8);
- }
- GUILayout.Space(11);
- }
-
- public static void DrawSplitter()
- {
- var rect = GUILayoutUtility.GetRect(1f, 1f);
-
- // Splitter rect should be full-width
- rect.xMin = 0f;
- rect.width += 4f;
-
- if (Event.current.type != EventType.Repaint)
- return;
-
- EditorGUI.DrawRect(rect, !EditorGUIUtility.isProSkin
- ? new Color(0.6f, 0.6f, 0.6f, 1.333f)
- : new Color(0.12f, 0.12f, 0.12f, 1.333f));
- }
-
- public static void DrawOverrideCheckbox(Rect rect, SerializedProperty property)
- {
- var oldColor = GUI.color;
- GUI.color = new Color(0.6f, 0.6f, 0.6f, 0.75f);
- property.boolValue = GUI.Toggle(rect, property.boolValue, GetContent("|Override this setting for this volume."), Styling.smallTickbox);
- GUI.color = oldColor;
- }
-
- public static void DrawHeaderLabel(string title)
- {
- EditorGUILayout.LabelField(title, Styling.labelHeader);
- }
-
- public static bool DrawHeader(string title, bool state)
- {
- var backgroundRect = GUILayoutUtility.GetRect(1f, 17f);
-
- var labelRect = backgroundRect;
- labelRect.xMin += 16f;
- labelRect.xMax -= 20f;
-
- var foldoutRect = backgroundRect;
- foldoutRect.y += 1f;
- foldoutRect.width = 13f;
- foldoutRect.height = 13f;
-
- // Background rect should be full-width
- backgroundRect.xMin = 0f;
- backgroundRect.width += 4f;
-
- // Background
- float backgroundTint = EditorGUIUtility.isProSkin ? 0.1f : 1f;
- EditorGUI.DrawRect(backgroundRect, new Color(backgroundTint, backgroundTint, backgroundTint, 0.2f));
-
- // Title
- EditorGUI.LabelField(labelRect, GetContent(title), EditorStyles.boldLabel);
-
- // Active checkbox
- state = GUI.Toggle(foldoutRect, state, GUIContent.none, EditorStyles.foldout);
-
- var e = Event.current;
- if (e.type == EventType.MouseDown && backgroundRect.Contains(e.mousePosition) && e.button == 0)
- {
- state = !state;
- e.Use();
- }
-
- return state;
- }
-
- public static bool DrawHeader(string title, SerializedProperty group, SerializedProperty activeField, PostProcessEffectSettings target, Action resetAction, Action removeAction)
- {
- Assert.IsNotNull(group);
- Assert.IsNotNull(activeField);
- Assert.IsNotNull(target);
-
- var backgroundRect = GUILayoutUtility.GetRect(1f, 17f);
-
- var labelRect = backgroundRect;
- labelRect.xMin += 16f;
- labelRect.xMax -= 20f;
-
- var toggleRect = backgroundRect;
- toggleRect.y += 2f;
- toggleRect.width = 13f;
- toggleRect.height = 13f;
-
- var menuIcon = EditorGUIUtility.isProSkin
- ? Styling.paneOptionsIconDark
- : Styling.paneOptionsIconLight;
-
- var menuRect = new Rect(labelRect.xMax + 4f, labelRect.y + 4f, menuIcon.width, menuIcon.height);
-
- // Background rect should be full-width
- backgroundRect.xMin = 0f;
- backgroundRect.width += 4f;
-
- // Background
- float backgroundTint = EditorGUIUtility.isProSkin ? 0.1f : 1f;
- EditorGUI.DrawRect(backgroundRect, new Color(backgroundTint, backgroundTint, backgroundTint, 0.2f));
-
- // Title
- using (new EditorGUI.DisabledScope(!activeField.boolValue))
- EditorGUI.LabelField(labelRect, GetContent(title), EditorStyles.boldLabel);
-
- // Active checkbox
- activeField.serializedObject.Update();
- activeField.boolValue = GUI.Toggle(toggleRect, activeField.boolValue, GUIContent.none, Styling.smallTickbox);
- activeField.serializedObject.ApplyModifiedProperties();
-
- // Dropdown menu icon
- GUI.DrawTexture(menuRect, menuIcon);
-
- // Handle events
- var e = Event.current;
-
- if (e.type == EventType.MouseDown)
- {
- if (menuRect.Contains(e.mousePosition))
- {
- ShowHeaderContextMenu(new Vector2(menuRect.x, menuRect.yMax), target, resetAction, removeAction);
- e.Use();
- }
- else if (labelRect.Contains(e.mousePosition))
- {
- if (e.button == 0)
- group.isExpanded = !group.isExpanded;
- else
- ShowHeaderContextMenu(e.mousePosition, target, resetAction, removeAction);
-
- e.Use();
- }
- }
-
- return group.isExpanded;
- }
-
- static void ShowHeaderContextMenu(Vector2 position, PostProcessEffectSettings target, Action resetAction, Action removeAction)
- {
- Assert.IsNotNull(resetAction);
- Assert.IsNotNull(removeAction);
-
- var menu = new GenericMenu();
- menu.AddItem(GetContent("Reset"), false, () => resetAction());
- menu.AddItem(GetContent("Remove"), false, () => removeAction());
- menu.AddSeparator(string.Empty);
- menu.AddItem(GetContent("Copy Settings"), false, () => CopySettings(target));
-
- if (CanPaste(target))
- menu.AddItem(GetContent("Paste Settings"), false, () => PasteSettings(target));
- else
- menu.AddDisabledItem(GetContent("Paste Settings"));
-
- menu.DropDown(new Rect(position, Vector2.zero));
- }
-
- static void CopySettings(PostProcessEffectSettings target)
- {
- Assert.IsNotNull(target);
-
- if (s_ClipboardContent != null)
- {
- RuntimeUtilities.Destroy(s_ClipboardContent);
- s_ClipboardContent = null;
- }
-
- s_ClipboardContent = (PostProcessEffectSettings)ScriptableObject.CreateInstance(target.GetType());
- EditorUtility.CopySerializedIfDifferent(target, s_ClipboardContent);
- }
-
- static void PasteSettings(PostProcessEffectSettings target)
- {
- Assert.IsNotNull(target);
- Assert.IsNotNull(s_ClipboardContent);
- Assert.AreEqual(s_ClipboardContent.GetType(), target.GetType());
-
- Undo.RecordObject(target, "Paste Settings");
- EditorUtility.CopySerializedIfDifferent(s_ClipboardContent, target);
- }
-
- static bool CanPaste(PostProcessEffectSettings target)
- {
- return s_ClipboardContent != null
- && s_ClipboardContent.GetType() == target.GetType();
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorUtilities.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorUtilities.cs.meta
deleted file mode 100644
index 2ce480e..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/EditorUtilities.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 09e002b759745fa499d539b9021af38e
-timeCreated: 1489050987
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/FxStyles.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/FxStyles.cs
new file mode 100644
index 0000000..e3a4dff
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/FxStyles.cs
@@ -0,0 +1,111 @@
+using UnityEngine;
+
+namespace UnityEditor.PostProcessing
+{
+ public static class FxStyles
+ {
+ public static GUIStyle tickStyleRight;
+ public static GUIStyle tickStyleLeft;
+ public static GUIStyle tickStyleCenter;
+
+ public static GUIStyle preSlider;
+ public static GUIStyle preSliderThumb;
+ public static GUIStyle preButton;
+ public static GUIStyle preDropdown;
+
+ public static GUIStyle preLabel;
+ public static GUIStyle hueCenterCursor;
+ public static GUIStyle hueRangeCursor;
+
+ public static GUIStyle centeredBoldLabel;
+ public static GUIStyle wheelThumb;
+ public static Vector2 wheelThumbSize;
+
+ public static GUIStyle header;
+ public static GUIStyle headerCheckbox;
+ public static GUIStyle headerFoldout;
+
+ public static Texture2D playIcon;
+ public static Texture2D checkerIcon;
+ public static Texture2D paneOptionsIcon;
+
+ public static GUIStyle centeredMiniLabel;
+
+ static FxStyles()
+ {
+ tickStyleRight = new GUIStyle("Label")
+ {
+ alignment = TextAnchor.MiddleRight,
+ fontSize = 9
+ };
+
+ tickStyleLeft = new GUIStyle("Label")
+ {
+ alignment = TextAnchor.MiddleLeft,
+ fontSize = 9
+ };
+
+ tickStyleCenter = new GUIStyle("Label")
+ {
+ alignment = TextAnchor.MiddleCenter,
+ fontSize = 9
+ };
+
+ preSlider = new GUIStyle("PreSlider");
+ preSliderThumb = new GUIStyle("PreSliderThumb");
+ preButton = new GUIStyle("PreButton");
+ preDropdown = new GUIStyle("preDropdown");
+
+ preLabel = new GUIStyle("ShurikenLabel");
+
+ hueCenterCursor = new GUIStyle("ColorPicker2DThumb")
+ {
+ normal = { background = (Texture2D)EditorGUIUtility.LoadRequired("Builtin Skins/DarkSkin/Images/ShurikenPlus.png") },
+ fixedWidth = 6,
+ fixedHeight = 6
+ };
+
+ hueRangeCursor = new GUIStyle(hueCenterCursor)
+ {
+ normal = { background = (Texture2D)EditorGUIUtility.LoadRequired("Builtin Skins/DarkSkin/Images/CircularToggle_ON.png") }
+ };
+
+ wheelThumb = new GUIStyle("ColorPicker2DThumb");
+
+ centeredBoldLabel = new GUIStyle(GUI.skin.GetStyle("Label"))
+ {
+ alignment = TextAnchor.UpperCenter,
+ fontStyle = FontStyle.Bold
+ };
+
+ centeredMiniLabel = new GUIStyle(EditorStyles.centeredGreyMiniLabel)
+ {
+ alignment = TextAnchor.UpperCenter
+ };
+
+ wheelThumbSize = new Vector2(
+ !Mathf.Approximately(wheelThumb.fixedWidth, 0f) ? wheelThumb.fixedWidth : wheelThumb.padding.horizontal,
+ !Mathf.Approximately(wheelThumb.fixedHeight, 0f) ? wheelThumb.fixedHeight : wheelThumb.padding.vertical
+ );
+
+ header = new GUIStyle("ShurikenModuleTitle")
+ {
+ font = (new GUIStyle("Label")).font,
+ border = new RectOffset(15, 7, 4, 4),
+ fixedHeight = 22,
+ contentOffset = new Vector2(20f, -2f)
+ };
+
+ headerCheckbox = new GUIStyle("ShurikenCheckMark");
+ headerFoldout = new GUIStyle("Foldout");
+
+ playIcon = (Texture2D)EditorGUIUtility.LoadRequired("Builtin Skins/DarkSkin/Images/IN foldout act.png");
+ checkerIcon = (Texture2D)EditorGUIUtility.LoadRequired("Icons/CheckerFloor.png");
+
+ if (EditorGUIUtility.isProSkin)
+ paneOptionsIcon = (Texture2D)EditorGUIUtility.LoadRequired("Builtin Skins/DarkSkin/Images/pane options.png");
+ else
+ paneOptionsIcon = (Texture2D)EditorGUIUtility.LoadRequired("Builtin Skins/LightSkin/Images/pane options.png");
+ }
+ }
+}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/FxStyles.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/FxStyles.cs.meta
new file mode 100644
index 0000000..5522482
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/FxStyles.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8f31cf52f05e80c4ea48570d0c3c8f59
+timeCreated: 1461744717
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/GlobalSettings.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/GlobalSettings.cs
deleted file mode 100644
index 3fc2456..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/GlobalSettings.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityEditor.Rendering.PostProcessing
-{
- static class GlobalSettings
- {
- static class Keys
- {
- internal const string trackballSensitivity = "PostProcessing.Trackball.Sensitivity";
- internal const string volumeGizmoColor = "PostProcessing.Volume.GizmoColor";
- internal const string currentChannelMixer = "PostProcessing.ChannelMixer.CurrentChannel";
- internal const string currentCurve = "PostProcessing.Curve.Current";
- }
-
- static bool m_Loaded = false;
-
- static float m_TrackballSensitivity = 0.2f;
- internal static float trackballSensitivity
- {
- get { return m_TrackballSensitivity; }
- set { TrySave(ref m_TrackballSensitivity, value, Keys.trackballSensitivity); }
- }
-
- static Color m_VolumeGizmoColor = new Color(0.2f, 0.8f, 0.1f, 0.5f);
- internal static Color volumeGizmoColor
- {
- get { return m_VolumeGizmoColor; }
- set { TrySave(ref m_VolumeGizmoColor, value, Keys.volumeGizmoColor); }
- }
-
- static int m_CurrentChannelMixer = 0;
- internal static int currentChannelMixer
- {
- get { return m_CurrentChannelMixer; }
- set { TrySave(ref m_CurrentChannelMixer, value, Keys.currentChannelMixer); }
- }
-
- static int m_CurrentCurve = 0;
- internal static int currentCurve
- {
- get { return m_CurrentCurve; }
- set { TrySave(ref m_CurrentCurve, value, Keys.currentCurve); }
- }
-
- static GlobalSettings()
- {
- Load();
- }
-
- [PreferenceItem("PostProcessing")]
- static void PreferenceGUI()
- {
- if (!m_Loaded)
- Load();
-
- EditorGUILayout.Space();
-
- trackballSensitivity = EditorGUILayout.Slider("Trackballs Sensitivity", trackballSensitivity, 0.05f, 1f);
- volumeGizmoColor = EditorGUILayout.ColorField("Volume Gizmo Color", volumeGizmoColor);
- }
-
- static void Load()
- {
- m_TrackballSensitivity = EditorPrefs.GetFloat(Keys.trackballSensitivity, 0.2f);
- m_VolumeGizmoColor = GetColor(Keys.volumeGizmoColor, new Color(0.2f, 0.8f, 0.1f, 0.5f));
- m_CurrentChannelMixer = EditorPrefs.GetInt(Keys.currentChannelMixer, 0);
- m_CurrentCurve = EditorPrefs.GetInt(Keys.currentCurve, 0);
-
- m_Loaded = true;
- }
-
- static Color GetColor(string key, Color defaultValue)
- {
- int value = EditorPrefs.GetInt(key, (int)ColorUtilities.ToHex(defaultValue));
- return ColorUtilities.ToRGBA((uint)value);
- }
-
- static void TrySave(ref T field, T newValue, string key)
- {
- if (field.Equals(newValue))
- return;
-
- if (typeof(T) == typeof(float))
- EditorPrefs.SetFloat(key, (float)(object)newValue);
- else if (typeof(T) == typeof(int))
- EditorPrefs.SetInt(key, (int)(object)newValue);
- else if (typeof(T) == typeof(bool))
- EditorPrefs.SetBool(key, (bool)(object)newValue);
- else if (typeof(T) == typeof(string))
- EditorPrefs.SetString(key, (string)(object)newValue);
- else if (typeof(T) == typeof(Color))
- EditorPrefs.SetInt(key, (int)ColorUtilities.ToHex((Color)(object)newValue));
-
- field = newValue;
- }
- }
-}
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/GlobalSettings.cs.meta b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/GlobalSettings.cs.meta
deleted file mode 100644
index de260de..0000000
--- a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/GlobalSettings.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: eff4db1c9252e5247b661dec568df962
-timeCreated: 1494714307
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/ReflectionUtils.cs b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/ReflectionUtils.cs
new file mode 100644
index 0000000..0dd92d1
--- /dev/null
+++ b/Unity_2018_Frozen/Assets/Unity-Technologies/PostProcessing/Editor/Utils/ReflectionUtils.cs
@@ -0,0 +1,124 @@
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Reflection;
+using System.Text;
+
+namespace UnityEditor.PostProcessing
+{
+ public static class ReflectionUtils
+ {
+ static Dictionary, FieldInfo> s_FieldInfoFromPaths = new Dictionary, FieldInfo>();
+
+ public static FieldInfo GetFieldInfoFromPath(object source, string path)
+ {
+ FieldInfo field = null;
+ var kvp = new KeyValuePair