From bb07f2ac91f3a1049f99b21e22829a3a7b104d33 Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Thu, 27 Feb 2020 21:19:52 +0200
Subject: [PATCH 01/39] README update (added forum link)
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 15725b4..7e8c121 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,8 @@ Npm | [![Npm release](https://img.shields.io/npm/v/com.unityfx.outline.svg)](htt
**Requires Unity 2017 or higher.**
**Compatible with [Unity Post-processing Stack v2](https://github.com/Unity-Technologies/PostProcessing/tree/v2).**
+**Please ask any questions and leave feedback at the [Unity forums](https://forum.unity.com/threads/screen-space-outline-effect-for-unity-free.836908/).**
+
## Synopsis
![Outline demo](Docs/OutlineSamples.png "Outline demo")
![Outline demo](Docs/MotusOutline.png "Outline demo")
@@ -177,7 +179,7 @@ The project was initially created to help author with his [Unity3d](https://unit
## Documentation
Please see the links below for extended information on the product:
-- [Unity forums](https://forum.unity.com/threads/TODO/).
+- [Unity forums](https://forum.unity.com/threads/screen-space-outline-effect-for-unity-free.836908/).
- [CHANGELOG](CHANGELOG.md).
- [SUPPORT](.github/SUPPORT.md).
From f57ca80833bdc8cfda1b3f0c8f3aabf40e26c7fc Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Wed, 18 Mar 2020 11:01:47 +0200
Subject: [PATCH 02/39] Removed unused packages and upgraded post-processing to
v2.3.0
---
Packages/manifest.json | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/Packages/manifest.json b/Packages/manifest.json
index 2fb6ccc..ca7d94d 100644
--- a/Packages/manifest.json
+++ b/Packages/manifest.json
@@ -1,12 +1,7 @@
{
"dependencies": {
- "com.unity.ads": "2.0.8",
- "com.unity.analytics": "3.2.2",
- "com.unity.collab-proxy": "1.2.15",
"com.unity.package-manager-ui": "2.0.8",
- "com.unity.postprocessing": "2.2.2",
- "com.unity.purchasing": "2.0.3",
- "com.unity.textmeshpro": "1.4.1",
+ "com.unity.postprocessing": "2.3.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
From 62935e94e998c21bc6b7cfb05c53f3fac6443bed Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Wed, 18 Mar 2020 11:04:46 +0200
Subject: [PATCH 03/39] Fixed compiler warning
---
.../UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs b/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
index b8cbd52..e7ef71d 100644
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
+++ b/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
@@ -11,9 +11,13 @@ namespace UnityFx.Outline.PostProcessing
[PostProcess(typeof(OutlineEffectRenderer), PostProcessEvent.BeforeStack, "UnityFx/Outline", false)]
public sealed class Outline : PostProcessEffectSettings
{
+#pragma warning disable 0649
+
[SerializeField]
private OutlineResources _defaultResources;
+#pragma warning restore 0649
+
[Serializable]
public class OutlineResourcesParameter : ParameterOverride
{
From 985d1ab17ef12d508793a32c2aa88fffcd5b8b25 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Wed, 18 Mar 2020 11:16:42 +0200
Subject: [PATCH 04/39] Added DepthTestEnabled outline settings (interface
only)
---
.../Editor/Scripts/OutlineEditorUtility.cs | 8 +++++++
.../Runtime/Scripts/IOutlineSettings.cs | 5 +++++
.../Runtime/Scripts/OutlineBehaviour.cs | 15 +++++++++++++
.../Runtime/Scripts/OutlineLayer.cs | 13 +++++++++++
.../Runtime/Scripts/OutlineSettings.cs | 16 ++++++++++++++
.../Scripts/OutlineSettingsInstance.cs | 22 +++++++++++++++++++
6 files changed, 79 insertions(+)
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
index ff0934c..81dd745 100644
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
+++ b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
@@ -93,6 +93,14 @@ public static void Render(IOutlineSettings settings, UnityEngine.Object undoCont
Undo.RecordObject(undoContext, "Blur");
settings.OutlineMode = blurred ? OutlineMode.Blurred : OutlineMode.Solid;
}
+
+ var depthTestEnabled = EditorGUILayout.Toggle("Depth Test", settings.DepthTestEnabled);
+
+ if (depthTestEnabled != settings.DepthTestEnabled)
+ {
+ Undo.RecordObject(undoContext, "Depth Test");
+ settings.DepthTestEnabled = depthTestEnabled;
+ }
}
public static void RenderPreview(OutlineLayer layer, int layerIndex, bool showObjects)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
index cef4b6c..138be37 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
@@ -36,5 +36,10 @@ public interface IOutlineSettings : IEquatable
///
///
OutlineMode OutlineMode { get; set; }
+
+ ///
+ /// Gets or sets a value indicating whether depth-testing is enabled.
+ ///
+ bool DepthTestEnabled { get; set; }
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index 9c6249f..69d38eb 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -335,6 +335,21 @@ public OutlineMode OutlineMode
}
}
+ ///
+ public bool DepthTestEnabled
+ {
+ get
+ {
+ CreateSettingsIfNeeded();
+ return _outlineSettings.DepthTestEnabled;
+ }
+ set
+ {
+ CreateSettingsIfNeeded();
+ _outlineSettings.DepthTestEnabled = value;
+ }
+ }
+
#endregion
#region IEquatable
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
index a31b3dd..c0530d0 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
@@ -351,6 +351,19 @@ public OutlineMode OutlineMode
}
}
+ ///
+ public bool DepthTestEnabled
+ {
+ get
+ {
+ return _settings.DepthTestEnabled;
+ }
+ set
+ {
+ _settings.DepthTestEnabled = value;
+ }
+ }
+
#endregion
#region ICollection
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
index be81f4a..fe6d411 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
@@ -23,6 +23,8 @@ public sealed class OutlineSettings : ScriptableObject, IOutlineSettings
private float _outlineIntensity = 2;
[SerializeField, HideInInspector]
private OutlineMode _outlineMode;
+ [SerializeField, HideInInspector]
+ private bool _depthTestEnabled;
#endregion
@@ -38,6 +40,7 @@ public static bool Equals(IOutlineSettings lhs, IOutlineSettings rhs)
return lhs.OutlineColor == rhs.OutlineColor &&
lhs.OutlineWidth == rhs.OutlineWidth &&
lhs.OutlineMode == rhs.OutlineMode &&
+ lhs.DepthTestEnabled == rhs.DepthTestEnabled &&
Mathf.Approximately(lhs.OutlineIntensity, rhs.OutlineIntensity);
}
@@ -97,6 +100,19 @@ public OutlineMode OutlineMode
}
}
+ ///
+ public bool DepthTestEnabled
+ {
+ get
+ {
+ return _depthTestEnabled;
+ }
+ set
+ {
+ _depthTestEnabled = value;
+ }
+ }
+
#endregion
#region IEquatable
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
index b581145..73c460b 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
@@ -25,6 +25,8 @@ internal class OutlineSettingsInstance : IOutlineSettingsEx, IChangeTracking
private float _outlineIntensity = 2;
[SerializeField, HideInInspector]
private OutlineMode _outlineMode;
+ [SerializeField, HideInInspector]
+ private bool _depthTestEnabled;
#pragma warning restore 0649
@@ -101,6 +103,7 @@ public OutlineSettings OutlineSettings
_outlineWidth = _outlineSettings.OutlineWidth;
_outlineIntensity = _outlineSettings.OutlineIntensity;
_outlineMode = _outlineSettings.OutlineMode;
+ _depthTestEnabled = _outlineSettings.DepthTestEnabled;
_changed = true;
}
}
@@ -191,6 +194,25 @@ public OutlineMode OutlineMode
}
}
+ ///
+ public bool DepthTestEnabled
+ {
+ get
+ {
+ return _depthTestEnabled;
+ }
+ set
+ {
+ ThrowIfSettingsAssigned();
+
+ if (_depthTestEnabled != value)
+ {
+ _depthTestEnabled = value;
+ _changed = true;
+ }
+ }
+ }
+
#endregion
#region IChangeTracking
From 58aad7a97d6eadb6819d2e3c28f5803df9bc7e12 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Wed, 18 Mar 2020 16:31:40 +0200
Subject: [PATCH 05/39] Pilot version of depth testing implemented (#1)
---
Assets/Examples/SimplePerCamera/Outline.unity | 155 +++++++++++-------
.../SimplePerObject/TestOutlineSettings.asset | 1 +
.../Runtime/Scripts/OutlineEffect.cs | 1 +
.../Runtime/Scripts/OutlineRenderer.cs | 39 +++--
.../Scripts/OutlineSettingsInstance.cs | 4 +-
.../Runtime/Shaders/OutlineRenderColor.shader | 2 +-
6 files changed, 128 insertions(+), 74 deletions(-)
diff --git a/Assets/Examples/SimplePerCamera/Outline.unity b/Assets/Examples/SimplePerCamera/Outline.unity
index 63a292e..c172ec7 100644
--- a/Assets/Examples/SimplePerCamera/Outline.unity
+++ b/Assets/Examples/SimplePerCamera/Outline.unity
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
- serializedVersion: 8
+ serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
@@ -39,6 +39,7 @@ RenderSettings:
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
+ m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
@@ -49,16 +50,14 @@ LightmapSettings:
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
- m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
- serializedVersion: 9
+ serializedVersion: 10
m_Resolution: 2
m_BakeResolution: 40
- m_TextureWidth: 1024
- m_TextureHeight: 1024
+ m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
@@ -116,9 +115,10 @@ NavMeshSettings:
--- !u!1 &167171210
GameObject:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
m_Component:
- component: {fileID: 167171212}
- component: {fileID: 167171211}
@@ -132,8 +132,9 @@ GameObject:
--- !u!108 &167171211
Light:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 167171210}
m_Enabled: 1
serializedVersion: 8
@@ -159,6 +160,7 @@ Light:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
+ m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
@@ -168,8 +170,9 @@ Light:
--- !u!4 &167171212
Transform:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 167171210}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
@@ -181,9 +184,10 @@ Transform:
--- !u!1 &692811812
GameObject:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
m_Component:
- component: {fileID: 692811816}
- component: {fileID: 692811815}
@@ -199,13 +203,19 @@ GameObject:
--- !u!20 &692811815
Camera:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 692811812}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
+ m_projectionMatrixMode: 1
+ m_SensorSize: {x: 36, y: 24}
+ m_LensShift: {x: 0, y: 0}
+ m_GateFitMode: 2
+ m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@@ -235,8 +245,9 @@ Camera:
--- !u!4 &692811816
Transform:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 692811812}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
@@ -251,8 +262,9 @@ Transform:
--- !u!114 &692811817
MonoBehaviour:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 692811812}
m_Enabled: 1
m_EditorHideFlags: 0
@@ -265,8 +277,9 @@ MonoBehaviour:
--- !u!114 &692811818
MonoBehaviour:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 692811812}
m_Enabled: 1
m_EditorHideFlags: 0
@@ -275,12 +288,14 @@ MonoBehaviour:
m_EditorClassIdentifier:
_outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
_outlineLayers: {fileID: 11400000, guid: 3a6c3b3c5f6e3ad4ab8e09fc219865bd, type: 2}
+ _cameraEvent: 18
--- !u!1 &748173439
GameObject:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
m_Component:
- component: {fileID: 748173443}
- component: {fileID: 748173442}
@@ -296,8 +311,9 @@ GameObject:
--- !u!23 &748173440
MeshRenderer:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748173439}
m_Enabled: 1
m_CastShadows: 1
@@ -306,6 +322,8 @@ MeshRenderer:
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
@@ -330,8 +348,9 @@ MeshRenderer:
--- !u!65 &748173441
BoxCollider:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748173439}
m_Material: {fileID: 0}
m_IsTrigger: 0
@@ -342,18 +361,20 @@ BoxCollider:
--- !u!33 &748173442
MeshFilter:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748173439}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &748173443
Transform:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748173439}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: -1.51, y: 0, z: 4}
+ m_LocalPosition: {x: -1, y: 0, z: 5.58}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 692811816}
@@ -362,9 +383,10 @@ Transform:
--- !u!1 &1579373802
GameObject:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
m_Component:
- component: {fileID: 1579373806}
- component: {fileID: 1579373805}
@@ -380,8 +402,9 @@ GameObject:
--- !u!23 &1579373803
MeshRenderer:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1579373802}
m_Enabled: 1
m_CastShadows: 1
@@ -390,6 +413,8 @@ MeshRenderer:
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
@@ -414,8 +439,9 @@ MeshRenderer:
--- !u!135 &1579373804
SphereCollider:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1579373802}
m_Material: {fileID: 0}
m_IsTrigger: 0
@@ -426,15 +452,17 @@ SphereCollider:
--- !u!33 &1579373805
MeshFilter:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1579373802}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1579373806
Transform:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1579373802}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 4}
@@ -446,9 +474,10 @@ Transform:
--- !u!1 &1789341920
GameObject:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
m_Component:
- component: {fileID: 1789341921}
- component: {fileID: 1789341925}
@@ -465,8 +494,9 @@ GameObject:
--- !u!4 &1789341921
Transform:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1789341920}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.5, y: 0, z: 4}
@@ -478,8 +508,9 @@ Transform:
--- !u!114 &1789341922
MonoBehaviour:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1789341920}
m_Enabled: 1
m_EditorHideFlags: 0
@@ -493,11 +524,13 @@ MonoBehaviour:
_outlineWidth: 15
_outlineIntensity: 2
_outlineMode: 1
+ _depthTestEnabled: 0
--- !u!23 &1789341923
MeshRenderer:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1789341920}
m_Enabled: 1
m_CastShadows: 1
@@ -506,6 +539,8 @@ MeshRenderer:
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
@@ -530,8 +565,9 @@ MeshRenderer:
--- !u!136 &1789341924
CapsuleCollider:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1789341920}
m_Material: {fileID: 0}
m_IsTrigger: 0
@@ -543,7 +579,8 @@ CapsuleCollider:
--- !u!33 &1789341925
MeshFilter:
m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1789341920}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
diff --git a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset b/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
index d94ff6a..fdd954a 100644
--- a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
+++ b/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
@@ -16,3 +16,4 @@ MonoBehaviour:
_outlineWidth: 5
_outlineIntensity: 2
_outlineMode: 0
+ _depthTestEnabled: 1
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index cab15bf..cbe3ca9 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -192,6 +192,7 @@ private void OnEnable()
#endif
camera.AddCommandBuffer(_cameraEvent, _commandBuffer);
+ camera.depthTextureMode |= DepthTextureMode.Depth;
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
index 2d33e1b..5293a43 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
@@ -59,7 +59,7 @@ namespace UnityFx.Outline
/// }
///
///
- public struct OutlineRenderer : IDisposable
+ public readonly struct OutlineRenderer : IDisposable
{
#region data
@@ -207,7 +207,7 @@ public void Render(IEnumerable renderers, OutlineResources resources,
}
Init(resources, settings);
- RenderObject(renderers, resources.RenderMaterial);
+ RenderObject(renderers, settings, resources.RenderMaterial);
RenderHPass(resources, settings);
RenderVPassBlend(resources, settings);
}
@@ -237,7 +237,7 @@ public void Render(Renderer renderer, OutlineResources resources, IOutlineSettin
}
Init(resources, settings);
- RenderObject(renderer, resources.RenderMaterial);
+ RenderObject(renderer, settings, resources.RenderMaterial);
RenderHPass(resources, settings);
RenderVPassBlend(resources, settings);
}
@@ -302,14 +302,32 @@ private void Init(OutlineResources resources, IOutlineSettings settings)
_commandBuffer.SetGlobalFloatArray(resources.GaussSamplesId, resources.GetGaussSamples(settings.OutlineWidth));
}
- private void RenderObject(IEnumerable renderers, Material mat)
+ private void RenderObjectClear(bool depthTestEnabled)
{
+ if (depthTestEnabled)
+ {
+ // NOTE: Use the camera depth buffer when rendering the mask. Shader only reads from the depth buffer (ZWrite Off).
+#if UNITY_2018_2_OR_NEWER
+ _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, BuiltinRenderTextureType.Depth, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare);
+#else
+ _commandBuffer.SetRenderTarget(_maskRtId, BuiltinRenderTextureType.Depth);
+#endif
+ }
+ else
+ {
#if UNITY_2018_2_OR_NEWER
- _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
+ _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
#else
- _commandBuffer.SetRenderTarget(_maskRtId);
+ _commandBuffer.SetRenderTarget(_maskRtId);
#endif
+ }
+
_commandBuffer.ClearRenderTarget(false, true, Color.clear);
+ }
+
+ private void RenderObject(IEnumerable renderers, IOutlineSettings settings, Material mat)
+ {
+ RenderObjectClear(settings.DepthTestEnabled);
foreach (var r in renderers)
{
@@ -323,14 +341,9 @@ private void RenderObject(IEnumerable renderers, Material mat)
}
}
- private void RenderObject(Renderer renderer, Material mat)
+ private void RenderObject(Renderer renderer, IOutlineSettings settings, Material mat)
{
-#if UNITY_2018_2_OR_NEWER
- _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
-#else
- _commandBuffer.SetRenderTarget(_maskRtId);
-#endif
- _commandBuffer.ClearRenderTarget(false, true, Color.clear);
+ RenderObjectClear(settings.DepthTestEnabled);
if (renderer && renderer.gameObject.activeInHierarchy && renderer.enabled)
{
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
index 73c460b..375515c 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
@@ -70,12 +70,14 @@ internal void UpdateChanged()
if (_outlineColor != _outlineSettings.OutlineColor ||
_outlineWidth != _outlineSettings.OutlineWidth ||
_outlineIntensity != _outlineSettings.OutlineIntensity ||
- _outlineMode != _outlineSettings.OutlineMode)
+ _outlineMode != _outlineSettings.OutlineMode ||
+ _depthTestEnabled != _outlineSettings.DepthTestEnabled)
{
_outlineColor = _outlineSettings.OutlineColor;
_outlineWidth = _outlineSettings.OutlineWidth;
_outlineIntensity = _outlineSettings.OutlineIntensity;
_outlineMode = _outlineSettings.OutlineMode;
+ _depthTestEnabled = _outlineSettings.DepthTestEnabled;
_changed = true;
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader b/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
index ab3f9a6..bf53276 100644
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
+++ b/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
@@ -9,7 +9,7 @@ Shader "UnityFx/Outline/RenderColor"
{
Cull Off
ZWrite Off
- ZTest Always
+ ZTest LEqual
Lighting Off
Pass
From 1f6550fd885aca6dbb16badf0be935bf836715e4 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Wed, 18 Mar 2020 16:36:37 +0200
Subject: [PATCH 06/39] Removed unnecessary camera requirement to render depth
texture
---
Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index cbe3ca9..cab15bf 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -192,7 +192,6 @@ private void OnEnable()
#endif
camera.AddCommandBuffer(_cameraEvent, _commandBuffer);
- camera.depthTextureMode |= DepthTextureMode.Depth;
}
}
From 3e6304d6c4c18a278b0a34db38fb8ec5ea4d31a5 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 26 Mar 2020 15:13:22 +0200
Subject: [PATCH 07/39] Changed IOutlineSettings to use OutlineRenderFlags
value, removed DepthTestEnabled property (#1)
---
.../Editor/Scripts/OutlineEditorUtility.cs | 32 +++++++++++++----
.../Runtime/Scripts/IOutlineSettings.cs | 20 +++++------
.../Runtime/Scripts/OutlineBehaviour.cs | 21 ++----------
.../Runtime/Scripts/OutlineLayer.cs | 19 ++---------
.../{OutlineMode.cs => OutlineRenderFlags.cs} | 14 +++++---
...ode.cs.meta => OutlineRenderFlags.cs.meta} | 0
.../Runtime/Scripts/OutlineRenderer.cs | 10 +++---
.../Runtime/Scripts/OutlineSettings.cs | 22 ++----------
.../Scripts/OutlineSettingsInstance.cs | 34 +++----------------
.../Helpers/IOutlineSettingsExTests.cs | 2 +-
.../Scripts/Helpers/IOutlineSettingsTests.cs | 12 +++----
11 files changed, 71 insertions(+), 115 deletions(-)
rename Packages/UnityFx.Outline/Runtime/Scripts/{OutlineMode.cs => OutlineRenderFlags.cs} (56%)
rename Packages/UnityFx.Outline/Runtime/Scripts/{OutlineMode.cs.meta => OutlineRenderFlags.cs.meta} (100%)
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
index 81dd745..3f82a55 100644
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
+++ b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
@@ -71,7 +71,8 @@ public static void Render(IOutlineSettings settings, UnityEngine.Object undoCont
settings.OutlineWidth = width;
}
- var blurred = EditorGUILayout.Toggle("Blurred", settings.OutlineMode == OutlineMode.Blurred);
+ var prevBlurred = (settings.OutlineRenderMode & OutlineRenderFlags.Blurred) != 0;
+ var blurred = EditorGUILayout.Toggle("Blurred", prevBlurred);
if (blurred)
{
@@ -88,18 +89,35 @@ public static void Render(IOutlineSettings settings, UnityEngine.Object undoCont
EditorGUI.indentLevel -= 1;
}
- if (blurred != (settings.OutlineMode == OutlineMode.Blurred))
+ if (blurred != prevBlurred)
{
Undo.RecordObject(undoContext, "Blur");
- settings.OutlineMode = blurred ? OutlineMode.Blurred : OutlineMode.Solid;
+
+ if (blurred)
+ {
+ settings.OutlineRenderMode |= OutlineRenderFlags.Blurred;
+ }
+ else
+ {
+ settings.OutlineRenderMode &= ~OutlineRenderFlags.Blurred;
+ }
}
- var depthTestEnabled = EditorGUILayout.Toggle("Depth Test", settings.DepthTestEnabled);
+ var prevDepthTestEnabled = (settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0;
+ var depthTestEnabled = EditorGUILayout.Toggle("Depth Test", prevDepthTestEnabled);
- if (depthTestEnabled != settings.DepthTestEnabled)
+ if (depthTestEnabled != prevDepthTestEnabled)
{
Undo.RecordObject(undoContext, "Depth Test");
- settings.DepthTestEnabled = depthTestEnabled;
+
+ if (depthTestEnabled)
+ {
+ settings.OutlineRenderMode |= OutlineRenderFlags.EnableDepthTesting;
+ }
+ else
+ {
+ settings.OutlineRenderMode &= ~OutlineRenderFlags.EnableDepthTesting;
+ }
}
}
@@ -116,7 +134,7 @@ public static void RenderPreview(OutlineLayer layer, int layerIndex, bool showOb
if (layer.Enabled)
{
- EditorGUILayout.LabelField(layer.OutlineMode == OutlineMode.Solid ? layer.OutlineMode.ToString() : string.Format("Blurred ({0})", layer.OutlineIntensity), GUILayout.MaxWidth(70));
+ EditorGUILayout.LabelField(layer.OutlineRenderMode == OutlineRenderFlags.Solid ? layer.OutlineRenderMode.ToString() : string.Format("Blurred ({0})", layer.OutlineIntensity), GUILayout.MaxWidth(70));
EditorGUILayout.IntField(layer.OutlineWidth, GUILayout.MaxWidth(100));
EditorGUILayout.ColorField(layer.OutlineColor, GUILayout.MinWidth(100));
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
index 138be37..c822837 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
@@ -7,7 +7,7 @@
namespace UnityFx.Outline
{
///
- /// Defines outline settings.
+ /// Generic outline settings.
///
public interface IOutlineSettings : IEquatable
{
@@ -15,31 +15,31 @@ public interface IOutlineSettings : IEquatable
/// Gets or sets outline color.
///
///
- ///
+ ///
Color OutlineColor { get; set; }
///
/// Gets or sets outline width in pixels. Allowed range is [, ].
///
///
- ///
+ ///
int OutlineWidth { get; set; }
///
/// Gets or sets outline intensity value. Allowed range is [, ].
+ /// This is used for blurred oulines only (i.e. is set to ).
///
+ ///
+ ///
+ ///
float OutlineIntensity { get; set; }
///
- /// Gets or sets outline mode.
+ /// Gets or sets outline render mode.
///
///
///
- OutlineMode OutlineMode { get; set; }
-
- ///
- /// Gets or sets a value indicating whether depth-testing is enabled.
- ///
- bool DepthTestEnabled { get; set; }
+ ///
+ OutlineRenderFlags OutlineRenderMode { get; set; }
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index 69d38eb..f40c17f 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -321,32 +321,17 @@ public float OutlineIntensity
}
///
- public OutlineMode OutlineMode
+ public OutlineRenderFlags OutlineRenderMode
{
get
{
CreateSettingsIfNeeded();
- return _outlineSettings.OutlineMode;
+ return _outlineSettings.OutlineRenderMode;
}
set
{
CreateSettingsIfNeeded();
- _outlineSettings.OutlineMode = value;
- }
- }
-
- ///
- public bool DepthTestEnabled
- {
- get
- {
- CreateSettingsIfNeeded();
- return _outlineSettings.DepthTestEnabled;
- }
- set
- {
- CreateSettingsIfNeeded();
- _outlineSettings.DepthTestEnabled = value;
+ _outlineSettings.OutlineRenderMode = value;
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
index c0530d0..caf4959 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
@@ -339,28 +339,15 @@ public float OutlineIntensity
}
///
- public OutlineMode OutlineMode
+ public OutlineRenderFlags OutlineRenderMode
{
get
{
- return _settings.OutlineMode;
+ return _settings.OutlineRenderMode;
}
set
{
- _settings.OutlineMode = value;
- }
- }
-
- ///
- public bool DepthTestEnabled
- {
- get
- {
- return _settings.DepthTestEnabled;
- }
- set
- {
- _settings.DepthTestEnabled = value;
+ _settings.OutlineRenderMode = value;
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineMode.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
similarity index 56%
rename from Packages/UnityFx.Outline/Runtime/Scripts/OutlineMode.cs
rename to Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
index b628af7..c911c0d 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineMode.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
@@ -6,18 +6,24 @@
namespace UnityFx.Outline
{
///
- /// Enumerates outline modes.
+ /// Enumerates outline render modes.
///
- public enum OutlineMode
+ [Flags]
+ public enum OutlineRenderFlags
{
///
/// Outline frame is a solid line.
///
- Solid,
+ Solid = 0,
///
/// Outline frame is blurred.
///
- Blurred
+ Blurred = 1,
+
+ ///
+ /// Enabled depth testing when rendering object outlines. Only visible parts of objects are outlined.
+ ///
+ EnableDepthTesting = 0x100
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineMode.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
similarity index 100%
rename from Packages/UnityFx.Outline/Runtime/Scripts/OutlineMode.cs.meta
rename to Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
index 5293a43..8cb5a1f 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
@@ -327,7 +327,7 @@ private void RenderObjectClear(bool depthTestEnabled)
private void RenderObject(IEnumerable renderers, IOutlineSettings settings, Material mat)
{
- RenderObjectClear(settings.DepthTestEnabled);
+ RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
foreach (var r in renderers)
{
@@ -343,7 +343,7 @@ private void RenderObject(IEnumerable renderers, IOutlineSettings sett
private void RenderObject(Renderer renderer, IOutlineSettings settings, Material mat)
{
- RenderObjectClear(settings.DepthTestEnabled);
+ RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
if (renderer && renderer.gameObject.activeInHierarchy && renderer.enabled)
{
@@ -382,13 +382,13 @@ private void RenderVPassBlend(OutlineResources resources, IOutlineSettings setti
props.SetFloat(resources.WidthId, settings.OutlineWidth);
props.SetColor(resources.ColorId, settings.OutlineColor);
- if (settings.OutlineMode == OutlineMode.Solid)
+ if ((settings.OutlineRenderMode & OutlineRenderFlags.Blurred) != 0)
{
- props.SetFloat(resources.IntensityId, SolidIntensity);
+ props.SetFloat(resources.IntensityId, settings.OutlineIntensity);
}
else
{
- props.SetFloat(resources.IntensityId, settings.OutlineIntensity);
+ props.SetFloat(resources.IntensityId, SolidIntensity);
}
// Set source texture as _MainTex to match Blit behavior.
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
index fe6d411..2535031 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
@@ -22,9 +22,7 @@ public sealed class OutlineSettings : ScriptableObject, IOutlineSettings
[SerializeField, HideInInspector]
private float _outlineIntensity = 2;
[SerializeField, HideInInspector]
- private OutlineMode _outlineMode;
- [SerializeField, HideInInspector]
- private bool _depthTestEnabled;
+ private OutlineRenderFlags _outlineMode;
#endregion
@@ -39,8 +37,7 @@ public static bool Equals(IOutlineSettings lhs, IOutlineSettings rhs)
return lhs.OutlineColor == rhs.OutlineColor &&
lhs.OutlineWidth == rhs.OutlineWidth &&
- lhs.OutlineMode == rhs.OutlineMode &&
- lhs.DepthTestEnabled == rhs.DepthTestEnabled &&
+ lhs.OutlineRenderMode == rhs.OutlineRenderMode &&
Mathf.Approximately(lhs.OutlineIntensity, rhs.OutlineIntensity);
}
@@ -88,7 +85,7 @@ public float OutlineIntensity
}
///
- public OutlineMode OutlineMode
+ public OutlineRenderFlags OutlineRenderMode
{
get
{
@@ -100,19 +97,6 @@ public OutlineMode OutlineMode
}
}
- ///
- public bool DepthTestEnabled
- {
- get
- {
- return _depthTestEnabled;
- }
- set
- {
- _depthTestEnabled = value;
- }
- }
-
#endregion
#region IEquatable
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
index 375515c..b9fdff7 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
@@ -24,9 +24,7 @@ internal class OutlineSettingsInstance : IOutlineSettingsEx, IChangeTracking
[SerializeField, HideInInspector]
private float _outlineIntensity = 2;
[SerializeField, HideInInspector]
- private OutlineMode _outlineMode;
- [SerializeField, HideInInspector]
- private bool _depthTestEnabled;
+ private OutlineRenderFlags _outlineMode;
#pragma warning restore 0649
@@ -70,14 +68,12 @@ internal void UpdateChanged()
if (_outlineColor != _outlineSettings.OutlineColor ||
_outlineWidth != _outlineSettings.OutlineWidth ||
_outlineIntensity != _outlineSettings.OutlineIntensity ||
- _outlineMode != _outlineSettings.OutlineMode ||
- _depthTestEnabled != _outlineSettings.DepthTestEnabled)
+ _outlineMode != _outlineSettings.OutlineRenderMode)
{
_outlineColor = _outlineSettings.OutlineColor;
_outlineWidth = _outlineSettings.OutlineWidth;
_outlineIntensity = _outlineSettings.OutlineIntensity;
- _outlineMode = _outlineSettings.OutlineMode;
- _depthTestEnabled = _outlineSettings.DepthTestEnabled;
+ _outlineMode = _outlineSettings.OutlineRenderMode;
_changed = true;
}
}
@@ -104,8 +100,7 @@ public OutlineSettings OutlineSettings
_outlineColor = _outlineSettings.OutlineColor;
_outlineWidth = _outlineSettings.OutlineWidth;
_outlineIntensity = _outlineSettings.OutlineIntensity;
- _outlineMode = _outlineSettings.OutlineMode;
- _depthTestEnabled = _outlineSettings.DepthTestEnabled;
+ _outlineMode = _outlineSettings.OutlineRenderMode;
_changed = true;
}
}
@@ -178,7 +173,7 @@ public float OutlineIntensity
}
///
- public OutlineMode OutlineMode
+ public OutlineRenderFlags OutlineRenderMode
{
get
{
@@ -196,25 +191,6 @@ public OutlineMode OutlineMode
}
}
- ///
- public bool DepthTestEnabled
- {
- get
- {
- return _depthTestEnabled;
- }
- set
- {
- ThrowIfSettingsAssigned();
-
- if (_depthTestEnabled != value)
- {
- _depthTestEnabled = value;
- _changed = true;
- }
- }
- }
-
#endregion
#region IChangeTracking
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
index b2b32d1..af05396 100644
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
+++ b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
@@ -86,7 +86,7 @@ public void OutlineSettings_MakesOtherSettersThrow()
Assert.Throws(() => _settings.OutlineColor = Color.blue);
Assert.Throws(() => _settings.OutlineWidth = 12);
- Assert.Throws(() => _settings.OutlineMode = OutlineMode.Blurred);
+ Assert.Throws(() => _settings.OutlineRenderMode = OutlineRenderFlags.Blurred);
Assert.Throws(() => _settings.OutlineIntensity = 17);
}
finally
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
index a93b909..55a2687 100644
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
+++ b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
@@ -108,11 +108,11 @@ public void OutlineWidth_DoesNotSetsChangedOnSameValue()
[Test]
public void OutlineMode_SetsValue()
{
- _settings.OutlineMode = OutlineMode.Blurred;
- Assert.AreEqual(OutlineMode.Blurred, _settings.OutlineMode);
+ _settings.OutlineRenderMode = OutlineRenderFlags.Blurred;
+ Assert.AreEqual(OutlineRenderFlags.Blurred, _settings.OutlineRenderMode);
- _settings.OutlineMode = OutlineMode.Solid;
- Assert.AreEqual(OutlineMode.Solid, _settings.OutlineMode);
+ _settings.OutlineRenderMode = OutlineRenderFlags.Solid;
+ Assert.AreEqual(OutlineRenderFlags.Solid, _settings.OutlineRenderMode);
}
[Test]
@@ -121,7 +121,7 @@ public void OutlineMode_SetsChanged()
if (_changeTracking != null)
{
_changeTracking.AcceptChanges();
- _settings.OutlineMode = OutlineMode.Blurred;
+ _settings.OutlineRenderMode = OutlineRenderFlags.Blurred;
Assert.IsTrue(_changeTracking.IsChanged);
}
@@ -133,7 +133,7 @@ public void OutlineMode_DoesNotSetsChangedOnSameValue()
if (_changeTracking != null)
{
_changeTracking.AcceptChanges();
- _settings.OutlineMode = _settings.OutlineMode;
+ _settings.OutlineRenderMode = _settings.OutlineRenderMode;
Assert.IsFalse(_changeTracking.IsChanged);
}
From 1df1410d54e032a405ab50186ce3096cad30d2ee Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 26 Mar 2020 16:28:55 +0200
Subject: [PATCH 08/39] Get rid of GC allocations during command buffer updates
(#2)
---
.../Scripts/OutlineBehaviour.Renderers.cs | 5 ++
.../Runtime/Scripts/OutlineBehaviour.cs | 2 +-
.../Runtime/Scripts/OutlineLayer.Renderers.cs | 5 ++
.../Runtime/Scripts/OutlineLayer.cs | 2 +-
.../Runtime/Scripts/OutlineRenderer.cs | 83 +++++++++++++++++--
.../Runtime/Scripts/OutlineResources.cs | 18 ++--
6 files changed, 99 insertions(+), 16 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
index 553e553..8b0f627 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
@@ -55,6 +55,11 @@ internal RendererCollection(OutlineBehaviour parent)
_go = parent.gameObject;
}
+ internal List GetList()
+ {
+ return _renderers;
+ }
+
public void Reset()
{
foreach (var r in _renderers)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index f40c17f..bcbcbc9 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -186,7 +186,7 @@ private void Update()
using (var renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget))
{
- renderer.Render(_renderers, _outlineSettings.OutlineResources, _outlineSettings);
+ renderer.Render(_renderers.GetList(), _outlineSettings.OutlineResources, _outlineSettings);
}
_outlineSettings.AcceptChanges();
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs
index 881ce33..bcc32d9 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs
@@ -41,6 +41,11 @@ internal RendererCollection(GameObject parent, int ignoreMask)
Reset(ignoreMask);
}
+ internal List GetList()
+ {
+ return _renderers;
+ }
+
public void Reset(int ignoreLayerMask)
{
_renderers.Clear();
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
index caf4959..6dc03b5 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
@@ -223,7 +223,7 @@ public void Render(OutlineRenderer renderer, OutlineResources resources)
{
if (kvp.Key && kvp.Key.activeInHierarchy)
{
- renderer.Render(kvp.Value, _settings.OutlineResources, _settings);
+ renderer.Render(kvp.Value.GetList(), _settings.OutlineResources, _settings);
}
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
index 8cb5a1f..8686abe 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
@@ -182,6 +182,38 @@ public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src,
}
}
+ ///
+ /// Renders outline around a single object. This version allows enumeration of with no GC allocations.
+ ///
+ /// One or more renderers representing a single object to be outlined.
+ /// Outline resources.
+ /// Outline settings.
+ /// Thrown if any of the arguments is .
+ ///
+ ///
+ public void Render(IList renderers, OutlineResources resources, IOutlineSettings settings)
+ {
+ if (renderers == null)
+ {
+ throw new ArgumentNullException("renderers");
+ }
+
+ if (resources == null)
+ {
+ throw new ArgumentNullException("resources");
+ }
+
+ if (settings == null)
+ {
+ throw new ArgumentNullException("settings");
+ }
+
+ Init(resources, settings);
+ RenderObject(resources, settings, renderers);
+ RenderHPass(resources, settings);
+ RenderVPassBlend(resources, settings);
+ }
+
///
/// Renders outline around a single object.
///
@@ -189,6 +221,8 @@ public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src,
/// Outline resources.
/// Outline settings.
/// Thrown if any of the arguments is .
+ ///
+ ///
public void Render(IEnumerable renderers, OutlineResources resources, IOutlineSettings settings)
{
if (renderers == null)
@@ -207,7 +241,7 @@ public void Render(IEnumerable renderers, OutlineResources resources,
}
Init(resources, settings);
- RenderObject(renderers, settings, resources.RenderMaterial);
+ RenderObject(resources, settings, renderers);
RenderHPass(resources, settings);
RenderVPassBlend(resources, settings);
}
@@ -219,6 +253,8 @@ public void Render(IEnumerable renderers, OutlineResources resources,
/// Outline resources.
/// Outline settings.
/// Thrown if any of the arguments is .
+ ///
+ ///
public void Render(Renderer renderer, OutlineResources resources, IOutlineSettings settings)
{
if (renderer == null)
@@ -237,7 +273,7 @@ public void Render(Renderer renderer, OutlineResources resources, IOutlineSettin
}
Init(resources, settings);
- RenderObject(renderer, settings, resources.RenderMaterial);
+ RenderObject(resources, settings, renderer);
RenderHPass(resources, settings);
RenderVPassBlend(resources, settings);
}
@@ -325,31 +361,62 @@ private void RenderObjectClear(bool depthTestEnabled)
_commandBuffer.ClearRenderTarget(false, true, Color.clear);
}
- private void RenderObject(IEnumerable renderers, IOutlineSettings settings, Material mat)
+ private void RenderObject(OutlineResources resources, IOutlineSettings settings, IList renderers)
{
RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
+ for (var i = 0; i < renderers.Count; ++i)
+ {
+ var r = renderers[i];
+
+ if (r && r.enabled && r.gameObject.activeInHierarchy)
+ {
+ // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
+ // list of materials, cached with the outline resources.
+ r.GetMaterials(resources.TmpMaterials);
+
+ for (var j = 0; j < resources.TmpMaterials.Count; ++j)
+ {
+ _commandBuffer.DrawRenderer(r, resources.RenderMaterial, j);
+ }
+ }
+ }
+ }
+
+ private void RenderObject(OutlineResources resources, IOutlineSettings settings, IEnumerable renderers)
+ {
+ RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
+
+ // NOTE: Calling IEnumerable.GetEnumerator() triggers GC.Alloc.
foreach (var r in renderers)
{
if (r && r.enabled && r.gameObject.activeInHierarchy)
{
- for (var j = 0; j < r.sharedMaterials.Length; ++j)
+ // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
+ // list of materials, cached with the outline resources.
+ r.GetMaterials(resources.TmpMaterials);
+
+ for (var j = 0; j < resources.TmpMaterials.Count; ++j)
{
- _commandBuffer.DrawRenderer(r, mat, j);
+ _commandBuffer.DrawRenderer(r, resources.RenderMaterial, j);
}
}
}
}
- private void RenderObject(Renderer renderer, IOutlineSettings settings, Material mat)
+ private void RenderObject(OutlineResources resources, IOutlineSettings settings, Renderer renderer)
{
RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
if (renderer && renderer.gameObject.activeInHierarchy && renderer.enabled)
{
- for (var i = 0; i < renderer.sharedMaterials.Length; ++i)
+ // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
+ // list of materials, cached with the outline resources.
+ renderer.GetMaterials(resources.TmpMaterials);
+
+ for (var i = 0; i < resources.TmpMaterials.Count; ++i)
{
- _commandBuffer.DrawRenderer(renderer, mat, i);
+ _commandBuffer.DrawRenderer(renderer, resources.RenderMaterial, i);
}
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
index 945e013..88ec434 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
@@ -2,6 +2,7 @@
// See the LICENSE.md file in the project root for more information.
using System;
+using System.Collections.Generic;
using UnityEngine;
namespace UnityFx.Outline
@@ -21,7 +22,7 @@ public sealed class OutlineResources : ScriptableObject
private MaterialPropertyBlock _hPassProperties;
private MaterialPropertyBlock _vPassProperties;
private Mesh _fullscreenTriangleMesh;
- private float[][] _gaussSmples;
+ private float[][] _gaussSamples;
#endregion
@@ -47,6 +48,11 @@ public sealed class OutlineResources : ScriptableObject
///
public readonly int GaussSamplesId = Shader.PropertyToID("_GaussSamples");
+ ///
+ /// Temp materials list. Used by to avoid GC allocations.
+ ///
+ public readonly List TmpMaterials = new List();
+
///
/// Gets or sets a that renders objects outlined with a solid while color.
///
@@ -198,17 +204,17 @@ public bool IsValid
///
public float[] GetGaussSamples(int width)
{
- if (_gaussSmples == null)
+ if (_gaussSamples == null)
{
- _gaussSmples = new float[OutlineRenderer.MaxWidth][];
+ _gaussSamples = new float[OutlineRenderer.MaxWidth][];
}
- if (_gaussSmples[width] == null)
+ if (_gaussSamples[width] == null)
{
- _gaussSmples[width] = OutlineRenderer.GetGaussSamples(width, null);
+ _gaussSamples[width] = OutlineRenderer.GetGaussSamples(width, null);
}
- return _gaussSmples[width];
+ return _gaussSamples[width];
}
///
From c157803b72cb66e7f223f8383057adca36656ac1 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 26 Mar 2020 16:39:00 +0200
Subject: [PATCH 09/39] CHANGELOG update
---
CHANGELOG.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7d442d..74ca888 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
+## [0.8.0] - unreleased
+
+Added depth testing support and performance optimizations.
+
+### Added
+- Added support for depth testing when rendering outlines. When enabled, outlines are only rendered around the visible object parts.
+
+### Fixed
+- Get rid of GC allocatinos during command buffer updates.
+
## [0.7.1] - 2020.01.28
Bugfixes and project layout changes.
From baf43c824e385be49f14518286bdf959b99a21e3 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 26 Mar 2020 16:40:06 +0200
Subject: [PATCH 10/39] Package version updated
---
Assets/Examples/SimplePerObject/TestOutlineSettings.asset | 3 +--
Packages/UnityFx.Outline/package.json | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset b/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
index fdd954a..a32e433 100644
--- a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
+++ b/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
@@ -14,6 +14,5 @@ MonoBehaviour:
m_EditorClassIdentifier:
_outlineColor: {r: 1, g: 0, b: 0, a: 1}
_outlineWidth: 5
- _outlineIntensity: 2
+ _outlineIntensity: 1
_outlineMode: 0
- _depthTestEnabled: 1
diff --git a/Packages/UnityFx.Outline/package.json b/Packages/UnityFx.Outline/package.json
index 1a5ff20..0dfd31d 100644
--- a/Packages/UnityFx.Outline/package.json
+++ b/Packages/UnityFx.Outline/package.json
@@ -1,6 +1,6 @@
{
"name": "com.unityfx.outline",
- "version": "0.7.1",
+ "version": "0.8.0",
"displayName": "Screen-space outline",
"description": "Configurable per-object and per-camera outlines. Both solid and blurred outline modes are supported (Gauss blur). The outlines can be easily customized either through scripts or with Unity editor (both in edit-time or runtime).",
"unity": "2017.2",
From 8bfa5e8ad30f0c4298e1ad540c1ef959aa39e1fd Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Fri, 27 Mar 2020 21:37:38 +0200
Subject: [PATCH 11/39] Misc renderer fixes
---
.../UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
index 8686abe..eeced3e 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
@@ -59,7 +59,7 @@ namespace UnityFx.Outline
/// }
///
///
- public readonly struct OutlineRenderer : IDisposable
+ public struct OutlineRenderer : IDisposable
{
#region data
@@ -373,7 +373,7 @@ private void RenderObject(OutlineResources resources, IOutlineSettings settings,
{
// NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
// list of materials, cached with the outline resources.
- r.GetMaterials(resources.TmpMaterials);
+ r.GetSharedMaterials(resources.TmpMaterials);
for (var j = 0; j < resources.TmpMaterials.Count; ++j)
{
@@ -394,7 +394,7 @@ private void RenderObject(OutlineResources resources, IOutlineSettings settings,
{
// NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
// list of materials, cached with the outline resources.
- r.GetMaterials(resources.TmpMaterials);
+ r.GetSharedMaterials(resources.TmpMaterials);
for (var j = 0; j < resources.TmpMaterials.Count; ++j)
{
@@ -412,7 +412,7 @@ private void RenderObject(OutlineResources resources, IOutlineSettings settings,
{
// NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
// list of materials, cached with the outline resources.
- renderer.GetMaterials(resources.TmpMaterials);
+ renderer.GetSharedMaterials(resources.TmpMaterials);
for (var i = 0; i < resources.TmpMaterials.Count; ++i)
{
From 190501df51cd072c3aa434daec7c9c839a9a4b77 Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Fri, 27 Mar 2020 22:10:01 +0200
Subject: [PATCH 12/39] Removed change tracking support (#2)
---
.../Runtime/Scripts/OutlineBehaviour.cs | 31 +---
.../Runtime/Scripts/OutlineEffect.cs | 52 +-----
.../Runtime/Scripts/OutlineLayer.cs | 54 +-----
.../Runtime/Scripts/OutlineLayerCollection.cs | 57 +------
.../Scripts/OutlineSettingsInstance.cs | 133 ++++-----------
.../Scripts/OutlineLayerCollectionTests.cs | 155 ------------------
.../Tests/Editor/Scripts/OutlineLayerTests.cs | 116 -------------
7 files changed, 48 insertions(+), 550 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index bcbcbc9..76c1bf3 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -81,7 +81,7 @@ public OutlineResources OutlineResources
CreateSettingsIfNeeded();
_outlineResources = value;
- _outlineSettings.SetResources(_outlineResources);
+ _outlineSettings.OutlineResources = _outlineResources;
}
}
}
@@ -109,17 +109,6 @@ public ICollection Cameras
}
}
- ///
- /// Detects changes in nested assets and updates outline if needed. The actual update might not be invoked until the next frame.
- ///
- public void UpdateChanged()
- {
- if (_outlineSettings != null)
- {
- _outlineSettings.UpdateChanged();
- }
- }
-
#endregion
#region MonoBehaviour
@@ -129,14 +118,14 @@ private void Awake()
CreateRenderersIfNeeded();
CreateSettingsIfNeeded();
- _outlineSettings.SetResources(_outlineResources);
+ _outlineSettings.OutlineResources = _outlineResources;
}
private void OnDestroy()
{
if (_outlineSettings != null)
{
- _outlineSettings.SetResources(null);
+ _outlineSettings.OutlineResources = null;
}
}
@@ -174,13 +163,7 @@ private void Update()
_cameraMapUpdateTimer = 0;
}
-#if UNITY_EDITOR
-
- UpdateChanged();
-
-#endif
-
- if (_outlineResources != null && _renderers != null && (_outlineSettings.IsChanged || _commandBuffer.sizeInBytes == 0))
+ if (_outlineResources != null && _renderers != null)
{
_commandBuffer.Clear();
@@ -189,8 +172,6 @@ private void Update()
renderer.Render(_renderers.GetList(), _outlineSettings.OutlineResources, _outlineSettings);
}
- _outlineSettings.AcceptChanges();
-
#if UNITY_EDITOR
_commandBufferUpdateCounter++;
@@ -224,14 +205,14 @@ private void OnValidate()
CreateCommandBufferIfNeeded();
CreateSettingsIfNeeded();
- _outlineSettings.SetResources(_outlineResources);
+ _outlineSettings.OutlineResources = _outlineResources;
}
private void Reset()
{
if (_outlineSettings != null)
{
- _outlineSettings.SetResources(_outlineResources);
+ _outlineSettings.OutlineResources = _outlineResources;
}
if (_renderers != null)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index cab15bf..d08cedc 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -29,7 +29,6 @@ public sealed partial class OutlineEffect : MonoBehaviour
private CameraEvent _cameraEvent = OutlineRenderer.RenderEvent;
private CommandBuffer _commandBuffer;
- private bool _changed;
#if UNITY_EDITOR
@@ -73,11 +72,7 @@ public OutlineResources OutlineResources
throw new ArgumentNullException("OutlineResources");
}
- if (_outlineResources != value)
- {
- _outlineResources = value;
- _changed = true;
- }
+ _outlineResources = value;
}
}
@@ -100,11 +95,7 @@ public OutlineLayerCollection OutlineLayers
throw new ArgumentNullException("OutlineLayers");
}
- if (_outlineLayers != value)
- {
- _outlineLayers = value;
- _changed = true;
- }
+ _outlineLayers = value;
}
}
@@ -149,18 +140,6 @@ public void ShareLayersWith(OutlineEffect other)
CreateLayersIfNeeded();
other._outlineLayers = _outlineLayers;
- other._changed = true;
- }
- }
-
- ///
- /// Detects changes in nested assets and updates outline if needed. The actual update might not be invoked until the next frame.
- ///
- public void UpdateChanged()
- {
- if (_outlineLayers)
- {
- _outlineLayers.UpdateChanged();
}
}
@@ -183,8 +162,6 @@ private void OnEnable()
name = string.Format("{0} - {1}", GetType().Name, name)
};
- _changed = true;
-
#if UNITY_EDITOR
_commandBufferUpdateCounter = 0;
@@ -213,24 +190,9 @@ private void OnDisable()
private void Update()
{
-#if UNITY_EDITOR
-
- UpdateChanged();
-
-#endif
-
- if (_outlineLayers && (_changed || _outlineLayers.IsChanged))
- {
- FillCommandBuffer();
- }
- }
-
- private void LateUpdate()
- {
- // TODO: Find a way to do this once per OutlineLayerCollection instance.
if (_outlineLayers)
{
- _outlineLayers.AcceptChanges();
+ FillCommandBuffer();
}
}
@@ -245,15 +207,9 @@ private void OnDestroy()
#if UNITY_EDITOR
- private void OnValidate()
- {
- _changed = true;
- }
-
private void Reset()
{
_outlineLayers = null;
- _changed = true;
}
#endif
@@ -274,8 +230,6 @@ private void FillCommandBuffer()
}
}
- _changed = false;
-
#if UNITY_EDITOR
_commandBufferUpdateCounter++;
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
index 6dc03b5..c5c3147 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Text;
using UnityEngine;
@@ -17,7 +16,7 @@ namespace UnityFx.Outline
///
///
[Serializable]
- public sealed partial class OutlineLayer : ICollection, IOutlineSettingsEx, IChangeTracking
+ public sealed partial class OutlineLayer : ICollection, IOutlineSettingsEx
{
#region data
@@ -32,7 +31,6 @@ public sealed partial class OutlineLayer : ICollection, IOutlineSett
private OutlineLayerCollection _parentCollection;
private Dictionary _outlineObjects = new Dictionary();
- private bool _changed;
#endregion
@@ -66,11 +64,7 @@ public bool Enabled
}
set
{
- if (_enabled != value)
- {
- _enabled = value;
- _changed = true;
- }
+ _enabled = value;
}
}
@@ -95,7 +89,6 @@ public int Priority
}
_zOrder = value;
- _changed = true;
}
}
}
@@ -174,7 +167,6 @@ public void Add(GameObject go, int ignoreLayerMask)
if (!_outlineObjects.ContainsKey(go))
{
_outlineObjects.Add(go, new RendererCollection(go, ignoreLayerMask));
- _changed = true;
}
}
@@ -217,13 +209,13 @@ public void Render(OutlineRenderer renderer, OutlineResources resources)
{
if (_enabled)
{
- _settings.SetResources(resources);
+ _settings.OutlineResources = resources;
foreach (var kvp in _outlineObjects)
{
if (kvp.Key && kvp.Key.activeInHierarchy)
{
- renderer.Render(kvp.Value.GetList(), _settings.OutlineResources, _settings);
+ renderer.Render(kvp.Value.GetList(), resources, _settings);
}
}
}
@@ -255,15 +247,10 @@ internal OutlineLayerCollection ParentCollection
internal void Reset()
{
- _settings.SetResources(null);
+ _settings.OutlineResources = null;
_outlineObjects.Clear();
}
- internal void UpdateChanged()
- {
- _settings.UpdateChanged();
- }
-
internal void SetCollection(OutlineLayerCollection collection)
{
if (_parentCollection == null || collection == null || _parentCollection == collection)
@@ -382,10 +369,9 @@ public void Add(GameObject go)
///
public bool Remove(GameObject go)
{
- if (go != null && _outlineObjects.Remove(go))
+ if (!ReferenceEquals(go, null))
{
- _changed = true;
- return true;
+ return _outlineObjects.Remove(go);
}
return false;
@@ -405,11 +391,7 @@ public bool Contains(GameObject go)
///
public void Clear()
{
- if (_outlineObjects.Count > 0)
- {
- _outlineObjects.Clear();
- _changed = true;
- }
+ _outlineObjects.Clear();
}
///
@@ -435,26 +417,6 @@ IEnumerator IEnumerable.GetEnumerator()
#endregion
- #region IChangeTracking
-
- ///
- public bool IsChanged
- {
- get
- {
- return _changed || _settings.IsChanged;
- }
- }
-
- ///
- public void AcceptChanges()
- {
- _settings.AcceptChanges();
- _changed = false;
- }
-
- #endregion
-
#region IEquatable
///
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
index 84895ed..d28f982 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using UnityEngine;
namespace UnityFx.Outline
@@ -16,7 +15,7 @@ namespace UnityFx.Outline
///
///
[CreateAssetMenu(fileName = "OutlineLayerCollection", menuName = "UnityFx/Outline/Outline Layer Collection")]
- public sealed class OutlineLayerCollection : ScriptableObject, IList, IChangeTracking
+ public sealed class OutlineLayerCollection : ScriptableObject, IList
{
#region data
@@ -34,7 +33,6 @@ public int Compare(OutlineLayer x, OutlineLayer y)
private List _sortedLayers = new List();
private OutlineLayerComparer _sortComparer = new OutlineLayerComparer();
private bool _orderChanged = true;
- private bool _changed = true;
#endregion
@@ -72,7 +70,6 @@ public void Render(OutlineRenderer renderer, OutlineResources resources)
internal void SetOrderChanged()
{
_orderChanged = true;
- _changed = true;
}
internal void Reset()
@@ -83,14 +80,6 @@ internal void Reset()
}
}
- internal void UpdateChanged()
- {
- foreach (var layer in _layers)
- {
- layer.UpdateChanged();
- }
- }
-
#endregion
#region ScriptableObject
@@ -136,7 +125,6 @@ public OutlineLayer this[int layerIndex]
_layers[layerIndex] = value;
_orderChanged = true;
- _changed = true;
}
}
}
@@ -167,7 +155,6 @@ public void Insert(int index, OutlineLayer layer)
_layers.Insert(index, layer);
_orderChanged = true;
- _changed = true;
}
}
@@ -180,7 +167,6 @@ public void RemoveAt(int index)
_layers.RemoveAt(index);
_orderChanged = true;
- _changed = true;
}
}
@@ -219,9 +205,7 @@ public void Add(OutlineLayer layer)
layer.SetCollection(this);
_layers.Add(layer);
-
_orderChanged = true;
- _changed = true;
}
}
@@ -233,7 +217,6 @@ public bool Remove(OutlineLayer layer)
layer.SetCollection(null);
_sortedLayers.Remove(layer);
- _changed = true;
return true;
}
@@ -253,7 +236,6 @@ public void Clear()
_layers.Clear();
_sortedLayers.Clear();
- _changed = true;
}
}
@@ -291,43 +273,6 @@ IEnumerator IEnumerable.GetEnumerator()
#endregion
- #region IChangeTracking
-
- ///
- public bool IsChanged
- {
- get
- {
- if (_changed)
- {
- return true;
- }
-
- foreach (var layer in _layers)
- {
- if (layer.IsChanged)
- {
- return true;
- }
- }
-
- return false;
- }
- }
-
- ///
- public void AcceptChanges()
- {
- foreach (var layer in _layers)
- {
- layer.AcceptChanges();
- }
-
- _changed = false;
- }
-
- #endregion
-
#region implementation
private void UpdateSortedLayersIfNeeded()
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
index b9fdff7..2a66d69 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
@@ -2,13 +2,12 @@
// See the LICENSE.md file in the project root for more information.
using System;
-using System.ComponentModel;
using UnityEngine;
namespace UnityFx.Outline
{
[Serializable]
- internal class OutlineSettingsInstance : IOutlineSettingsEx, IChangeTracking
+ internal class OutlineSettingsInstance : IOutlineSettingsEx
{
#region data
@@ -29,7 +28,6 @@ internal class OutlineSettingsInstance : IOutlineSettingsEx, IChangeTracking
#pragma warning restore 0649
private OutlineResources _resources;
- private bool _changed = true;
#endregion
@@ -41,6 +39,10 @@ public OutlineResources OutlineResources
{
return _resources;
}
+ set
+ {
+ _resources = value;
+ }
}
internal OutlineSettingsInstance()
@@ -52,33 +54,6 @@ internal OutlineSettingsInstance(OutlineResources resources)
_resources = resources;
}
- internal void SetResources(OutlineResources resources)
- {
- if (resources != _resources)
- {
- _resources = resources;
- _changed = true;
- }
- }
-
- internal void UpdateChanged()
- {
- if (_outlineSettings != null)
- {
- if (_outlineColor != _outlineSettings.OutlineColor ||
- _outlineWidth != _outlineSettings.OutlineWidth ||
- _outlineIntensity != _outlineSettings.OutlineIntensity ||
- _outlineMode != _outlineSettings.OutlineRenderMode)
- {
- _outlineColor = _outlineSettings.OutlineColor;
- _outlineWidth = _outlineSettings.OutlineWidth;
- _outlineIntensity = _outlineSettings.OutlineIntensity;
- _outlineMode = _outlineSettings.OutlineRenderMode;
- _changed = true;
- }
- }
- }
-
#endregion
#region IOutlineSettingsEx
@@ -91,19 +66,7 @@ public OutlineSettings OutlineSettings
}
set
{
- if (_outlineSettings != value)
- {
- _outlineSettings = value;
-
- if (_outlineSettings != null)
- {
- _outlineColor = _outlineSettings.OutlineColor;
- _outlineWidth = _outlineSettings.OutlineWidth;
- _outlineIntensity = _outlineSettings.OutlineIntensity;
- _outlineMode = _outlineSettings.OutlineRenderMode;
- _changed = true;
- }
- }
+ _outlineSettings = value;
}
}
@@ -116,17 +79,16 @@ public Color OutlineColor
{
get
{
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ return _outlineSettings.OutlineColor;
+ }
+
return _outlineColor;
}
set
{
- ThrowIfSettingsAssigned();
-
- if (_outlineColor != value)
- {
- _outlineColor = value;
- _changed = true;
- }
+ _outlineColor = value;
}
}
@@ -135,19 +97,16 @@ public int OutlineWidth
{
get
{
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ return _outlineSettings.OutlineWidth;
+ }
+
return _outlineWidth;
}
set
{
- ThrowIfSettingsAssigned();
-
- value = Mathf.Clamp(value, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
-
- if (_outlineWidth != value)
- {
- _outlineWidth = value;
- _changed = true;
- }
+ _outlineWidth = Mathf.Clamp(value, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
}
}
@@ -156,19 +115,16 @@ public float OutlineIntensity
{
get
{
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ return _outlineSettings.OutlineIntensity;
+ }
+
return _outlineIntensity;
}
set
{
- ThrowIfSettingsAssigned();
-
- value = Mathf.Clamp(value, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
-
- if (_outlineIntensity != value)
- {
- _outlineIntensity = value;
- _changed = true;
- }
+ _outlineIntensity = Mathf.Clamp(value, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
}
}
@@ -177,39 +133,19 @@ public OutlineRenderFlags OutlineRenderMode
{
get
{
- return _outlineMode;
- }
- set
- {
- ThrowIfSettingsAssigned();
-
- if (_outlineMode != value)
+ if (!ReferenceEquals(_outlineSettings, null))
{
- _outlineMode = value;
- _changed = true;
+ return _outlineSettings.OutlineRenderMode;
}
- }
- }
- #endregion
-
- #region IChangeTracking
-
- ///
- public bool IsChanged
- {
- get
+ return _outlineMode;
+ }
+ set
{
- return _changed;
+ _outlineMode = value;
}
}
- ///
- public void AcceptChanges()
- {
- _changed = false;
- }
-
#endregion
#region IEquatable
@@ -222,15 +158,6 @@ public bool Equals(IOutlineSettings other)
#endregion
#region implementation
-
- private void ThrowIfSettingsAssigned()
- {
- if (_outlineSettings)
- {
- throw new InvalidOperationException("The outline parameters cannot be altered when OutlineSettings is set.");
- }
- }
-
#endregion
}
}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
index 8e46e4f..fc19adb 100644
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
+++ b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
@@ -30,7 +30,6 @@ public void Dispose()
[Test]
public void DefaultStateIsValid()
{
- Assert.IsTrue(_layerCollection.IsChanged);
Assert.IsFalse(_layerCollection.IsReadOnly);
Assert.IsEmpty(_layerCollection);
Assert.Zero(_layerCollection.Count);
@@ -59,22 +58,6 @@ public void Add_ThrowsIfLayerBelongsToAnotherCollection()
}
}
- [Test]
- public void Add_DoesNotSetChangedOnError()
- {
- _layerCollection.AcceptChanges();
-
- try
- {
- _layerCollection.Add(null);
- }
- catch
- {
- }
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
[Test]
public void Add_SetsCount()
{
@@ -83,15 +66,6 @@ public void Add_SetsCount()
Assert.AreEqual(1, _layerCollection.Count);
}
- [Test]
- public void Add_SetsChanged()
- {
- _layerCollection.AcceptChanges();
- _layerCollection.Add(new OutlineLayer());
-
- Assert.IsTrue(_layerCollection.IsChanged);
- }
-
[Test]
public void Insert_ThrowsIfArgumentIsNull()
{
@@ -115,22 +89,6 @@ public void Insert_ThrowsIfLayerBelongsToAnotherCollection()
}
}
- [Test]
- public void Insert_DoesNotSetChangedOnError()
- {
- _layerCollection.AcceptChanges();
-
- try
- {
- _layerCollection.Insert(0, null);
- }
- catch
- {
- }
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
[Test]
public void Insert_SetsCount()
{
@@ -139,51 +97,12 @@ public void Insert_SetsCount()
Assert.AreEqual(1, _layerCollection.Count);
}
- [Test]
- public void Insert_SetsChanged()
- {
- _layerCollection.AcceptChanges();
- _layerCollection.Insert(0, new OutlineLayer());
-
- Assert.IsTrue(_layerCollection.IsChanged);
- }
-
[Test]
public void Remove_DoesNotThrowOnNullArgument()
{
Assert.DoesNotThrow(() => _layerCollection.Remove(null));
}
- [Test]
- public void Remove_DoesNotSetChangedOnError()
- {
- _layerCollection.AcceptChanges();
- _layerCollection.Remove(null);
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
- [Test]
- public void Remove_DoesNotSetChangedIfNotfound()
- {
- _layerCollection.AcceptChanges();
- _layerCollection.Remove(new OutlineLayer());
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
- [Test]
- public void Remove_SetsChanged()
- {
- var layer = new OutlineLayer();
-
- _layerCollection.Add(layer);
- _layerCollection.AcceptChanges();
- _layerCollection.Remove(layer);
-
- Assert.IsTrue(_layerCollection.IsChanged);
- }
-
[Test]
public void Remove_SetsCount()
{
@@ -204,47 +123,12 @@ public void Clear_ResetsCount()
Assert.Zero(_layerCollection.Count);
}
- [Test]
- public void Clear_SetsChanged()
- {
- _layerCollection.Add(new OutlineLayer());
- _layerCollection.AcceptChanges();
- _layerCollection.Clear();
-
- Assert.IsTrue(_layerCollection.IsChanged);
- }
-
- [Test]
- public void Clear_DoesNotSetChangedIfEmpty()
- {
- _layerCollection.AcceptChanges();
- _layerCollection.Clear();
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
[Test]
public void Contains_DoesNotThrowIfArgumentIsNull()
{
_layerCollection.Contains(null);
}
- [Test]
- public void Contains_DoesNotSetChangedOnError()
- {
- _layerCollection.AcceptChanges();
-
- try
- {
- _layerCollection.Contains(null);
- }
- catch
- {
- }
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
[Test]
public void Contains_SearchesArgument()
{
@@ -257,45 +141,6 @@ public void Contains_SearchesArgument()
Assert.IsTrue(_layerCollection.Contains(layer));
}
- [Test]
- public void Contains_DoesNotSetChanged()
- {
- var layer = new OutlineLayer();
-
- _layerCollection.AcceptChanges();
- _layerCollection.Contains(layer);
-
- Assert.IsFalse(_layerCollection.IsChanged);
-
- _layerCollection.Add(layer);
- _layerCollection.AcceptChanges();
- _layerCollection.Contains(layer);
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
- [Test]
- public void IsChanged_TracksLayerChanges()
- {
- var layer = new OutlineLayer();
-
- _layerCollection.Add(layer);
- _layerCollection.AcceptChanges();
-
- layer.OutlineWidth = 17;
-
- Assert.IsTrue(_layerCollection.IsChanged);
- }
-
- [Test]
- public void AcceptChanges_ResetsChanged()
- {
- _layerCollection.Add(new OutlineLayer());
- _layerCollection.AcceptChanges();
-
- Assert.IsFalse(_layerCollection.IsChanged);
- }
-
[Test]
public void SortedLayers_IsSortedByPriority()
{
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs
index 58c202e..df639c6 100644
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs
+++ b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs
@@ -30,7 +30,6 @@ public void Dispose()
[Test]
public void DefaultStateIsValid()
{
- Assert.IsTrue(_layer.IsChanged);
Assert.IsFalse(_layer.IsReadOnly);
Assert.IsEmpty(_layer);
Assert.Zero(_layer.Count);
@@ -44,22 +43,6 @@ public void Add_ThrowsIfArgumentIsNull()
Assert.Throws(() => _layer.Add(null));
}
- [Test]
- public void Add_DoesNotSetChangedOnError()
- {
- _layer.AcceptChanges();
-
- try
- {
- _layer.Add(null);
- }
- catch
- {
- }
-
- Assert.IsFalse(_layer.IsChanged);
- }
-
[Test]
public void Add_SetsCount()
{
@@ -68,15 +51,6 @@ public void Add_SetsCount()
Assert.AreEqual(1, _layer.Count);
}
- [Test]
- public void Add_SetsChanged()
- {
- _layer.AcceptChanges();
- _layer.Add(new GameObject());
-
- Assert.IsTrue(_layer.IsChanged);
- }
-
[Test]
public void Add_FiltersRenderesByLayer()
{
@@ -102,36 +76,6 @@ public void Remove_DoesNotThrowOnNullArgument()
Assert.DoesNotThrow(() => _layer.Remove(null));
}
- [Test]
- public void Remove_DoesNotSetChangedOnError()
- {
- _layer.AcceptChanges();
- _layer.Remove(null);
-
- Assert.IsFalse(_layer.IsChanged);
- }
-
- [Test]
- public void Remove_DoesNotSetChangedIfNotfound()
- {
- _layer.AcceptChanges();
- _layer.Remove(new GameObject());
-
- Assert.IsFalse(_layer.IsChanged);
- }
-
- [Test]
- public void Remove_SetsChanged()
- {
- var go = new GameObject();
-
- _layer.Add(go);
- _layer.AcceptChanges();
- _layer.Remove(go);
-
- Assert.IsTrue(_layer.IsChanged);
- }
-
[Test]
public void Remove_SetsCount()
{
@@ -152,47 +96,12 @@ public void Clear_ResetsCount()
Assert.Zero(_layer.Count);
}
- [Test]
- public void Clear_SetsChanged()
- {
- _layer.Add(new GameObject());
- _layer.AcceptChanges();
- _layer.Clear();
-
- Assert.IsTrue(_layer.IsChanged);
- }
-
- [Test]
- public void Clear_DoesNotSetChangedIfEmpty()
- {
- _layer.AcceptChanges();
- _layer.Clear();
-
- Assert.IsFalse(_layer.IsChanged);
- }
-
[Test]
public void Contains_DoesNotThrowIfArgumentIsNull()
{
_layer.Contains(null);
}
- [Test]
- public void Contains_DoesNotSetChangedOnError()
- {
- _layer.AcceptChanges();
-
- try
- {
- _layer.Contains(null);
- }
- catch
- {
- }
-
- Assert.IsFalse(_layer.IsChanged);
- }
-
[Test]
public void Contains_SearchesArgument()
{
@@ -204,30 +113,5 @@ public void Contains_SearchesArgument()
Assert.IsTrue(_layer.Contains(go));
}
-
- [Test]
- public void Contains_DoesNotSetChanged()
- {
- var go = new GameObject();
-
- _layer.AcceptChanges();
- _layer.Contains(go);
-
- Assert.IsFalse(_layer.IsChanged);
-
- _layer.Add(go);
- _layer.AcceptChanges();
- _layer.Contains(go);
-
- Assert.IsFalse(_layer.IsChanged);
- }
-
- [Test]
- public void AcceptChanges_ResetsChanged()
- {
- _layer.AcceptChanges();
-
- Assert.IsFalse(_layer.IsChanged);
- }
}
}
From 56f4f1a2fe756f3f7d9de03cdb0decac6816fa1e Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Fri, 27 Mar 2020 22:27:02 +0200
Subject: [PATCH 13/39] CHANGELOG update
---
CHANGELOG.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74ca888..3b7334f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,10 +8,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/); this proj
Added depth testing support and performance optimizations.
### Added
-- Added support for depth testing when rendering outlines. When enabled, outlines are only rendered around the visible object parts.
+- Added support for depth testing when rendering outlines. When enabled, outlines are only rendered around the visible object parts ([#1](https://github.com/Arvtesh/UnityFx.Outline/issues/1)).
### Fixed
- Get rid of GC allocatinos during command buffer updates.
+- Fixed compiler warning in post-processing compatibility package (0649).
+
+### Removed
+- Removed change tracking support in package entities ([#2](https://github.com/Arvtesh/UnityFx.Outline/issues/2)).
## [0.7.1] - 2020.01.28
From 0244743a5c066a1fbfb63d7f7c2904b712add053 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Mon, 30 Mar 2020 19:27:53 +0300
Subject: [PATCH 14/39] Get rid of per-renderer behavior for Outlinebehaviour +
force depthTextureMode for camera
---
.../Editor/Scripts/OutlineBehaviourEditor.cs | 12 ---
.../Scripts/OutlineBehaviour.Renderers.cs | 81 +------------------
.../Runtime/Scripts/OutlineBehaviour.cs | 76 ++++++-----------
.../Runtime/Scripts/OutlineEffect.cs | 2 +
4 files changed, 31 insertions(+), 140 deletions(-)
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
index 459340c..492498a 100644
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
+++ b/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
@@ -79,18 +79,6 @@ public override void OnInspectorGUI()
EditorGUI.indentLevel -= 1;
EditorGUI.EndDisabledGroup();
}
-
- // 4) Debug info.
- _debugOpened = EditorGUILayout.Foldout(_debugOpened, "Debug", true);
-
- if (_debugOpened)
- {
- EditorGUI.BeginDisabledGroup(true);
- EditorGUI.indentLevel += 1;
- EditorGUILayout.IntField("Command buffer updates", _effect.NumberOfCommandBufferUpdates);
- EditorGUI.indentLevel -= 1;
- EditorGUI.EndDisabledGroup();
- }
}
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
index 8b0f627..a6bec9c 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
@@ -15,32 +15,11 @@ partial class OutlineBehaviour
#region implementation
- [ExecuteInEditMode]
- [DisallowMultipleComponent]
- private class OutlineRendererHelper : MonoBehaviour
- {
- private OutlineBehaviour _parent;
-
- public void SetParent(OutlineBehaviour parent)
- {
- _parent = parent;
- }
-
- private void OnWillRenderObject()
- {
- if (isActiveAndEnabled && _parent)
- {
- _parent.OnWillRenderObject();
- }
- }
- }
-
private sealed class RendererCollection : ICollection
{
#region data
private readonly List _renderers = new List();
- private readonly OutlineBehaviour _parent;
private readonly GameObject _go;
#endregion
@@ -51,7 +30,6 @@ internal RendererCollection(OutlineBehaviour parent)
{
Debug.Assert(parent);
- _parent = parent;
_go = parent.gameObject;
}
@@ -60,20 +38,9 @@ internal List GetList()
return _renderers;
}
- public void Reset()
+ internal void Reset(bool includeInactive)
{
- foreach (var r in _renderers)
- {
- Release(r);
- }
-
- _renderers.Clear();
- _parent.GetComponentsInChildren(true, _renderers);
-
- foreach (var r in _renderers)
- {
- Init(r);
- }
+ _go.GetComponentsInChildren(includeInactive, _renderers);
}
#endregion
@@ -99,29 +66,17 @@ public bool IsReadOnly
public void Add(Renderer renderer)
{
Validate(renderer);
- Init(renderer);
_renderers.Add(renderer);
}
public bool Remove(Renderer renderer)
{
- if (_renderers.Remove(renderer))
- {
- Release(renderer);
- return true;
- }
-
- return false;
+ return _renderers.Remove(renderer);
}
public void Clear()
{
- foreach (var r in _renderers)
- {
- Release(r);
- }
-
_renderers.Clear();
}
@@ -166,34 +121,6 @@ private void Validate(Renderer renderer)
}
}
- private void Init(Renderer r)
- {
- if (r && r.gameObject != _go)
- {
- var c = r.GetComponent();
-
- if (c == null)
- {
- c = r.gameObject.AddComponent();
- }
-
- c.SetParent(_parent);
- }
- }
-
- private void Release(Renderer r)
- {
- if (r)
- {
- var c = r.GetComponent();
-
- if (c)
- {
- DestroyImmediate(c);
- }
- }
- }
-
#endregion
}
@@ -202,7 +129,7 @@ private void CreateRenderersIfNeeded()
if (_renderers == null)
{
_renderers = new RendererCollection(this);
- _renderers.Reset();
+ _renderers.Reset(true);
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index 76c1bf3..6e9c955 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -25,6 +25,8 @@ public sealed partial class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
private OutlineResources _outlineResources;
[SerializeField, HideInInspector]
private OutlineSettingsInstance _outlineSettings;
+ [SerializeField]
+ private bool _updateRenderers;
#pragma warning restore 0649
@@ -34,31 +36,10 @@ public sealed partial class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
private Dictionary _cameraMap = new Dictionary();
private float _cameraMapUpdateTimer;
-#if UNITY_EDITOR
-
- private int _commandBufferUpdateCounter;
-
-#endif
-
#endregion
#region interface
-#if UNITY_EDITOR
-
- ///
- /// Gets number of the command buffer updates since its creation. Only available in editor.
- ///
- public int NumberOfCommandBufferUpdates
- {
- get
- {
- return _commandBufferUpdateCounter;
- }
- }
-
-#endif
-
///
/// Gets or sets resources used by the effect implementation.
///
@@ -132,10 +113,13 @@ private void OnDestroy()
private void OnEnable()
{
CreateCommandBufferIfNeeded();
+ Camera.onPreRender += OnCameraPreRender;
}
private void OnDisable()
{
+ Camera.onPreRender -= OnCameraPreRender;
+
foreach (var kvp in _cameraMap)
{
if (kvp.Key)
@@ -165,34 +149,16 @@ private void Update()
if (_outlineResources != null && _renderers != null)
{
- _commandBuffer.Clear();
-
- using (var renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget))
+ if (_updateRenderers)
{
- renderer.Render(_renderers.GetList(), _outlineSettings.OutlineResources, _outlineSettings);
+ _renderers.Reset(false);
}
-#if UNITY_EDITOR
-
- _commandBufferUpdateCounter++;
-
-#endif
- }
- }
-
- private void OnWillRenderObject()
- {
- if (gameObject.activeInHierarchy && enabled)
- {
- var camera = Camera.current;
+ _commandBuffer.Clear();
- if (camera)
+ using (var renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget))
{
- if (!_cameraMap.ContainsKey(camera))
- {
- camera.AddCommandBuffer(OutlineRenderer.RenderEvent, _commandBuffer);
- _cameraMap.Add(camera, _commandBuffer);
- }
+ renderer.Render(_renderers.GetList(), _outlineSettings.OutlineResources, _outlineSettings);
}
}
}
@@ -217,7 +183,7 @@ private void Reset()
if (_renderers != null)
{
- _renderers.Reset();
+ _renderers.Reset(true);
}
}
@@ -330,6 +296,20 @@ public bool Equals(IOutlineSettings other)
#region implementation
+ private void OnCameraPreRender(Camera camera)
+ {
+ if (camera)
+ {
+ camera.depthTextureMode |= DepthTextureMode.Depth;
+
+ if (!_cameraMap.ContainsKey(camera))
+ {
+ camera.AddCommandBuffer(OutlineRenderer.RenderEvent, _commandBuffer);
+ _cameraMap.Add(camera, _commandBuffer);
+ }
+ }
+ }
+
private void RemoveDestroyedCameras()
{
List camerasToRemove = null;
@@ -364,12 +344,6 @@ private void CreateCommandBufferIfNeeded()
{
_commandBuffer = new CommandBuffer();
_commandBuffer.name = string.Format("{0} - {1}", GetType().Name, name);
-
-#if UNITY_EDITOR
-
- _commandBufferUpdateCounter = 0;
-
-#endif
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index d08cedc..b462434 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -162,6 +162,8 @@ private void OnEnable()
name = string.Format("{0} - {1}", GetType().Name, name)
};
+ camera.depthTextureMode |= DepthTextureMode.Depth;
+
#if UNITY_EDITOR
_commandBufferUpdateCounter = 0;
From b79a83dcfc3d5a30a79d19bc4804ba52dea6d159 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Mon, 30 Mar 2020 19:37:17 +0300
Subject: [PATCH 15/39] Added a few editor tooltips
---
Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs | 4 ++--
Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index 6e9c955..68ca543 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -21,11 +21,11 @@ public sealed partial class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
#pragma warning disable 0649
- [SerializeField]
+ [SerializeField, Tooltip("Sets outline resources to use. Do not change the defaults unless you know what you're doing.")]
private OutlineResources _outlineResources;
[SerializeField, HideInInspector]
private OutlineSettingsInstance _outlineSettings;
- [SerializeField]
+ [SerializeField, Tooltip("If set, list of object renderers is updated on each frame. Enable if the object has child renderers which are enabled/disabled frequently.")]
private bool _updateRenderers;
#pragma warning restore 0649
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index b462434..d7ae252 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -21,9 +21,9 @@ public sealed partial class OutlineEffect : MonoBehaviour
{
#region data
- [SerializeField]
+ [SerializeField, Tooltip("Sets outline resources to use. Do not change the defaults unless you know what you're doing.")]
private OutlineResources _outlineResources;
- [SerializeField]
+ [SerializeField, Tooltip("Collection of outline layers to use. This can be used to share outline settings between multiple cameras.")]
private OutlineLayerCollection _outlineLayers;
[SerializeField, HideInInspector]
private CameraEvent _cameraEvent = OutlineRenderer.RenderEvent;
From 821a7e58464825a4873e7f302b3f378b2a4bba8f Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Mon, 30 Mar 2020 19:40:00 +0300
Subject: [PATCH 16/39] Removed command buffer update counters
---
.../Editor/Scripts/OutlineEffectEditor.cs | 11 ------
.../Runtime/Scripts/OutlineEffect.cs | 34 -------------------
2 files changed, 45 deletions(-)
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
index bd8c508..fd4c904 100644
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
+++ b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
@@ -54,17 +54,6 @@ public override void OnInspectorGUI()
OutlineEditorUtility.RenderPreview(_effect.OutlineLayers, true);
}
}
-
- _debugOpened = EditorGUILayout.Foldout(_debugOpened, "Debug", true);
-
- if (_debugOpened)
- {
- EditorGUI.BeginDisabledGroup(true);
- EditorGUI.indentLevel += 1;
- EditorGUILayout.IntField("Command buffer updates", _effect.NumberOfCommandBufferUpdates);
- EditorGUI.indentLevel -= 1;
- EditorGUI.EndDisabledGroup();
- }
}
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index d7ae252..900d92a 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -30,31 +30,10 @@ public sealed partial class OutlineEffect : MonoBehaviour
private CommandBuffer _commandBuffer;
-#if UNITY_EDITOR
-
- private int _commandBufferUpdateCounter;
-
-#endif
-
#endregion
#region interface
-#if UNITY_EDITOR
-
- ///
- /// Gets number of the command buffer updates since its creation. Only available in editor.
- ///
- public int NumberOfCommandBufferUpdates
- {
- get
- {
- return _commandBufferUpdateCounter;
- }
- }
-
-#endif
-
///
/// Gets or sets resources used by the effect implementation.
///
@@ -163,13 +142,6 @@ private void OnEnable()
};
camera.depthTextureMode |= DepthTextureMode.Depth;
-
-#if UNITY_EDITOR
-
- _commandBufferUpdateCounter = 0;
-
-#endif
-
camera.AddCommandBuffer(_cameraEvent, _commandBuffer);
}
}
@@ -231,12 +203,6 @@ private void FillCommandBuffer()
_outlineLayers.Render(renderer, _outlineResources);
}
}
-
-#if UNITY_EDITOR
-
- _commandBufferUpdateCounter++;
-
-#endif
}
private void CreateLayersIfNeeded()
From 9a9f57b9e6b2fb00ba7c3d991342cf1fd2edd6f2 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Mon, 30 Mar 2020 20:08:47 +0300
Subject: [PATCH 17/39] Do not force DepthTextureMode for camera if it is not
required for OutlineBehaviour
---
.../Runtime/Scripts/OutlineBehaviour.cs | 5 ++++-
.../Runtime/Scripts/OutlineSettingsInstance.cs | 15 +++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index 68ca543..fa115a2 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -300,7 +300,10 @@ private void OnCameraPreRender(Camera camera)
{
if (camera)
{
- camera.depthTextureMode |= DepthTextureMode.Depth;
+ if (_outlineSettings.RequiresCameraDepth)
+ {
+ camera.depthTextureMode |= DepthTextureMode.Depth;
+ }
if (!_cameraMap.ContainsKey(camera))
{
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
index 2a66d69..a39ef7e 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
@@ -45,6 +45,21 @@ public OutlineResources OutlineResources
}
}
+ public bool RequiresCameraDepth
+ {
+ get
+ {
+ var renderMode = _outlineMode;
+
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ renderMode = _outlineSettings.OutlineRenderMode;
+ }
+
+ return (renderMode & OutlineRenderFlags.EnableDepthTesting) != 0;
+ }
+ }
+
internal OutlineSettingsInstance()
{
}
From 84c0c1db74fe5306626dcc70b71ab25dd5a1b1d9 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Mon, 30 Mar 2020 20:11:48 +0300
Subject: [PATCH 18/39] Assembly properties updated
---
Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs b/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs
index 4e069a1..d7b9f2c 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs
@@ -17,7 +17,7 @@
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyCompany("")]
-[assembly: AssemblyCopyright("Copyright © Alexander Bogarsukov 2019")]
+[assembly: AssemblyCopyright("Copyright © Alexander Bogarsukov 2019-2020")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
@@ -25,8 +25,5 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-// The following GUID is for the ID of the typelib if this project is exposed to COM.
-[assembly: Guid("1ace8625-97c5-4d37-a649-03975d187542")]
-
// Make internals visible to the editor assembly.
[assembly: InternalsVisibleTo("UnityFx.Outline.Editor")]
From 48a562278da3dae1439c68070299a83e02d1e4f0 Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Mon, 30 Mar 2020 22:16:43 +0300
Subject: [PATCH 19/39] Added OutlineRendererCollection, removed specific
collections for OutlineBehaviour and OutlineLayer
---
.../Scripts/OutlineBehaviour.Renderers.cs | 138 ---------------
.../Runtime/Scripts/OutlineBehaviour.cs | 13 +-
.../Runtime/Scripts/OutlineEffect.cs | 2 +-
.../Runtime/Scripts/OutlineLayer.Renderers.cs | 160 ------------------
.../Scripts/OutlineLayer.Renderers.cs.meta | 11 --
.../Runtime/Scripts/OutlineLayer.cs | 8 +-
.../Scripts/OutlineRendererCollection.cs | 146 ++++++++++++++++
...meta => OutlineRendererCollection.cs.meta} | 2 +-
8 files changed, 164 insertions(+), 316 deletions(-)
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs.meta
create mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
rename Packages/UnityFx.Outline/Runtime/Scripts/{OutlineBehaviour.Renderers.cs.meta => OutlineRendererCollection.cs.meta} (83%)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
deleted file mode 100644
index a6bec9c..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- partial class OutlineBehaviour
- {
- #region interface
- #endregion
-
- #region implementation
-
- private sealed class RendererCollection : ICollection
- {
- #region data
-
- private readonly List _renderers = new List();
- private readonly GameObject _go;
-
- #endregion
-
- #region interface
-
- internal RendererCollection(OutlineBehaviour parent)
- {
- Debug.Assert(parent);
-
- _go = parent.gameObject;
- }
-
- internal List GetList()
- {
- return _renderers;
- }
-
- internal void Reset(bool includeInactive)
- {
- _go.GetComponentsInChildren(includeInactive, _renderers);
- }
-
- #endregion
-
- #region ICollection
-
- public int Count
- {
- get
- {
- return _renderers.Count;
- }
- }
-
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- public void Add(Renderer renderer)
- {
- Validate(renderer);
-
- _renderers.Add(renderer);
- }
-
- public bool Remove(Renderer renderer)
- {
- return _renderers.Remove(renderer);
- }
-
- public void Clear()
- {
- _renderers.Clear();
- }
-
- public bool Contains(Renderer renderer)
- {
- return _renderers.Contains(renderer);
- }
-
- public void CopyTo(Renderer[] array, int arrayIndex)
- {
- _renderers.CopyTo(array, arrayIndex);
- }
-
- #endregion
-
- #region IEnumerable
-
- public IEnumerator GetEnumerator()
- {
- return _renderers.GetEnumerator();
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return _renderers.GetEnumerator();
- }
-
- #endregion
-
- #region implementation
-
- private void Validate(Renderer renderer)
- {
- if (renderer == null)
- {
- throw new ArgumentNullException("renderer");
- }
-
- if (!renderer.transform.IsChildOf(_go.transform))
- {
- throw new ArgumentException(string.Format("Only children of the {0} are allowed.", _go.name), "renderer");
- }
- }
-
- #endregion
- }
-
- private void CreateRenderersIfNeeded()
- {
- if (_renderers == null)
- {
- _renderers = new RendererCollection(this);
- _renderers.Reset(true);
- }
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
index fa115a2..325b329 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -15,7 +15,7 @@ namespace UnityFx.Outline
///
[ExecuteInEditMode]
[DisallowMultipleComponent]
- public sealed partial class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
+ public sealed class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
{
#region data
@@ -30,7 +30,7 @@ public sealed partial class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
#pragma warning restore 0649
- private RendererCollection _renderers;
+ private OutlineRendererCollection _renderers;
private CommandBuffer _commandBuffer;
private Dictionary _cameraMap = new Dictionary();
@@ -358,6 +358,15 @@ private void CreateSettingsIfNeeded()
}
}
+ private void CreateRenderersIfNeeded()
+ {
+ if (_renderers == null)
+ {
+ _renderers = new OutlineRendererCollection(gameObject);
+ _renderers.Reset(true);
+ }
+ }
+
#endregion
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index 900d92a..8945e5d 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -14,7 +14,7 @@ namespace UnityFx.Outline
///
///
///
- ///
+ ///
[DisallowMultipleComponent]
[RequireComponent(typeof(Camera))]
public sealed partial class OutlineEffect : MonoBehaviour
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs
deleted file mode 100644
index bcc32d9..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- partial class OutlineLayer
- {
- #region interface
- #endregion
-
- #region implementation
-
- private sealed class RendererCollection : ICollection
- {
- #region data
-
- private readonly List _renderers = new List();
- private readonly GameObject _go;
-
- #endregion
-
- #region interface
-
- internal RendererCollection(GameObject parent)
- {
- Debug.Assert(parent);
- _go = parent;
- }
-
- internal RendererCollection(GameObject parent, int ignoreMask)
- {
- Debug.Assert(parent);
-
- _go = parent;
- Reset(ignoreMask);
- }
-
- internal List GetList()
- {
- return _renderers;
- }
-
- public void Reset(int ignoreLayerMask)
- {
- _renderers.Clear();
-
- var renderers = _go.GetComponentsInChildren();
-
- if (renderers != null)
- {
- if (ignoreLayerMask != 0)
- {
- foreach (var renderer in renderers)
- {
- if (((1 << renderer.gameObject.layer) & ignoreLayerMask) == 0)
- {
- _renderers.Add(renderer);
- }
- }
- }
- else
- {
- foreach (var renderer in renderers)
- {
- _renderers.Add(renderer);
- }
- }
- }
- }
-
- #endregion
-
- #region ICollection
-
- public int Count
- {
- get
- {
- return _renderers.Count;
- }
- }
-
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- public void Add(Renderer renderer)
- {
- Validate(renderer);
-
- _renderers.Add(renderer);
- }
-
- public bool Remove(Renderer renderer)
- {
- return _renderers.Remove(renderer);
- }
-
- public void Clear()
- {
- _renderers.Clear();
- }
-
- public bool Contains(Renderer renderer)
- {
- return _renderers.Contains(renderer);
- }
-
- public void CopyTo(Renderer[] array, int arrayIndex)
- {
- _renderers.CopyTo(array, arrayIndex);
- }
-
- #endregion
-
- #region IEnumerable
-
- public IEnumerator GetEnumerator()
- {
- return _renderers.GetEnumerator();
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return _renderers.GetEnumerator();
- }
-
- #endregion
-
- #region implementation
-
- private void Validate(Renderer renderer)
- {
- if (renderer == null)
- {
- throw new ArgumentNullException("renderer");
- }
-
- if (!renderer.transform.IsChildOf(_go.transform))
- {
- throw new ArgumentException(string.Format("Only children of the {0} are allowed.", _go.name), "renderer");
- }
- }
-
- #endregion
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs.meta
deleted file mode 100644
index a2ecbf0..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.Renderers.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f98c44e515873c54180f1d3b1037f999
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
index c5c3147..8217cab 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
@@ -30,7 +30,7 @@ public sealed partial class OutlineLayer : ICollection, IOutlineSett
private bool _enabled = true;
private OutlineLayerCollection _parentCollection;
- private Dictionary _outlineObjects = new Dictionary();
+ private Dictionary _outlineObjects = new Dictionary();
#endregion
@@ -166,7 +166,9 @@ public void Add(GameObject go, int ignoreLayerMask)
if (!_outlineObjects.ContainsKey(go))
{
- _outlineObjects.Add(go, new RendererCollection(go, ignoreLayerMask));
+ var renderers = new OutlineRendererCollection(go);
+ renderers.Reset(false, ignoreLayerMask);
+ _outlineObjects.Add(go, renderers);
}
}
@@ -190,7 +192,7 @@ public bool TryGetRenderers(GameObject go, out ICollection renderers)
throw new ArgumentNullException("go");
}
- RendererCollection result;
+ OutlineRendererCollection result;
if (_outlineObjects.TryGetValue(go, out result))
{
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
new file mode 100644
index 0000000..730e6dd
--- /dev/null
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
@@ -0,0 +1,146 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ internal class OutlineRendererCollection : ICollection
+ {
+ #region data
+
+ private readonly List _renderers = new List();
+ private readonly GameObject _go;
+
+ #endregion
+
+ #region interface
+
+ internal OutlineRendererCollection(GameObject go)
+ {
+ Debug.Assert(go);
+ _go = go;
+ }
+
+ internal List GetList()
+ {
+ return _renderers;
+ }
+
+ internal void Reset(bool includeInactive)
+ {
+ _go.GetComponentsInChildren(includeInactive, _renderers);
+ }
+
+ internal void Reset(bool includeInactive, int ignoreLayerMask)
+ {
+ _renderers.Clear();
+
+ var renderers = _go.GetComponentsInChildren(includeInactive);
+
+ if (renderers != null)
+ {
+ if (ignoreLayerMask != 0)
+ {
+ foreach (var renderer in renderers)
+ {
+ if (((1 << renderer.gameObject.layer) & ignoreLayerMask) == 0)
+ {
+ _renderers.Add(renderer);
+ }
+ }
+ }
+ else
+ {
+ foreach (var renderer in renderers)
+ {
+ _renderers.Add(renderer);
+ }
+ }
+ }
+ }
+
+ #endregion
+
+ #region ICollection
+
+ public int Count
+ {
+ get
+ {
+ return _renderers.Count;
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public void Add(Renderer renderer)
+ {
+ Validate(renderer);
+
+ _renderers.Add(renderer);
+ }
+
+ public bool Remove(Renderer renderer)
+ {
+ return _renderers.Remove(renderer);
+ }
+
+ public void Clear()
+ {
+ _renderers.Clear();
+ }
+
+ public bool Contains(Renderer renderer)
+ {
+ return _renderers.Contains(renderer);
+ }
+
+ public void CopyTo(Renderer[] array, int arrayIndex)
+ {
+ _renderers.CopyTo(array, arrayIndex);
+ }
+
+ #endregion
+
+ #region IEnumerable
+
+ public IEnumerator GetEnumerator()
+ {
+ return _renderers.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return _renderers.GetEnumerator();
+ }
+
+ #endregion
+
+ #region implementation
+
+ private void Validate(Renderer renderer)
+ {
+ if (renderer == null)
+ {
+ throw new ArgumentNullException("renderer");
+ }
+
+ if (!renderer.transform.IsChildOf(_go.transform))
+ {
+ throw new ArgumentException(string.Format("Only children of the {0} are allowed.", _go.name), "renderer");
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
similarity index 83%
rename from Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs.meta
rename to Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
index 02f6567..f582b73 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.Renderers.cs.meta
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: e24c24bdabda57c45a4a803464696afc
+guid: 89621a3cc73c4e6498a00b2d180ed462
MonoImporter:
externalObjects: {}
serializedVersion: 2
From 6e5c144c075229dd1f317c54a69c95b1cda71078 Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Mon, 30 Mar 2020 22:53:50 +0300
Subject: [PATCH 20/39] Added UnityFx.Outline.HDRP package
---
Packages/UnityFx.Outline.HDRP/CHANGELOG.md | 9 +++
.../UnityFx.Outline.HDRP/CHANGELOG.md.meta | 7 +++
Packages/UnityFx.Outline.HDRP/README.md | 11 ++++
Packages/UnityFx.Outline.HDRP/README.md.meta | 7 +++
Packages/UnityFx.Outline.HDRP/Runtime.meta | 8 +++
.../UnityFx.Outline.HDRP/Runtime/Scripts.meta | 8 +++
.../Runtime/Scripts/Outline.cs | 55 +++++++++++++++++++
.../Runtime/Scripts/Outline.cs.meta | 11 ++++
.../Runtime/UnityFx.Outline.HDRP.asmdef | 14 +++++
.../Runtime/UnityFx.Outline.HDRP.asmdef.meta | 7 +++
Packages/UnityFx.Outline.HDRP/package.json | 33 +++++++++++
.../UnityFx.Outline.HDRP/package.json.meta | 7 +++
.../package.json | 4 +-
13 files changed, 179 insertions(+), 2 deletions(-)
create mode 100644 Packages/UnityFx.Outline.HDRP/CHANGELOG.md
create mode 100644 Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta
create mode 100644 Packages/UnityFx.Outline.HDRP/README.md
create mode 100644 Packages/UnityFx.Outline.HDRP/README.md.meta
create mode 100644 Packages/UnityFx.Outline.HDRP/Runtime.meta
create mode 100644 Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta
create mode 100644 Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
create mode 100644 Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
create mode 100644 Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
create mode 100644 Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta
create mode 100644 Packages/UnityFx.Outline.HDRP/package.json
create mode 100644 Packages/UnityFx.Outline.HDRP/package.json.meta
diff --git a/Packages/UnityFx.Outline.HDRP/CHANGELOG.md b/Packages/UnityFx.Outline.HDRP/CHANGELOG.md
new file mode 100644
index 0000000..1cf7420
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/CHANGELOG.md
@@ -0,0 +1,9 @@
+# UnityFx.Outline.HDRP changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
+
+## [0.1.0] - unreleased
+
+### Added
+- Initial release.
diff --git a/Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta b/Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta
new file mode 100644
index 0000000..f3ea157
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d2731cfdae865ee439fd0fef782fa994
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.HDRP/README.md b/Packages/UnityFx.Outline.HDRP/README.md
new file mode 100644
index 0000000..7149507
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/README.md
@@ -0,0 +1,11 @@
+# UnityFx.Outline.HDRP
+
+## SUMMARY
+Screen-space outline effects for HDRP.
+
+## USEFUL LINKS
+* [Github project](https://github.com/Arvtesh/UnityFx.Outline)
+* [npm package](https://www.npmjs.com/package/com.unityfx.outline.hdrp)
+* [Documentation](https://github.com/Arvtesh/UnityFx.Outline/blob/master/README.md)
+* [License](https://github.com/Arvtesh/UnityFx.Outline/blob/master/LICENSE.md)
+* [Support](mailto:arvtesh@gmail.com)
diff --git a/Packages/UnityFx.Outline.HDRP/README.md.meta b/Packages/UnityFx.Outline.HDRP/README.md.meta
new file mode 100644
index 0000000..39c522c
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/README.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 3db1fff9dd9ae804888eebc4382e1fb8
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime.meta b/Packages/UnityFx.Outline.HDRP/Runtime.meta
new file mode 100644
index 0000000..5ef6e3e
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/Runtime.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 58d8c6c8330ffc042ade41ba15f8da23
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta
new file mode 100644
index 0000000..100ae09
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 85518f862b075044bbd76d57354f8f3e
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
new file mode 100644
index 0000000..9e8af01
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
@@ -0,0 +1,55 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+using UnityEngine.Rendering;
+using UnityEngine.Rendering.HighDefinition;
+
+namespace UnityFx.Outline.HDRP
+{
+ [Serializable]
+ [VolumeComponentMenu("Post-processing/UnityFx/Outline")]
+ public sealed class Outline : CustomPostProcessVolumeComponent, IPostProcessComponent
+ {
+ #region data
+ #endregion
+
+ #region interface
+ #endregion
+
+ #region CustomPostProcessVolumeComponent
+
+ public override CustomPostProcessInjectionPoint injectionPoint
+ {
+ get
+ {
+ return CustomPostProcessInjectionPoint.AfterPostProcess;
+ }
+ }
+
+ public override void Setup()
+ {
+ }
+
+ public override void Render(CommandBuffer cmd, HDCamera camera, RTHandle source, RTHandle destination)
+ {
+ }
+
+ public override void Cleanup()
+ {
+ }
+
+ #endregion
+
+ #region IPostProcessComponent
+
+ public bool IsActive()
+ {
+ // TODO
+ return true;
+ }
+
+ #endregion
+ }
+}
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
new file mode 100644
index 0000000..d40b498
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dcdde7b7f13f9c745ae31e38f089fdf8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef b/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
new file mode 100644
index 0000000..e737640
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
@@ -0,0 +1,14 @@
+{
+ "name": "UnityFx.Outline.HDRP",
+ "references": [
+ "UnityFx.Outline"
+ ],
+ "optionalUnityReferences": [],
+ "includePlatforms": [],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": []
+}
\ No newline at end of file
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta b/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta
new file mode 100644
index 0000000..418ae3e
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 8130e23c3199afb43ae1c34b3e328d00
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.HDRP/package.json b/Packages/UnityFx.Outline.HDRP/package.json
new file mode 100644
index 0000000..7c29a0a
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "com.unityfx.outline.hdrp",
+ "version": "0.1.0",
+ "displayName": "Screen-space outline (HDRP)",
+ "description": "Configurable outline for HDRP.",
+ "unity": "2019.3",
+ "dependencies": {
+ "com.unityfx.outline": "0.8.0",
+ "com.unity.render-pipelines.high-definition": "7.0.0"
+ },
+ "keywords": [
+ "UnityFx",
+ "UnityFx.Outline",
+ "UnityFx.Outline.HDRP",
+ "Outline",
+ "Post-processing",
+ "HDRP"
+ ],
+ "category": "UnityFx",
+ "author": {
+ "name": "Arvtesh",
+ "email": "arvtesh@gmail.com"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/Arvtesh/UnityFx.Outline",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Arvtesh/UnityFx.Outline.git"
+ },
+ "bugs": {
+ "url": "https://github.com/Arvtesh/UnityFx.Outline/issues"
+ }
+}
diff --git a/Packages/UnityFx.Outline.HDRP/package.json.meta b/Packages/UnityFx.Outline.HDRP/package.json.meta
new file mode 100644
index 0000000..3132f4f
--- /dev/null
+++ b/Packages/UnityFx.Outline.HDRP/package.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 761dcd9f6f741bd4b9a86aa1fc1f11b7
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/package.json b/Packages/UnityFx.Outline.PostProcessing/package.json
index 2da098a..49d5161 100644
--- a/Packages/UnityFx.Outline.PostProcessing/package.json
+++ b/Packages/UnityFx.Outline.PostProcessing/package.json
@@ -3,9 +3,9 @@
"version": "0.1.0",
"displayName": "Screen-space outline (Post-processing v2)",
"description": "Configurable outline for Unity post-processing stack (v2). Both solid and blurred modes supported (Gauss blur).",
- "unity": "2018.1",
+ "unity": "2018.4",
"dependencies": {
- "com.unityfx.outline": "0.7.1",
+ "com.unityfx.outline": "0.8.0",
"com.unity.postprocessing": "2.2.2"
},
"keywords": [
From 4ed2cea7ec2826a1892daf1c71bd5ee6634f1a4a Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Tue, 31 Mar 2020 12:50:07 +0300
Subject: [PATCH 21/39] HDRP package pilot (untested)
---
.../Runtime/Scripts/Outline.cs | 52 ++++++++++++++++++-
.../Runtime/Scripts/Outline.cs.meta | 4 +-
.../Runtime/UnityFx.Outline.HDRP.asmdef | 7 ++-
3 files changed, 59 insertions(+), 4 deletions(-)
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
index 9e8af01..959edb0 100644
--- a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
@@ -13,9 +13,22 @@ namespace UnityFx.Outline.HDRP
public sealed class Outline : CustomPostProcessVolumeComponent, IPostProcessComponent
{
#region data
+
+#pragma warning disable 0649
+
+ [SerializeField, HideInInspector]
+ private OutlineResources _defaultResources;
+ [SerializeField]
+ private VolumeParameter _resources = new VolumeParameter();
+ [SerializeField]
+ private VolumeParameter _layers = new VolumeParameter();
+
+#pragma warning restore 0649
+
#endregion
#region interface
+
#endregion
#region CustomPostProcessVolumeComponent
@@ -34,6 +47,10 @@ public override void Setup()
public override void Render(CommandBuffer cmd, HDCamera camera, RTHandle source, RTHandle destination)
{
+ using (var renderer = new OutlineRenderer(cmd, source, destination))
+ {
+ _layers.value.Render(renderer, _resources.value);
+ }
}
public override void Cleanup()
@@ -42,11 +59,44 @@ public override void Cleanup()
#endregion
+ #region ScriptableObject
+
+ protected override void OnEnable()
+ {
+ // NOTE: This should go before base.OnEnable().
+ if (!_resources.value)
+ {
+ _resources.value = _defaultResources;
+ }
+
+ base.OnEnable();
+ }
+
+ #endregion
+
#region IPostProcessComponent
public bool IsActive()
{
- // TODO
+ if (_resources == null || _layers == null)
+ {
+ return false;
+ }
+
+ var r = _resources.value;
+
+ if (r == null || !r.IsValid)
+ {
+ return false;
+ }
+
+ var l = _layers.value;
+
+ if (l == null || l.Count == 0)
+ {
+ return false;
+ }
+
return true;
}
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
index d40b498..fd81fd9 100644
--- a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
@@ -3,7 +3,9 @@ guid: dcdde7b7f13f9c745ae31e38f089fdf8
MonoImporter:
externalObjects: {}
serializedVersion: 2
- defaultReferences: []
+ defaultReferences:
+ - _defaultResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19,
+ type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef b/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
index e737640..3017f1e 100644
--- a/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
@@ -1,14 +1,17 @@
{
"name": "UnityFx.Outline.HDRP",
"references": [
+ "Unity.RenderPipelines.Core.Runtime",
+ "Unity.RenderPipelines.HighDefinition.Runtime",
"UnityFx.Outline"
],
- "optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
- "defineConstraints": []
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
}
\ No newline at end of file
From f31fd29984ee71973f1e2d9a8eafb4bb91c6c1e7 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Tue, 31 Mar 2020 14:35:04 +0300
Subject: [PATCH 22/39] Added OutlineEffect convenience methods
---
.../Runtime/Scripts/OutlineEffect.cs | 51 +++++++++++++------
.../Runtime/Scripts/OutlineLayer.cs | 8 +--
2 files changed, 40 insertions(+), 19 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
index 8945e5d..a4bacb8 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -2,7 +2,7 @@
// See the LICENSE.md file in the project root for more information.
using System;
-using System.Runtime.CompilerServices;
+using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
@@ -46,7 +46,7 @@ public OutlineResources OutlineResources
}
set
{
- if (value == null)
+ if (ReferenceEquals(value, null))
{
throw new ArgumentNullException("OutlineResources");
}
@@ -56,26 +56,16 @@ public OutlineResources OutlineResources
}
///
- /// Gets or sets outline layers.
+ /// Gets collection of outline layers.
///
- /// Thrown if setter argument is .
///
- public OutlineLayerCollection OutlineLayers
+ public IList OutlineLayers
{
get
{
CreateLayersIfNeeded();
return _outlineLayers;
}
- set
- {
- if (value == null)
- {
- throw new ArgumentNullException("OutlineLayers");
- }
-
- _outlineLayers = value;
- }
}
///
@@ -107,6 +97,38 @@ public CameraEvent RenderEvent
}
}
+ ///
+ /// Adds the passed to the first outline layer. Creates the layer if needed.
+ ///
+ /// The to add and render outline for.
+ ///
+ public void AddGameObject(GameObject go)
+ {
+ AddGameObject(go, 0);
+ }
+
+ ///
+ /// Adds the passed to the specified outline layer. Creates the layer if needed.
+ ///
+ /// The to add and render outline for.
+ ///
+ public void AddGameObject(GameObject go, int layerIndex)
+ {
+ if (layerIndex < 0)
+ {
+ throw new ArgumentOutOfRangeException("layerIndex");
+ }
+
+ CreateLayersIfNeeded();
+
+ while (_outlineLayers.Count <= layerIndex)
+ {
+ _outlineLayers.Add(new OutlineLayer());
+ }
+
+ _outlineLayers[layerIndex].Add(go);
+ }
+
///
/// Shares with another instance.
///
@@ -117,7 +139,6 @@ public void ShareLayersWith(OutlineEffect other)
if (other)
{
CreateLayersIfNeeded();
-
other._outlineLayers = _outlineLayers;
}
}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
index 8217cab..eac4774 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
@@ -130,7 +130,7 @@ public OutlineLayer(string name)
/// Thrown if is .
public OutlineLayer(OutlineSettings settings)
{
- if (settings == null)
+ if (ReferenceEquals(settings, null))
{
throw new ArgumentNullException("settings");
}
@@ -144,7 +144,7 @@ public OutlineLayer(OutlineSettings settings)
/// Thrown if is .
public OutlineLayer(string name, OutlineSettings settings)
{
- if (settings == null)
+ if (ReferenceEquals(settings, null))
{
throw new ArgumentNullException("settings");
}
@@ -159,7 +159,7 @@ public OutlineLayer(string name, OutlineSettings settings)
/// Thrown if is .
public void Add(GameObject go, int ignoreLayerMask)
{
- if (go == null)
+ if (ReferenceEquals(go, null))
{
throw new ArgumentNullException("go");
}
@@ -187,7 +187,7 @@ public void Add(GameObject go, string ignoreLayer)
/// Thrown if is .
public bool TryGetRenderers(GameObject go, out ICollection renderers)
{
- if (go == null)
+ if (ReferenceEquals(go, null))
{
throw new ArgumentNullException("go");
}
From f42313b1e2e79825f54450d40eaa5e1ea8948784 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Tue, 31 Mar 2020 15:27:43 +0300
Subject: [PATCH 23/39] README update
---
README.md | 45 ++++++++++++++++++++++++++++++++++++++-------
1 file changed, 38 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 7e8c121..2619c06 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,10 @@
Channel | UnityFx.Outline |
---------|---------------|
Github | [![GitHub release](https://img.shields.io/github/release/Arvtesh/UnityFx.Outline.svg?logo=github)](https://github.com/Arvtesh/UnityFx.Outline/releases)
-Npm | [![Npm release](https://img.shields.io/npm/v/com.unityfx.outline.svg)](https://www.npmjs.com/package/com.unityfx.outline) ![npm](https://img.shields.io/npm/dt/com.unityfx.outline)
+Npm (core + built-in RP) | [![Npm release](https://img.shields.io/npm/v/com.unityfx.outline.svg)](https://www.npmjs.com/package/com.unityfx.outline) ![npm](https://img.shields.io/npm/dt/com.unityfx.outline)
+Npm (Post-processing v2) | [![Npm release](https://img.shields.io/npm/v/com.unityfx.outline.postprocessing.svg)](https://www.npmjs.com/package/com.unityfx.outline.postprocessing) ![npm](https://img.shields.io/npm/dt/com.unityfx.outline.postprocessing)
+Npm (URP) | [![Npm release](https://img.shields.io/npm/v/com.unityfx.outline.urp.svg)](https://www.npmjs.com/package/com.unityfx.outline.urp) ![npm](https://img.shields.io/npm/dt/com.unityfx.outline.urp)
+Npm (HDRP) | [![Npm release](https://img.shields.io/npm/v/com.unityfx.outline.hdrp.svg)](https://www.npmjs.com/package/com.unityfx.outline.hdrp) ![npm](https://img.shields.io/npm/dt/com.unityfx.outline.hdrp)
**Requires Unity 2017 or higher.**
**Compatible with [Unity Post-processing Stack v2](https://github.com/Unity-Technologies/PostProcessing/tree/v2).**
@@ -42,10 +45,13 @@ You can get the code by cloning the github repository using your preffered git c
git clone https://github.com/Arvtesh/UnityFx.Outline.git
```
-### Npm package
-[![NPM](https://nodei.co/npm/com.unityfx.outline.png)](https://www.npmjs.com/package/com.unityfx.outline)
+### Npm packages
+[![NPM](https://nodei.co/npm/com.unityfx.outline.png)](https://www.npmjs.com/package/com.unityfx.outline)
+[![NPM](https://nodei.co/npm/com.unityfx.outline.postprocessing.png)](https://www.npmjs.com/package/com.unityfx.outline.postprocessing)
+[![NPM](https://nodei.co/npm/com.unityfx.outline.urp.png)](https://www.npmjs.com/package/com.unityfx.outline.urp)
+[![NPM](https://nodei.co/npm/com.unityfx.outline.hdrp.png)](https://www.npmjs.com/package/com.unityfx.outline.hdrp)
-Npm package is available at [npmjs.com](https://www.npmjs.com/package/com.unityfx.outline). To use it, add the following line to dependencies section of your `manifest.json`. Unity should download and link the package automatically:
+Npm core package is available at [npmjs.com](https://www.npmjs.com/package/com.unityfx.outline). There are dedicated packages for [Post-processing Stack v2](https://github.com/Unity-Technologies/PostProcessing/tree/v2), [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@8.0/manual/index.html) and [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@8.0/manual/index.html). To use the packages, add the following line to dependencies section of your `manifest.json`. Unity should download and link the package automatically:
```json
{
"scopedRegistries": [
@@ -58,7 +64,10 @@ Npm package is available at [npmjs.com](https://www.npmjs.com/package/com.unityf
}
],
"dependencies": {
- "com.unityfx.outline": "0.7.0"
+ "com.unityfx.outline": "0.8.0",
+ "com.unityfx.outline.postprocessing": "0.1.0",
+ "com.unityfx.outline.urp": "0.1.0",
+ "com.unityfx.outline.hdrp": "0.1.0",
}
}
```
@@ -69,7 +78,7 @@ Install the package and import the namespace:
using UnityFx.Outline;
```
-### Per-camera outlines
+### Per-camera outlines (built-in RP)
![Outline demo](Docs/OutlineEffectInspector.png "OutlineEffect Inspector")
Add `OutlineEffect` script to a camera that should render outlines. Then add and configure as many layers as you need:
@@ -84,6 +93,21 @@ layer.Add(myGo);
outlineEffect.OutlineLayers.Add(layer);
```
+or
+```csharp
+var outlineEffect = Camera.main.GetComponent();
+
+// This adds layer 0 (if it is not there) and then adds myGo.
+outlineEffect.AddGameObject(myGo);
+
+// Now setup the layer.
+var layer = outlineEffect[0];
+
+layer.OutlineColor = Color.red;
+layer.OutlineWidth = 7;
+layer.OutlineMode = OutlineMode.Blurred;
+layer.Add(myGo);
+```
This can be done at runtime or while editing a scene. If you choose to assign the script in runtime make sure `OutlineEffect.OutlineResources` is initialized. Disabling `OutlineEffect` script disables outlining for the camera (and frees all resources used).
@@ -97,7 +121,7 @@ var effect2 = camera2.GetComponent();
effect1.ShareLayersWith(effect2);
```
-### Per-object outlines
+### Per-object outlines (built-in RP)
![Outline demo](Docs/OutlineBehaviourInspector.png "OutlineBehaviour Inspector")
Add `OutlineBehaviour` script to objects that should be outlined (in edit mode or in runtime). Make sure `OutlineBehaviour.OutlineResources` is initialized. You can customize outline settings either via Unity inspector or via script. Objects with `OutlineBehaviour` assigned render outlines in all cameras.
@@ -143,6 +167,7 @@ myCamera.AddCommandBuffer(OutlineRenderer.RenderEvent, commandBuffer);
```
### Integration with Unity post-processing.
+[![NPM](https://nodei.co/npm/com.unityfx.outline.postprocessing.png)](https://www.npmjs.com/package/com.unityfx.outline.postprocessing)
The outline effect can easily be added to [Post-processing Stack v2](https://github.com/Unity-Technologies/PostProcessing/tree/v2). A minimal integration example is shown below:
```csharp
@@ -174,6 +199,12 @@ For the sake of simplicity the sample does not include any kind of error checkin
More info on writing custom post processing effects can be found [here](https://docs.unity3d.com/Packages/com.unity.postprocessing@2.2/manual/Writing-Custom-Effects.html).
+### Integration with Universal Render Pipeline (URP).
+[![NPM](https://nodei.co/npm/com.unityfx.outline.urp.png)](https://www.npmjs.com/package/com.unityfx.outline.urp)
+
+### Integration with High Definition Render Pipeline (HDRP).
+[![NPM](https://nodei.co/npm/com.unityfx.outline.hdrp.png)](https://www.npmjs.com/package/com.unityfx.outline.hdrp)
+
## Motivation
The project was initially created to help author with his [Unity3d](https://unity3d.com) projects. There are not many reusable open-source examples of it, so here it is. Hope it will be useful for someone.
From a5d47371f940690a69d4655a2cd53db437536972 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Tue, 31 Mar 2020 15:32:31 +0300
Subject: [PATCH 24/39] Github actions script update
---
.github/workflows/npmpublish.yml | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml
index 2dfef20..b31fac2 100644
--- a/.github/workflows/npmpublish.yml
+++ b/.github/workflows/npmpublish.yml
@@ -14,18 +14,9 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- - run: npm publish Packages/UnityFx.Outline
+ - run: |
+ npm publish Packages/UnityFx.Outline
+ npm publish Packages/UnityFx.Outline.PostProcessing
+ npm publish Packages/UnityFx.Outline.HDRP
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
-
- publish-gpr:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v1
- - uses: actions/setup-node@v1
- with:
- node-version: 12
- registry-url: https://npm.pkg.github.com/
- - run: npm publish Packages/UnityFx.Outline
- env:
- NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
From fb90f27b23db774dcdde6ec266753f2fd06f2734 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Tue, 31 Mar 2020 15:41:50 +0300
Subject: [PATCH 25/39] Fixed IndexOutOfRangeException when settings outline
width to max value (fixes #4)
---
.../UnityFx.Outline/Runtime/Scripts/OutlineResources.cs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
index 88ec434..8d8f169 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
@@ -204,17 +204,19 @@ public bool IsValid
///
public float[] GetGaussSamples(int width)
{
+ var index = Mathf.Clamp(width, 1, OutlineRenderer.MaxWidth) - 1;
+
if (_gaussSamples == null)
{
_gaussSamples = new float[OutlineRenderer.MaxWidth][];
}
- if (_gaussSamples[width] == null)
+ if (_gaussSamples[index] == null)
{
- _gaussSamples[width] = OutlineRenderer.GetGaussSamples(width, null);
+ _gaussSamples[index] = OutlineRenderer.GetGaussSamples(width, null);
}
- return _gaussSamples[width];
+ return _gaussSamples[index];
}
///
From ddeac474f229610800dcab97f67c4c8c30a68ff5 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Tue, 31 Mar 2020 15:44:49 +0300
Subject: [PATCH 26/39] Misc changes
---
.../UnityFx.Outline/Runtime/Scripts/OutlineResources.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
index 8d8f169..05017f8 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
@@ -75,7 +75,7 @@ public Material RenderMaterial
{
get
{
- if (_renderMaterial == null)
+ if (ReferenceEquals(_renderMaterial, null))
{
_renderMaterial = new Material(RenderShader)
{
@@ -95,7 +95,7 @@ public Material HPassMaterial
{
get
{
- if (_hPassMaterial == null)
+ if (ReferenceEquals(_hPassMaterial, null))
{
_hPassMaterial = new Material(HPassShader)
{
@@ -115,7 +115,7 @@ public Material VPassBlendMaterial
{
get
{
- if (_vPassMaterial == null)
+ if (ReferenceEquals(_vPassMaterial, null))
{
_vPassMaterial = new Material(VPassBlendShader)
{
@@ -167,7 +167,7 @@ public Mesh FullscreenTriangleMesh
{
get
{
- if (_fullscreenTriangleMesh == null)
+ if (ReferenceEquals(_fullscreenTriangleMesh, null))
{
_fullscreenTriangleMesh = new Mesh()
{
From 52a5df0bcf1a64516b31b9425a048eee9febf6ba Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Tue, 31 Mar 2020 15:49:29 +0300
Subject: [PATCH 27/39] CHANGELOG update
---
CHANGELOG.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3b7334f..540f611 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,14 +5,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/); this proj
## [0.8.0] - unreleased
-Added depth testing support and performance optimizations.
+Added depth testing support, SRP support and performance optimizations.
### Added
- Added support for depth testing when rendering outlines. When enabled, outlines are only rendered around the visible object parts ([#1](https://github.com/Arvtesh/UnityFx.Outline/issues/1)).
+- Added a few convenience methods to `OutlineEffect`.
+- Added editor tooltips for outline component fileds.
### Fixed
- Get rid of GC allocatinos during command buffer updates.
- Fixed compiler warning in post-processing compatibility package (0649).
+- Fixed `IndexOutOfRangeException` when setting outline width to max value ([#4](https://github.com/Arvtesh/UnityFx.Outline/issues/4)).
### Removed
- Removed change tracking support in package entities ([#2](https://github.com/Arvtesh/UnityFx.Outline/issues/2)).
From 6a2f3579120cb1ec222df4641c28677f5928e978 Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Tue, 31 Mar 2020 23:41:31 +0300
Subject: [PATCH 28/39] Make shaders SRP-compatible
---
.../UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader | 5 ++++-
.../UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader | 9 ++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
index 8c3b7a4..2febb62 100644
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
+++ b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
@@ -25,9 +25,12 @@ Shader "UnityFx/Outline/HPass"
#pragma fragment Frag
#include "UnityCG.cginc"
+ CBUFFER_START(UnityPerMaterial)
+ int _Width;
+ CBUFFER_END
+
UNITY_DECLARE_TEX2D(_MaskTex);
float2 _MaskTex_TexelSize;
- int _Width;
float _GaussSamples[32];
struct v2f
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
index c8be4b7..dbf1a18 100644
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
+++ b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
@@ -29,13 +29,16 @@ Shader "UnityFx/Outline/VPassBlend"
#pragma fragment Frag
#include "UnityCG.cginc"
+ CBUFFER_START(UnityPerMaterial)
+ float _Intensity;
+ int _Width;
+ float4 _Color;
+ CBUFFER_END
+
UNITY_DECLARE_TEX2D(_MaskTex);
float2 _MaskTex_TexelSize;
UNITY_DECLARE_TEX2D(_HPassTex);
float2 _HPassTex_TexelSize;
- float4 _Color;
- float _Intensity;
- int _Width;
float _GaussSamples[32];
struct v2f
From b370e786482ee51496c3a092e51ac855d2e45465 Mon Sep 17 00:00:00 2001
From: Arvtesh <22732458+Arvtesh@users.noreply.github.com>
Date: Wed, 1 Apr 2020 23:57:50 +0300
Subject: [PATCH 29/39] Misc HDRP-related fixes
---
.../Runtime/Scripts/Outline.cs | 29 ++++++++++++++++---
.../Runtime/Scripts/OutlineRenderer.cs | 24 ++++++++++++---
.../Runtime/Scripts/OutlineResources.cs | 8 ++---
3 files changed, 49 insertions(+), 12 deletions(-)
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
index 959edb0..c788934 100644
--- a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
+++ b/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
@@ -2,6 +2,7 @@
// See the LICENSE.md file in the project root for more information.
using System;
+using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
@@ -16,12 +17,22 @@ public sealed class Outline : CustomPostProcessVolumeComponent, IPostProcessComp
#pragma warning disable 0649
+ [Serializable]
+ private class OutlineResourcesParameter : VolumeParameter
+ {
+ }
+
+ [Serializable]
+ private class OutlineLayersParameter : VolumeParameter
+ {
+ }
+
[SerializeField, HideInInspector]
private OutlineResources _defaultResources;
[SerializeField]
- private VolumeParameter _resources = new VolumeParameter();
+ private OutlineResourcesParameter _resources = new OutlineResourcesParameter();
[SerializeField]
- private VolumeParameter _layers = new VolumeParameter();
+ private OutlineLayersParameter _layers = new OutlineLayersParameter();
#pragma warning restore 0649
@@ -29,6 +40,14 @@ public sealed class Outline : CustomPostProcessVolumeComponent, IPostProcessComp
#region interface
+ public IList OutlineLayers
+ {
+ get
+ {
+ return _layers.value;
+ }
+ }
+
#endregion
#region CustomPostProcessVolumeComponent
@@ -37,17 +56,18 @@ public override CustomPostProcessInjectionPoint injectionPoint
{
get
{
- return CustomPostProcessInjectionPoint.AfterPostProcess;
+ return CustomPostProcessInjectionPoint.BeforePostProcess;
}
}
public override void Setup()
{
+ base.Setup();
}
public override void Render(CommandBuffer cmd, HDCamera camera, RTHandle source, RTHandle destination)
{
- using (var renderer = new OutlineRenderer(cmd, source, destination))
+ using (var renderer = new OutlineRenderer(cmd, source, destination, destination.referenceSize))
{
_layers.value.Render(renderer, _resources.value);
}
@@ -55,6 +75,7 @@ public override void Render(CommandBuffer cmd, HDCamera camera, RTHandle source,
public override void Cleanup()
{
+ base.Cleanup();
}
#endregion
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
index eeced3e..3569cf7 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
@@ -125,7 +125,7 @@ public struct OutlineRenderer : IDisposable
/// Render target.
/// Thrown if is .
public OutlineRenderer(CommandBuffer commandBuffer, BuiltinRenderTextureType rt)
- : this(commandBuffer, rt, rt)
+ : this(commandBuffer, rt, rt, Vector2Int.zero)
{
}
@@ -136,7 +136,7 @@ public OutlineRenderer(CommandBuffer commandBuffer, BuiltinRenderTextureType rt)
/// Render target.
/// Thrown if is .
public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier rt)
- : this(commandBuffer, rt, rt)
+ : this(commandBuffer, rt, rt, Vector2Int.zero)
{
}
@@ -148,19 +148,35 @@ public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier rt)
/// Render target.
/// Thrown if is .
public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src, RenderTargetIdentifier dst)
+ : this(commandBuffer, src, dst, Vector2Int.zero)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the struct.
+ ///
+ /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
+ /// Source image. Can be the same as .
+ /// Render target.
+ /// Size of the temporaty render textures.
+ /// Thrown if is .
+ public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src, RenderTargetIdentifier dst, Vector2Int rtSize)
{
if (commandBuffer == null)
{
throw new ArgumentNullException("commandBuffer");
}
+ var cx = rtSize.x > 0 ? rtSize.x : -1;
+ var cy = rtSize.y > 0 ? rtSize.y : -1;
+
_source = src;
_destination = dst;
_commandBuffer = commandBuffer;
_commandBuffer.BeginSample(EffectName);
- _commandBuffer.GetTemporaryRT(_maskRtId, -1, -1, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
- _commandBuffer.GetTemporaryRT(_hPassRtId, -1, -1, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
+ _commandBuffer.GetTemporaryRT(_maskRtId, cx, cy, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
+ _commandBuffer.GetTemporaryRT(_hPassRtId, cx, cy, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
// Need to copy src content into dst if they are not the same. For instance this is the case when rendering
// the outline effect as part of Unity Post Processing stack.
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
index 05017f8..8d8f169 100644
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
+++ b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
@@ -75,7 +75,7 @@ public Material RenderMaterial
{
get
{
- if (ReferenceEquals(_renderMaterial, null))
+ if (_renderMaterial == null)
{
_renderMaterial = new Material(RenderShader)
{
@@ -95,7 +95,7 @@ public Material HPassMaterial
{
get
{
- if (ReferenceEquals(_hPassMaterial, null))
+ if (_hPassMaterial == null)
{
_hPassMaterial = new Material(HPassShader)
{
@@ -115,7 +115,7 @@ public Material VPassBlendMaterial
{
get
{
- if (ReferenceEquals(_vPassMaterial, null))
+ if (_vPassMaterial == null)
{
_vPassMaterial = new Material(VPassBlendShader)
{
@@ -167,7 +167,7 @@ public Mesh FullscreenTriangleMesh
{
get
{
- if (ReferenceEquals(_fullscreenTriangleMesh, null))
+ if (_fullscreenTriangleMesh == null)
{
_fullscreenTriangleMesh = new Mesh()
{
From 1bf922770ed6ae9427b9ef10df5217f2381c00cc Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 2 Apr 2020 13:58:35 +0300
Subject: [PATCH 30/39] Added outline core specific project
---
Outline.Core/Assets/Examples.meta | 8 +
.../Assets/Examples/SimplePerCamera.meta | 8 +
.../Examples/SimplePerCamera/Outline.unity | 586 ++++++++++++++++++
.../SimplePerCamera/Outline.unity.meta | 9 +
.../SimplePerCamera/OutlineEffectBuilder.cs | 88 +++
.../OutlineEffectBuilder.cs.meta | 13 +
.../SimplePerCamera/TestOutlineLayers.asset | 43 ++
.../TestOutlineLayers.asset.meta | 10 +
.../Assets/Examples/SimplePerObject.meta | 8 +
.../SimplePerObject/TestOutlineSettings.asset | 18 +
.../TestOutlineSettings.asset.meta | 8 +
Outline.Core/Assets/Tests.meta | 8 +
Outline.Core/Assets/Tests/Editor.meta | 8 +
Outline.Core/Assets/Tests/Editor/Scripts.meta | 8 +
.../Assets/Tests/Editor/Scripts/Helpers.meta | 8 +
.../Helpers/IOutlineSettingsExTests.cs | 98 +++
.../Helpers/IOutlineSettingsExTests.cs.meta | 11 +
.../Scripts/Helpers/IOutlineSettingsTests.cs | 195 ++++++
.../Helpers/IOutlineSettingsTests.cs.meta | 11 +
.../Editor/Scripts/OutlineBehaviourTests.cs | 33 +
.../Scripts/OutlineBehaviourTests.cs.meta | 11 +
.../Scripts/OutlineLayerCollectionTests.cs | 164 +++++
.../OutlineLayerCollectionTests.cs.meta | 11 +
.../Tests/Editor/Scripts/OutlineLayerTests.cs | 117 ++++
.../Editor/Scripts/OutlineLayerTests.cs.meta | 11 +
.../Editor/Scripts/OutlineRendererTests.cs | 47 ++
.../Scripts/OutlineRendererTests.cs.meta | 11 +
.../Editor/Scripts/OutlineSettingsTests.cs | 32 +
.../Scripts/OutlineSettingsTests.cs.meta | 11 +
.../Packages/UnityFx.Outline/CHANGELOG.md | 106 ++++
.../UnityFx.Outline/CHANGELOG.md.meta | 7 +
.../Packages/UnityFx.Outline/Editor.meta | 10 +
.../UnityFx.Outline/Editor/Scripts.meta | 10 +
.../Editor/Scripts/OutlineBehaviourEditor.cs | 84 +++
.../Scripts/OutlineBehaviourEditor.cs.meta | 13 +
.../Editor/Scripts/OutlineEditorUtility.cs | 201 ++++++
.../Scripts/OutlineEditorUtility.cs.meta | 11 +
.../Editor/Scripts/OutlineEffectEditor.cs | 59 ++
.../Scripts/OutlineEffectEditor.cs.meta | 13 +
.../Scripts/OutlineLayerCollectionEditor.cs | 121 ++++
.../OutlineLayerCollectionEditor.cs.meta | 11 +
.../Editor/Scripts/OutlineSettingsEditor.cs | 33 +
.../Scripts/OutlineSettingsEditor.cs.meta | 11 +
.../Editor/UnityFx.Outline.Editor.asmdef | 16 +
.../Editor/UnityFx.Outline.Editor.asmdef.meta | 9 +
.../Packages/UnityFx.Outline/README.md | 11 +
.../Packages/UnityFx.Outline/README.md.meta | 9 +
.../Packages/UnityFx.Outline/Runtime.meta | 10 +
.../UnityFx.Outline/Runtime/Prefabs.meta | 8 +
.../Runtime/Prefabs/OutlineResources.asset | 16 +
.../Prefabs/OutlineResources.asset.meta | 10 +
.../UnityFx.Outline/Runtime/Scripts.meta | 8 +
.../Runtime/Scripts/IOutlineSettings.cs | 45 ++
.../Runtime/Scripts/IOutlineSettings.cs.meta | 11 +
.../Runtime/Scripts/IOutlineSettingsEx.cs | 19 +
.../Scripts/IOutlineSettingsEx.cs.meta | 11 +
.../Runtime/Scripts/OutlineBehaviour.cs | 372 +++++++++++
.../Runtime/Scripts/OutlineBehaviour.cs.meta | 15 +
.../Runtime/Scripts/OutlineEffect.cs | 240 +++++++
.../Runtime/Scripts/OutlineEffect.cs.meta | 15 +
.../Runtime/Scripts/OutlineLayer.cs | 494 +++++++++++++++
.../Runtime/Scripts/OutlineLayer.cs.meta | 13 +
.../Runtime/Scripts/OutlineLayerCollection.cs | 291 +++++++++
.../Scripts/OutlineLayerCollection.cs.meta | 13 +
.../Runtime/Scripts/OutlineRenderFlags.cs | 29 +
.../Scripts/OutlineRenderFlags.cs.meta | 11 +
.../Runtime/Scripts/OutlineRenderer.cs | 493 +++++++++++++++
.../Runtime/Scripts/OutlineRenderer.cs.meta | 13 +
.../Scripts/OutlineRendererCollection.cs | 146 +++++
.../Scripts/OutlineRendererCollection.cs.meta | 11 +
.../Runtime/Scripts/OutlineResources.cs | 234 +++++++
.../Runtime/Scripts/OutlineResources.cs.meta | 14 +
.../Runtime/Scripts/OutlineSettings.cs | 128 ++++
.../Runtime/Scripts/OutlineSettings.cs.meta | 11 +
.../Scripts/OutlineSettingsInstance.cs | 178 ++++++
.../Scripts/OutlineSettingsInstance.cs.meta | 11 +
.../Runtime/Scripts/Properties.meta | 8 +
.../Scripts/Properties/AssemblyInfo.cs | 29 +
.../Scripts/Properties/AssemblyInfo.cs.meta | 11 +
.../UnityFx.Outline/Runtime/Shaders.meta | 10 +
.../Runtime/Shaders/OutlinePass1.shader | 69 +++
.../Runtime/Shaders/OutlinePass1.shader.meta | 10 +
.../Runtime/Shaders/OutlinePass2.shader | 83 +++
.../Runtime/Shaders/OutlinePass2.shader.meta | 8 +
.../Runtime/Shaders/OutlineRenderColor.shader | 43 ++
.../Shaders/OutlineRenderColor.shader.meta | 10 +
.../Runtime/UnityFx.Outline.asmdef | 3 +
.../Runtime/UnityFx.Outline.asmdef.meta | 9 +
.../Packages/UnityFx.Outline/package.json | 27 +
.../UnityFx.Outline/package.json.meta | 9 +
Outline.Core/Packages/manifest.json | 35 ++
91 files changed, 5563 insertions(+)
create mode 100644 Outline.Core/Assets/Examples.meta
create mode 100644 Outline.Core/Assets/Examples/SimplePerCamera.meta
create mode 100644 Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity
create mode 100644 Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity.meta
create mode 100644 Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs
create mode 100644 Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta
create mode 100644 Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset
create mode 100644 Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta
create mode 100644 Outline.Core/Assets/Examples/SimplePerObject.meta
create mode 100644 Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
create mode 100644 Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta
create mode 100644 Outline.Core/Assets/Tests.meta
create mode 100644 Outline.Core/Assets/Tests/Editor.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/Helpers.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs.meta
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs
create mode 100644 Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md
create mode 100644 Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/README.md
create mode 100644 Outline.Core/Packages/UnityFx.Outline/README.md.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef
create mode 100644 Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta
create mode 100644 Outline.Core/Packages/UnityFx.Outline/package.json
create mode 100644 Outline.Core/Packages/UnityFx.Outline/package.json.meta
create mode 100644 Outline.Core/Packages/manifest.json
diff --git a/Outline.Core/Assets/Examples.meta b/Outline.Core/Assets/Examples.meta
new file mode 100644
index 0000000..040f581
--- /dev/null
+++ b/Outline.Core/Assets/Examples.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cd9a1f8eda7b3ae4da8c3a27817dae4e
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Examples/SimplePerCamera.meta b/Outline.Core/Assets/Examples/SimplePerCamera.meta
new file mode 100644
index 0000000..31b3630
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerCamera.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 874c6e35dd593604d9dc8bf919bc94d7
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity b/Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity
new file mode 100644
index 0000000..c172ec7
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity
@@ -0,0 +1,586 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!29 &1
+OcclusionCullingSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_OcclusionBakeSettings:
+ smallestOccluder: 5
+ smallestHole: 0.25
+ backfaceThreshold: 100
+ m_SceneGUID: 00000000000000000000000000000000
+ m_OcclusionCullingData: {fileID: 0}
+--- !u!104 &2
+RenderSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 9
+ m_Fog: 0
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+ m_FogMode: 3
+ m_FogDensity: 0.01
+ m_LinearFogStart: 0
+ m_LinearFogEnd: 300
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
+ m_AmbientIntensity: 1
+ m_AmbientMode: 0
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
+ m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
+ m_HaloStrength: 0.5
+ m_FlareStrength: 1
+ m_FlareFadeSpeed: 3
+ m_HaloTexture: {fileID: 0}
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
+ m_DefaultReflectionMode: 0
+ m_DefaultReflectionResolution: 128
+ m_ReflectionBounces: 1
+ m_ReflectionIntensity: 1
+ m_CustomReflection: {fileID: 0}
+ m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
+ m_UseRadianceAmbientProbe: 0
+--- !u!157 &3
+LightmapSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 11
+ m_GIWorkflowMode: 0
+ m_GISettings:
+ serializedVersion: 2
+ m_BounceScale: 1
+ m_IndirectOutputScale: 1
+ m_AlbedoBoost: 1
+ m_EnvironmentLightingMode: 0
+ m_EnableBakedLightmaps: 1
+ m_EnableRealtimeLightmaps: 1
+ m_LightmapEditorSettings:
+ serializedVersion: 10
+ m_Resolution: 2
+ m_BakeResolution: 40
+ m_AtlasSize: 1024
+ m_AO: 0
+ m_AOMaxDistance: 1
+ m_CompAOExponent: 1
+ m_CompAOExponentDirect: 0
+ m_Padding: 2
+ m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
+ m_TextureCompression: 1
+ m_FinalGather: 0
+ m_FinalGatherFiltering: 1
+ m_FinalGatherRayCount: 256
+ m_ReflectionCompression: 2
+ m_MixedBakeMode: 2
+ m_BakeBackend: 0
+ m_PVRSampling: 1
+ m_PVRDirectSampleCount: 32
+ m_PVRSampleCount: 500
+ m_PVRBounces: 2
+ m_PVRFilterTypeDirect: 0
+ m_PVRFilterTypeIndirect: 0
+ m_PVRFilterTypeAO: 0
+ m_PVRFilteringMode: 1
+ m_PVRCulling: 1
+ m_PVRFilteringGaussRadiusDirect: 1
+ m_PVRFilteringGaussRadiusIndirect: 5
+ m_PVRFilteringGaussRadiusAO: 2
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
+ m_PVRFilteringAtrousPositionSigmaAO: 1
+ m_ShowResolutionOverlay: 1
+ m_LightingDataAsset: {fileID: 0}
+ m_UseShadowmask: 1
+--- !u!196 &4
+NavMeshSettings:
+ serializedVersion: 2
+ m_ObjectHideFlags: 0
+ m_BuildSettings:
+ serializedVersion: 2
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.4
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ debug:
+ m_Flags: 0
+ m_NavMeshData: {fileID: 0}
+--- !u!1 &167171210
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 167171212}
+ - component: {fileID: 167171211}
+ m_Layer: 0
+ m_Name: Directional Light
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!108 &167171211
+Light:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 167171210}
+ m_Enabled: 1
+ serializedVersion: 8
+ m_Type: 1
+ m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
+ m_Intensity: 0.5
+ m_Range: 10
+ m_SpotAngle: 30
+ m_CookieSize: 10
+ m_Shadows:
+ m_Type: 2
+ m_Resolution: -1
+ m_CustomResolution: -1
+ m_Strength: 1
+ m_Bias: 0.05
+ m_NormalBias: 0.4
+ m_NearPlane: 0.2
+ m_Cookie: {fileID: 0}
+ m_DrawHalo: 0
+ m_Flare: {fileID: 0}
+ m_RenderMode: 0
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_Lightmapping: 4
+ m_LightShadowCasterMode: 0
+ m_AreaSize: {x: 1, y: 1}
+ m_BounceIntensity: 1
+ m_ColorTemperature: 6570
+ m_UseColorTemperature: 0
+ m_ShadowRadius: 0
+ m_ShadowAngle: 0
+--- !u!4 &167171212
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 167171210}
+ m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
+ m_LocalPosition: {x: 0, y: 3, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
+--- !u!1 &692811812
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 692811816}
+ - component: {fileID: 692811815}
+ - component: {fileID: 692811818}
+ - component: {fileID: 692811817}
+ m_Layer: 0
+ m_Name: Main Camera
+ m_TagString: MainCamera
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!20 &692811815
+Camera:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 692811812}
+ m_Enabled: 1
+ serializedVersion: 2
+ m_ClearFlags: 1
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
+ m_projectionMatrixMode: 1
+ m_SensorSize: {x: 36, y: 24}
+ m_LensShift: {x: 0, y: 0}
+ m_GateFitMode: 2
+ m_FocalLength: 50
+ m_NormalizedViewPortRect:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ near clip plane: 0.3
+ far clip plane: 1000
+ field of view: 60
+ orthographic: 0
+ orthographic size: 5
+ m_Depth: -1
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_RenderingPath: -1
+ m_TargetTexture: {fileID: 0}
+ m_TargetDisplay: 0
+ m_TargetEye: 3
+ m_HDR: 1
+ m_AllowMSAA: 1
+ m_AllowDynamicResolution: 0
+ m_ForceIntoRT: 0
+ m_OcclusionCulling: 1
+ m_StereoConvergence: 10
+ m_StereoSeparation: 0.022
+--- !u!4 &692811816
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 692811812}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 1, z: -10}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 1579373806}
+ - {fileID: 748173443}
+ - {fileID: 1789341921}
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &692811817
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 692811812}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5a318c96b1bc1614683eccf7abd717a1, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ _outlineGos:
+ - {fileID: 1579373802}
+ - {fileID: 748173439}
+--- !u!114 &692811818
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 692811812}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 270d3185d159bf54fb4cddbb42235437, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
+ _outlineLayers: {fileID: 11400000, guid: 3a6c3b3c5f6e3ad4ab8e09fc219865bd, type: 2}
+ _cameraEvent: 18
+--- !u!1 &748173439
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 748173443}
+ - component: {fileID: 748173442}
+ - component: {fileID: 748173441}
+ - component: {fileID: 748173440}
+ m_Layer: 0
+ m_Name: Cube
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!23 &748173440
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 1
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 0
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+--- !u!65 &748173441
+BoxCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ serializedVersion: 2
+ m_Size: {x: 1, y: 1, z: 1}
+ m_Center: {x: 0, y: 0, z: 0}
+--- !u!33 &748173442
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!4 &748173443
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -1, y: 0, z: 5.58}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 692811816}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1579373802
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1579373806}
+ - component: {fileID: 1579373805}
+ - component: {fileID: 1579373804}
+ - component: {fileID: 1579373803}
+ m_Layer: 0
+ m_Name: Sphere
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!23 &1579373803
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 1
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 0
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+--- !u!135 &1579373804
+SphereCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ serializedVersion: 2
+ m_Radius: 0.5
+ m_Center: {x: 0, y: 0, z: 0}
+--- !u!33 &1579373805
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!4 &1579373806
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 4}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 692811816}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1789341920
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1789341921}
+ - component: {fileID: 1789341925}
+ - component: {fileID: 1789341924}
+ - component: {fileID: 1789341923}
+ - component: {fileID: 1789341922}
+ m_Layer: 0
+ m_Name: Cylinder
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1789341921
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 1.5, y: 0, z: 4}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 692811816}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &1789341922
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 271c580db5fd384429cdac899152e9e0, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
+ _outlineSettings:
+ _outlineSettings: {fileID: 0}
+ _outlineColor: {r: 0, g: 1, b: 0, a: 1}
+ _outlineWidth: 15
+ _outlineIntensity: 2
+ _outlineMode: 1
+ _depthTestEnabled: 0
+--- !u!23 &1789341923
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 1
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 0
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+--- !u!136 &1789341924
+CapsuleCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ m_Radius: 0.5
+ m_Height: 2
+ m_Direction: 1
+ m_Center: {x: 0, y: 0, z: 0}
+--- !u!33 &1789341925
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
diff --git a/Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity.meta b/Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity.meta
new file mode 100644
index 0000000..bb769c6
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: e1f1f5e7ceb61b746b9f2016f0e53a93
+timeCreated: 1566127107
+licenseType: Free
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs b/Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs
new file mode 100644
index 0000000..444b39c
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs
@@ -0,0 +1,88 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+
+namespace UnityFx.Outline.Examples
+{
+ ///
+ /// Helperr class for managing outlines from editor.
+ ///
+ [RequireComponent(typeof(OutlineEffect))]
+ public class OutlineEffectBuilder : MonoBehaviour
+ {
+ #region data
+
+#pragma warning disable 0649
+
+ [SerializeField]
+ private GameObject[] _outlineGos;
+
+#pragma warning restore 0649
+
+ private OutlineEffect _outlineEffect;
+ private OutlineLayer _outlineLayer;
+
+ #endregion
+
+ #region MonoBehaviour
+
+ private void Awake()
+ {
+ if (_outlineEffect == null)
+ {
+ _outlineEffect = GetComponent();
+ }
+
+ if (_outlineLayer == null)
+ {
+ if (_outlineEffect.OutlineLayers.Count > 0)
+ {
+ _outlineLayer = _outlineEffect.OutlineLayers[0];
+ }
+ else
+ {
+ _outlineLayer = new OutlineLayer();
+ _outlineEffect.OutlineLayers.Add(_outlineLayer);
+ }
+ }
+
+ foreach (var go in _outlineGos)
+ {
+ if (go)
+ {
+ _outlineLayer.Add(go);
+ }
+ }
+ }
+
+ private void OnValidate()
+ {
+ if (_outlineEffect == null)
+ {
+ _outlineEffect = GetComponent();
+ }
+
+ if (_outlineEffect.OutlineLayers.Count > 0)
+ {
+ _outlineLayer = _outlineEffect.OutlineLayers[0];
+ }
+ else
+ {
+ _outlineLayer = new OutlineLayer();
+ _outlineEffect.OutlineLayers.Add(_outlineLayer);
+ }
+
+ foreach (var go in _outlineGos)
+ {
+ if (go)
+ {
+ _outlineLayer.Add(go);
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta b/Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta
new file mode 100644
index 0000000..7150935
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 5a318c96b1bc1614683eccf7abd717a1
+timeCreated: 1566138009
+licenseType: Free
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset b/Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset
new file mode 100644
index 0000000..3de703c
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset
@@ -0,0 +1,43 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 57d0c11168277cf4eb3b4b89706e6aa5, type: 3}
+ m_Name: TestOutlineLayers
+ m_EditorClassIdentifier:
+ _layers:
+ - _settings:
+ _outlineSettings: {fileID: 11400000, guid: 45705bbb29366194eb01ca517d80967c,
+ type: 2}
+ _outlineColor: {r: 1, g: 0, b: 0, a: 1}
+ _outlineWidth: 5
+ _outlineIntensity: 2
+ _outlineMode: 0
+ _name:
+ _zOrder: 0
+ _enabled: 1
+ - _settings:
+ _outlineSettings: {fileID: 0}
+ _outlineColor: {r: 1, g: 1, b: 0, a: 1}
+ _outlineWidth: 15
+ _outlineIntensity: 2
+ _outlineMode: 1
+ _name:
+ _zOrder: 0
+ _enabled: 1
+ - _settings:
+ _outlineSettings: {fileID: 0}
+ _outlineColor: {r: 1, g: 0, b: 1, a: 1}
+ _outlineWidth: 4
+ _outlineIntensity: 2
+ _outlineMode: 0
+ _name:
+ _zOrder: 0
+ _enabled: 1
diff --git a/Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta b/Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta
new file mode 100644
index 0000000..354a62d
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 3a6c3b3c5f6e3ad4ab8e09fc219865bd
+timeCreated: 1566565181
+licenseType: Pro
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Examples/SimplePerObject.meta b/Outline.Core/Assets/Examples/SimplePerObject.meta
new file mode 100644
index 0000000..9c27014
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerObject.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: dc9211a2b55b6d44098fcc852d15936c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset b/Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
new file mode 100644
index 0000000..a32e433
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
@@ -0,0 +1,18 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: b579424fd3338724cba3155ee4d53475, type: 3}
+ m_Name: TestOutlineSettings
+ m_EditorClassIdentifier:
+ _outlineColor: {r: 1, g: 0, b: 0, a: 1}
+ _outlineWidth: 5
+ _outlineIntensity: 1
+ _outlineMode: 0
diff --git a/Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta b/Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta
new file mode 100644
index 0000000..253e14e
--- /dev/null
+++ b/Outline.Core/Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 45705bbb29366194eb01ca517d80967c
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests.meta b/Outline.Core/Assets/Tests.meta
new file mode 100644
index 0000000..ac6bd9e
--- /dev/null
+++ b/Outline.Core/Assets/Tests.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9c2f662256b33974c94b1b56640a7397
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor.meta b/Outline.Core/Assets/Tests/Editor.meta
new file mode 100644
index 0000000..f2ff48e
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f2ad07e44abb5204aa73321dbeb58ddd
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts.meta b/Outline.Core/Assets/Tests/Editor/Scripts.meta
new file mode 100644
index 0000000..f055344
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0678297c303e4104896b2beec616a514
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/Helpers.meta b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers.meta
new file mode 100644
index 0000000..75cfe48
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ecd2c4203d2dee74389ff168d633fe3a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
new file mode 100644
index 0000000..af05396
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
@@ -0,0 +1,98 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.ComponentModel;
+using UnityEngine;
+using UnityEngine.TestTools;
+using NUnit.Framework;
+
+namespace UnityFx.Outline
+{
+ public abstract class IOutlineSettingsExTests : IOutlineSettingsTests
+ {
+ private IOutlineSettingsEx _settings;
+ private IChangeTracking _changeTracking;
+
+ protected void Init(IOutlineSettingsEx settings)
+ {
+ _settings = settings;
+ _changeTracking = settings as IChangeTracking;
+ base.Init(settings);
+ }
+
+ [Test]
+ public void OutlineSettings_SetsValue()
+ {
+ var settings = ScriptableObject.CreateInstance();
+
+ try
+ {
+ _settings.OutlineSettings = settings;
+
+ Assert.AreEqual(settings, _settings.OutlineSettings);
+
+ _settings.OutlineSettings = null;
+
+ Assert.IsNull(_settings.OutlineSettings);
+ }
+ finally
+ {
+ UnityEngine.Object.DestroyImmediate(settings);
+ }
+ }
+
+ [Test]
+ public void OutlineSettings_SetsChanged()
+ {
+ if (_changeTracking != null)
+ {
+ var settings = ScriptableObject.CreateInstance();
+
+ try
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineSettings = settings;
+
+ Assert.IsTrue(_changeTracking.IsChanged);
+ }
+ finally
+ {
+ UnityEngine.Object.DestroyImmediate(settings);
+ }
+ }
+ }
+
+ [Test]
+ public void OutlineSettings_DoesNotSetsChangedOnSameValue()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineSettings = _settings.OutlineSettings;
+
+ Assert.IsFalse(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineSettings_MakesOtherSettersThrow()
+ {
+ var settings = ScriptableObject.CreateInstance();
+
+ try
+ {
+ _settings.OutlineSettings = settings;
+
+ Assert.Throws(() => _settings.OutlineColor = Color.blue);
+ Assert.Throws(() => _settings.OutlineWidth = 12);
+ Assert.Throws(() => _settings.OutlineRenderMode = OutlineRenderFlags.Blurred);
+ Assert.Throws(() => _settings.OutlineIntensity = 17);
+ }
+ finally
+ {
+ UnityEngine.Object.DestroyImmediate(settings);
+ }
+ }
+ }
+}
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta
new file mode 100644
index 0000000..eacde42
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c7d2cd56d59228e40917059e616e5ee9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
new file mode 100644
index 0000000..55a2687
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
@@ -0,0 +1,195 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.ComponentModel;
+using UnityEngine;
+using UnityEngine.TestTools;
+using NUnit.Framework;
+
+namespace UnityFx.Outline
+{
+ public abstract class IOutlineSettingsTests
+ {
+ private IOutlineSettings _settings;
+ private IChangeTracking _changeTracking;
+
+ protected void Init(IOutlineSettings settings)
+ {
+ _settings = settings;
+ _changeTracking = settings as IChangeTracking;
+ }
+
+ [Test]
+ public void OutlineColor_SetsValue()
+ {
+ var color = Color.blue;
+ _settings.OutlineColor = color;
+
+ Assert.AreEqual(color, _settings.OutlineColor);
+ }
+
+ [Test]
+ public void OutlineColor_SetsChanged()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineColor = Color.blue;
+
+ Assert.IsTrue(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineColor_DoesNotSetsChangedOnSameValue()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineColor = _settings.OutlineColor;
+
+ Assert.IsFalse(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineWidth_DefaultValueIsValid()
+ {
+ Assert.LessOrEqual(OutlineRenderer.MinWidth, _settings.OutlineWidth);
+ Assert.GreaterOrEqual(OutlineRenderer.MaxWidth, _settings.OutlineWidth);
+ }
+
+ [Test]
+ public void OutlineWidth_SetsValue()
+ {
+ var width = UnityEngine.Random.Range(OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
+ _settings.OutlineWidth = width;
+
+ Assert.AreEqual(width, _settings.OutlineWidth);
+ }
+
+ [Test]
+ public void OutlineWidth_ClampsValue()
+ {
+ _settings.OutlineWidth = 1000;
+
+ Assert.AreEqual(OutlineRenderer.MaxWidth, _settings.OutlineWidth);
+
+ _settings.OutlineWidth = -1000;
+
+ Assert.AreEqual(OutlineRenderer.MinWidth, _settings.OutlineWidth);
+ }
+
+ [Test]
+ public void OutlineWidth_SetsChanged()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineWidth = 10;
+
+ Assert.IsTrue(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineWidth_DoesNotSetsChangedOnSameValue()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineWidth = _settings.OutlineWidth;
+
+ Assert.IsFalse(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineMode_SetsValue()
+ {
+ _settings.OutlineRenderMode = OutlineRenderFlags.Blurred;
+ Assert.AreEqual(OutlineRenderFlags.Blurred, _settings.OutlineRenderMode);
+
+ _settings.OutlineRenderMode = OutlineRenderFlags.Solid;
+ Assert.AreEqual(OutlineRenderFlags.Solid, _settings.OutlineRenderMode);
+ }
+
+ [Test]
+ public void OutlineMode_SetsChanged()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineRenderMode = OutlineRenderFlags.Blurred;
+
+ Assert.IsTrue(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineMode_DoesNotSetsChangedOnSameValue()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineRenderMode = _settings.OutlineRenderMode;
+
+ Assert.IsFalse(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineIntensity_DefaultValueIsValid()
+ {
+ Assert.LessOrEqual(OutlineRenderer.MinIntensity, _settings.OutlineIntensity);
+ Assert.GreaterOrEqual(OutlineRenderer.MaxIntensity, _settings.OutlineIntensity);
+ }
+
+ [Test]
+ public void OutlineIntensity_SetsValue()
+ {
+ var intensity = UnityEngine.Random.Range(OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
+
+ _settings.OutlineIntensity = intensity;
+
+ Assert.AreEqual(intensity, _settings.OutlineIntensity);
+ }
+
+ [Test]
+ public void OutlineIntensity_ClampsValue()
+ {
+ _settings.OutlineIntensity = 1000;
+
+ Assert.AreEqual(OutlineRenderer.MaxIntensity, _settings.OutlineIntensity);
+
+ _settings.OutlineIntensity = -1000;
+
+ Assert.AreEqual(OutlineRenderer.MinIntensity, _settings.OutlineIntensity);
+ }
+
+ [Test]
+ public void OutlineIntensity_SetsChanged()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineIntensity = 21;
+
+ Assert.IsTrue(_changeTracking.IsChanged);
+ }
+ }
+
+ [Test]
+ public void OutlineIntensity_DoesNotSetsChangedOnSameValue()
+ {
+ if (_changeTracking != null)
+ {
+ _changeTracking.AcceptChanges();
+ _settings.OutlineIntensity = _settings.OutlineIntensity;
+
+ Assert.IsFalse(_changeTracking.IsChanged);
+ }
+ }
+ }
+}
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta
new file mode 100644
index 0000000..57016ed
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 504f7cf5606c25a4a8eeea06598d8cd0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs
new file mode 100644
index 0000000..02c4202
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs
@@ -0,0 +1,33 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.TestTools;
+using NUnit.Framework;
+
+namespace UnityFx.Outline
+{
+ [Category("OutlineBehaviour"), TestOf(typeof(OutlineBehaviour))]
+ public class OutlineBehaviourTests : IOutlineSettingsExTests, IDisposable
+ {
+ private GameObject _go;
+ private OutlineBehaviour _outlineEffect;
+
+ [SetUp]
+ public void Init()
+ {
+ _go = new GameObject();
+ _outlineEffect = _go.AddComponent();
+ Init(_outlineEffect);
+ }
+
+ [TearDown]
+ public void Dispose()
+ {
+ UnityEngine.Object.DestroyImmediate(_go);
+ }
+ }
+}
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta
new file mode 100644
index 0000000..34a74f0
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f7ff33caf6306d649ab2176f29f193d6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
new file mode 100644
index 0000000..fc19adb
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
@@ -0,0 +1,164 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.TestTools;
+using NUnit.Framework;
+
+namespace UnityFx.Outline
+{
+ [Category("OutlineLayerCollection"), TestOf(typeof(OutlineLayerCollection))]
+ public class OutlineLayerCollectionTests : IDisposable
+ {
+ private OutlineLayerCollection _layerCollection;
+
+ [SetUp]
+ public void Init()
+ {
+ _layerCollection = ScriptableObject.CreateInstance();
+ }
+
+ [TearDown]
+ public void Dispose()
+ {
+ UnityEngine.Object.DestroyImmediate(_layerCollection);
+ }
+
+ [Test]
+ public void DefaultStateIsValid()
+ {
+ Assert.IsFalse(_layerCollection.IsReadOnly);
+ Assert.IsEmpty(_layerCollection);
+ Assert.Zero(_layerCollection.Count);
+ }
+
+ [Test]
+ public void Add_ThrowsIfArgumentIsNull()
+ {
+ Assert.Throws(() => _layerCollection.Add(null));
+ }
+
+ [Test]
+ public void Add_ThrowsIfLayerBelongsToAnotherCollection()
+ {
+ var anotherLayerCollection = ScriptableObject.CreateInstance();
+ var layer = new OutlineLayer();
+
+ try
+ {
+ anotherLayerCollection.Add(layer);
+ Assert.Throws(() => _layerCollection.Add(layer));
+ }
+ finally
+ {
+ UnityEngine.Object.DestroyImmediate(anotherLayerCollection);
+ }
+ }
+
+ [Test]
+ public void Add_SetsCount()
+ {
+ _layerCollection.Add(new OutlineLayer());
+
+ Assert.AreEqual(1, _layerCollection.Count);
+ }
+
+ [Test]
+ public void Insert_ThrowsIfArgumentIsNull()
+ {
+ Assert.Throws(() => _layerCollection.Insert(0, null));
+ }
+
+ [Test]
+ public void Insert_ThrowsIfLayerBelongsToAnotherCollection()
+ {
+ var anotherLayerCollection = ScriptableObject.CreateInstance();
+ var layer = new OutlineLayer();
+
+ try
+ {
+ anotherLayerCollection.Add(layer);
+ Assert.Throws(() => _layerCollection.Insert(0, layer));
+ }
+ finally
+ {
+ UnityEngine.Object.DestroyImmediate(anotherLayerCollection);
+ }
+ }
+
+ [Test]
+ public void Insert_SetsCount()
+ {
+ _layerCollection.Insert(0, new OutlineLayer());
+
+ Assert.AreEqual(1, _layerCollection.Count);
+ }
+
+ [Test]
+ public void Remove_DoesNotThrowOnNullArgument()
+ {
+ Assert.DoesNotThrow(() => _layerCollection.Remove(null));
+ }
+
+ [Test]
+ public void Remove_SetsCount()
+ {
+ var layer = new OutlineLayer();
+
+ _layerCollection.Add(layer);
+ _layerCollection.Remove(layer);
+
+ Assert.Zero(_layerCollection.Count);
+ }
+
+ [Test]
+ public void Clear_ResetsCount()
+ {
+ _layerCollection.Add(new OutlineLayer());
+ _layerCollection.Clear();
+
+ Assert.Zero(_layerCollection.Count);
+ }
+
+ [Test]
+ public void Contains_DoesNotThrowIfArgumentIsNull()
+ {
+ _layerCollection.Contains(null);
+ }
+
+ [Test]
+ public void Contains_SearchesArgument()
+ {
+ var layer = new OutlineLayer();
+
+ Assert.IsFalse(_layerCollection.Contains(layer));
+
+ _layerCollection.Add(layer);
+
+ Assert.IsTrue(_layerCollection.Contains(layer));
+ }
+
+ [Test]
+ public void SortedLayers_IsSortedByPriority()
+ {
+ var layer1 = new OutlineLayer()
+ {
+ Priority = 2
+ };
+
+ var layer2 = new OutlineLayer();
+ var layer3 = new OutlineLayer();
+
+ _layerCollection.Add(layer1);
+ _layerCollection.Add(layer2);
+ _layerCollection.Add(layer3);
+
+ Assert.AreEqual(layer2, _layerCollection.SortedLayers[0]);
+ Assert.AreEqual(layer3, _layerCollection.SortedLayers[1]);
+ Assert.AreEqual(layer1, _layerCollection.SortedLayers[2]);
+ }
+ }
+}
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta
new file mode 100644
index 0000000..d67e736
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4a6e8c8f29227c2469990a6168c53b3f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs
new file mode 100644
index 0000000..df639c6
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs
@@ -0,0 +1,117 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.TestTools;
+using NUnit.Framework;
+
+namespace UnityFx.Outline
+{
+ [Category("OutlineLayer"), TestOf(typeof(OutlineLayer))]
+ public class OutlineLayerTests : IOutlineSettingsExTests, IDisposable
+ {
+ private OutlineLayer _layer;
+
+ [SetUp]
+ public void Init()
+ {
+ _layer = new OutlineLayer("TestLayer");
+ Init(_layer);
+ }
+
+ [TearDown]
+ public void Dispose()
+ {
+ }
+
+ [Test]
+ public void DefaultStateIsValid()
+ {
+ Assert.IsFalse(_layer.IsReadOnly);
+ Assert.IsEmpty(_layer);
+ Assert.Zero(_layer.Count);
+ Assert.AreEqual("TestLayer", _layer.Name);
+ Assert.AreEqual(-1, _layer.Index);
+ }
+
+ [Test]
+ public void Add_ThrowsIfArgumentIsNull()
+ {
+ Assert.Throws(() => _layer.Add(null));
+ }
+
+ [Test]
+ public void Add_SetsCount()
+ {
+ _layer.Add(new GameObject());
+
+ Assert.AreEqual(1, _layer.Count);
+ }
+
+ [Test]
+ public void Add_FiltersRenderesByLayer()
+ {
+ var go = new GameObject("r1", typeof(MeshRenderer));
+ var go2 = new GameObject("r2", typeof(MeshRenderer));
+
+ go2.layer = LayerMask.NameToLayer("TransparentFX");
+ go2.transform.SetParent(go.transform, false);
+
+ ICollection r;
+
+ _layer.Add(go, "TransparentFX");
+ _layer.TryGetRenderers(go, out r);
+
+ Assert.AreEqual(1, r.Count);
+ Assert.IsTrue(r.Contains(go.GetComponent()));
+ Assert.IsFalse(r.Contains(go2.GetComponent()));
+ }
+
+ [Test]
+ public void Remove_DoesNotThrowOnNullArgument()
+ {
+ Assert.DoesNotThrow(() => _layer.Remove(null));
+ }
+
+ [Test]
+ public void Remove_SetsCount()
+ {
+ var go = new GameObject();
+
+ _layer.Add(go);
+ _layer.Remove(go);
+
+ Assert.Zero(_layer.Count);
+ }
+
+ [Test]
+ public void Clear_ResetsCount()
+ {
+ _layer.Add(new GameObject());
+ _layer.Clear();
+
+ Assert.Zero(_layer.Count);
+ }
+
+ [Test]
+ public void Contains_DoesNotThrowIfArgumentIsNull()
+ {
+ _layer.Contains(null);
+ }
+
+ [Test]
+ public void Contains_SearchesArgument()
+ {
+ var go = new GameObject();
+
+ Assert.IsFalse(_layer.Contains(go));
+
+ _layer.Add(go);
+
+ Assert.IsTrue(_layer.Contains(go));
+ }
+ }
+}
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs.meta b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs.meta
new file mode 100644
index 0000000..5f35914
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineLayerTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6372b061875e8a54bb7ca0dbf1bb3e4b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs
new file mode 100644
index 0000000..e4c83b0
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs
@@ -0,0 +1,47 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Rendering;
+using UnityEngine.TestTools;
+using NUnit.Framework;
+
+namespace UnityFx.Outline
+{
+ [Category("OutlineRenderer"), TestOf(typeof(OutlineRenderer))]
+ public class OutlineRendererTests : IDisposable
+ {
+ private CommandBuffer _commandBuffer;
+ private OutlineRenderer _renderer;
+
+ [SetUp]
+ public void Init()
+ {
+ _commandBuffer = new CommandBuffer();
+ _renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget);
+ }
+
+ [TearDown]
+ public void Dispose()
+ {
+ _commandBuffer.Dispose();
+ }
+
+ [Test]
+ public void Dispose_CanBeCalledMultipleTimes()
+ {
+ _renderer.Dispose();
+ _renderer.Dispose();
+ }
+
+ [Test]
+ public void RenderSingleObject_ThrowsIfNullArguments()
+ {
+ Assert.Throws(() => _renderer.Render(default(IList), null, null));
+ Assert.Throws(() => _renderer.Render(default(Renderer), null, null));
+ }
+ }
+}
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs.meta b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs.meta
new file mode 100644
index 0000000..dce56a7
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0c4dcc61e824b6f4f8805dbe543d2997
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs
new file mode 100644
index 0000000..e47efbe
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs
@@ -0,0 +1,32 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using UnityEngine;
+using UnityEngine.TestTools;
+using NUnit.Framework;
+
+namespace UnityFx.Outline
+{
+ [Category("OutlineSettings"), TestOf(typeof(OutlineSettings))]
+ public class OutlineSettingsTests : IOutlineSettingsTests, IDisposable
+ {
+ private OutlineSettings _settings;
+
+ [SetUp]
+ public void Init()
+ {
+ _settings = ScriptableObject.CreateInstance();
+ Init(_settings);
+ }
+
+ [TearDown]
+ public void Dispose()
+ {
+ UnityEngine.Object.DestroyImmediate(_settings);
+ }
+ }
+}
diff --git a/Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta
new file mode 100644
index 0000000..297e458
--- /dev/null
+++ b/Outline.Core/Assets/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ee681c20e65b7a34085cd5f07a0c03a5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md b/Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md
new file mode 100644
index 0000000..c7d442d
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md
@@ -0,0 +1,106 @@
+# UnityFx.Outline changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
+
+## [0.7.1] - 2020.01.28
+
+Bugfixes and project layout changes.
+
+### Fixed
+- Fixed `OutlineBehaviour` to allow changing its state while its `GameObject` is inactive.
+
+## [0.7.0] - 2019.11.26
+
+`MaterialPropertyBlock`-based rendering and [Unity Post-processing Stack v2](https://github.com/Unity-Technologies/PostProcessing/tree/v2) compatibility.
+
+### Added
+- Moved to for `MaterialPropertyBlock`-based rendering. This is in-line with Unity post-processing Stack and is more performant approach.
+- Significant optimizations made to `OutlineRenderer`.
+
+### Changed
+- `IOutlineSettings` now implements `IEquatable`.
+- Changed all outline shaders to use HLSL-based macros.
+- Modified all shaders to ignore MVP vertex transform to be compatible with the new rendering model.
+- Exposed rendering APIs for `OutlineLayer` and `OutlineLayerCollection`.
+
+### Fixed
+- Fixed `TiledGPUPerformanceWarning` on mobile targets.
+
+### Removed
+- Removed `OutlineMaterialSet` class. It is not used in `MaterialPropertyBlock`-based effect rendering.
+
+## [0.6.0] - 2019.09.26
+
+Quality of life improvements.
+
+### Added
+- Added `OutlineLayer.Enabled`.
+- Added `OutlineLayer.Name`.
+- Added possibility to change render order of layers via `OutlineLayer.Priority`.
+- Added possibility to edit renderers of an `OutlineLayer`.
+- Added possibility to alter `CameraEvent` used to render `OutlineEffect`.
+- Added more info to the `OutlineLayer` preview inspector.
+
+### Changed
+- `IOutilneSettings` setters now throw if overriden.
+
+### Fixed
+- Fixed `OutlineLayer.Add` not filtering renderers by the mask passed.
+
+## [0.5.0] - 2019.09.09
+
+Editor UI improvements and unit tests.
+
+### Added
+- Added `OutlineSettings`, that can be shared between dfferent `OutlineLayer` and `OutlineBehaviour` instances.
+- Added custom inspectors for `OutlineSettings`, `OutlineLayerCollection`.
+- Added undo/redo support to all custom inspectors.
+- Added unit-tests.
+
+### Changed
+- Improved inspectors for `OutlineBehaviour` and `OutlineEffect`.
+
+## [0.4.0] - 2019.08.31
+
+Blurred outlines.
+
+### Added
+- Added Gauss blurring to outlines.
+- Added outline mode parameter (possible values are `Solid` and `Blurred`).
+- Added outline intensity parameter (for blurred outlines only).
+- Added `IOutlineSettings` interface to make outline settings the same for `OutlineBehaviour` and `OutlineLayer`.
+- Added `OutlineMaterialSet` helper.
+
+### Changed
+- Changed solid outline to use Gauss sampling (to achieve smoother outlines).
+- Changed outline implementation to use different passed for horizontal and vertical sampling (to make algorithm complexity linear instead of quadric).
+
+### Fixed
+- Fixed an issue with `OutlineBehaviour` not rendering outlines if attached to a `GameObject` with no renderers.
+
+### Removed
+- Removed `OutlineResourceCache` class.
+
+## [0.3.0] - 2019.08.27
+
+### Added
+- Added support for sharing outline layers between `OutlineEffect` instances.
+- Added custom editors for `OutlineEffect` and `OutlineBehaviour`.
+- Added possibility to setup outline layers as `ScriptableObject` asset.
+
+### Fixed
+- Fixed profiler error 'BeginSample and EndSample count must match'.
+
+## [0.2.0] - 2019.08.19
+
+### Added
+- Added `OutlineBehaviour` for rendering per-object outlines.
+- Added `OutlineResources` to help initialize outline effects in runtime.
+- Added `OutlineRenderer` as low-level helper for outline rendering.
+
+## [0.1.0] - 2019.08.18
+
+### Added
+- Initial release.
+
diff --git a/Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md.meta b/Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md.meta
new file mode 100644
index 0000000..b191c07
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/CHANGELOG.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a0afeafc656ad714fbfb0e40dc4587e1
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor.meta b/Outline.Core/Packages/UnityFx.Outline/Editor.meta
new file mode 100644
index 0000000..c29e17b
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 155cf68da709a7a4da2ba665007263f2
+folderAsset: yes
+timeCreated: 1566558257
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts.meta b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts.meta
new file mode 100644
index 0000000..7da429c
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 15c9c665be3d06048bebd0e20ec2b173
+folderAsset: yes
+timeCreated: 1566558344
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
new file mode 100644
index 0000000..492498a
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
@@ -0,0 +1,84 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEditor;
+using UnityEditor.SceneManagement;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ [CustomEditor(typeof(OutlineBehaviour))]
+ public class OutlineBehaviourEditor : Editor
+ {
+ private OutlineBehaviour _effect;
+ private bool _debugOpened;
+ private bool _renderersOpened;
+ private bool _camerasOpened;
+
+ private void OnEnable()
+ {
+ _effect = (OutlineBehaviour)target;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ base.OnInspectorGUI();
+
+ // 1) Outline settings.
+ EditorGUI.BeginChangeCheck();
+
+ OutlineEditorUtility.Render(_effect, _effect);
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ EditorUtility.SetDirty(_effect.gameObject);
+
+ if (!EditorApplication.isPlayingOrWillChangePlaymode)
+ {
+ EditorSceneManager.MarkSceneDirty(_effect.gameObject.scene);
+ }
+ }
+
+ // 2) Renderers (read-only).
+ _renderersOpened = EditorGUILayout.Foldout(_renderersOpened, "Renderers", true);
+
+ if (_renderersOpened)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUI.indentLevel += 1;
+
+ var rendererNumber = 1;
+
+ foreach (var renderer in _effect.OutlineRenderers)
+ {
+ EditorGUILayout.ObjectField("#" + rendererNumber.ToString(), renderer, typeof(Renderer), true);
+ rendererNumber++;
+ }
+
+ EditorGUI.indentLevel -= 1;
+ EditorGUI.EndDisabledGroup();
+ }
+
+ // 3) Cameras (read-only).
+ _camerasOpened = EditorGUILayout.Foldout(_camerasOpened, "Cameras", true);
+
+ if (_camerasOpened)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUI.indentLevel += 1;
+
+ var cameraNumber = 1;
+
+ foreach (var camera in _effect.Cameras)
+ {
+ EditorGUILayout.ObjectField("#" + cameraNumber.ToString(), camera, typeof(Camera), true);
+ cameraNumber++;
+ }
+
+ EditorGUI.indentLevel -= 1;
+ EditorGUI.EndDisabledGroup();
+ }
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta
new file mode 100644
index 0000000..1c3d375
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: a6e77a9d499a86e4fbdc52a2977e774f
+timeCreated: 1566572433
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
new file mode 100644
index 0000000..3f82a55
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
@@ -0,0 +1,201 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ public static class OutlineEditorUtility
+ {
+ public static void RenderDivider(Color color, int thickness = 1, int padding = 5)
+ {
+ var r = EditorGUILayout.GetControlRect(GUILayout.Height(padding + thickness));
+
+ r.height = thickness;
+ r.y += padding / 2;
+ r.x -= 2;
+
+ EditorGUI.DrawRect(r, color);
+ }
+
+ public static void Render(IOutlineSettingsEx settings, UnityEngine.Object undoContext)
+ {
+ var obj = (OutlineSettings)EditorGUILayout.ObjectField("Outline Settings", settings.OutlineSettings, typeof(OutlineSettings), true);
+
+ if (settings.OutlineSettings != obj)
+ {
+ Undo.RecordObject(undoContext, "Settings");
+ settings.OutlineSettings = obj;
+ }
+
+ if (obj)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUI.indentLevel += 1;
+
+ Render((IOutlineSettings)settings, undoContext);
+
+ EditorGUILayout.HelpBox(string.Format("Outline settings are overriden with values from {0}.", obj.name), MessageType.Info, true);
+ EditorGUI.indentLevel -= 1;
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUI.indentLevel += 1;
+
+ Render((IOutlineSettings)settings, undoContext);
+
+ EditorGUI.indentLevel -= 1;
+ }
+ }
+
+ public static void Render(IOutlineSettings settings, UnityEngine.Object undoContext)
+ {
+ var color = EditorGUILayout.ColorField("Color", settings.OutlineColor);
+
+ if (settings.OutlineColor != color)
+ {
+ Undo.RecordObject(undoContext, "Color");
+ settings.OutlineColor = color;
+ }
+
+ var width = EditorGUILayout.IntSlider("Width", settings.OutlineWidth, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
+
+ if (settings.OutlineWidth != width)
+ {
+ Undo.RecordObject(undoContext, "Width");
+ settings.OutlineWidth = width;
+ }
+
+ var prevBlurred = (settings.OutlineRenderMode & OutlineRenderFlags.Blurred) != 0;
+ var blurred = EditorGUILayout.Toggle("Blurred", prevBlurred);
+
+ if (blurred)
+ {
+ EditorGUI.indentLevel += 1;
+
+ var i = EditorGUILayout.Slider("Blur Intensity", settings.OutlineIntensity, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
+
+ if (!Mathf.Approximately(settings.OutlineIntensity, i))
+ {
+ Undo.RecordObject(undoContext, "Blur Intensity");
+ settings.OutlineIntensity = i;
+ }
+
+ EditorGUI.indentLevel -= 1;
+ }
+
+ if (blurred != prevBlurred)
+ {
+ Undo.RecordObject(undoContext, "Blur");
+
+ if (blurred)
+ {
+ settings.OutlineRenderMode |= OutlineRenderFlags.Blurred;
+ }
+ else
+ {
+ settings.OutlineRenderMode &= ~OutlineRenderFlags.Blurred;
+ }
+ }
+
+ var prevDepthTestEnabled = (settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0;
+ var depthTestEnabled = EditorGUILayout.Toggle("Depth Test", prevDepthTestEnabled);
+
+ if (depthTestEnabled != prevDepthTestEnabled)
+ {
+ Undo.RecordObject(undoContext, "Depth Test");
+
+ if (depthTestEnabled)
+ {
+ settings.OutlineRenderMode |= OutlineRenderFlags.EnableDepthTesting;
+ }
+ else
+ {
+ settings.OutlineRenderMode &= ~OutlineRenderFlags.EnableDepthTesting;
+ }
+ }
+ }
+
+ public static void RenderPreview(OutlineLayer layer, int layerIndex, bool showObjects)
+ {
+ if (layer != null)
+ {
+ var goIndex = 1;
+
+ EditorGUILayout.BeginHorizontal();
+ EditorGUI.indentLevel += 1;
+ EditorGUILayout.PrefixLabel("Layer #" + layerIndex.ToString());
+ EditorGUI.indentLevel -= 1;
+
+ if (layer.Enabled)
+ {
+ EditorGUILayout.LabelField(layer.OutlineRenderMode == OutlineRenderFlags.Solid ? layer.OutlineRenderMode.ToString() : string.Format("Blurred ({0})", layer.OutlineIntensity), GUILayout.MaxWidth(70));
+ EditorGUILayout.IntField(layer.OutlineWidth, GUILayout.MaxWidth(100));
+ EditorGUILayout.ColorField(layer.OutlineColor, GUILayout.MinWidth(100));
+ }
+ else
+ {
+ EditorGUILayout.LabelField("Disabled.");
+ }
+
+ EditorGUILayout.EndHorizontal();
+
+ if (showObjects)
+ {
+ if (layer.Count > 0)
+ {
+ foreach (var go in layer)
+ {
+ EditorGUI.indentLevel += 2;
+ EditorGUILayout.ObjectField("#" + goIndex.ToString(), go, typeof(GameObject), true);
+ EditorGUI.indentLevel -= 2;
+
+ goIndex++;
+ }
+ }
+ else
+ {
+ EditorGUI.indentLevel += 2;
+ EditorGUILayout.LabelField("No objects.");
+ EditorGUI.indentLevel -= 2;
+ }
+ }
+ }
+ else
+ {
+ EditorGUILayout.BeginHorizontal();
+ EditorGUI.indentLevel += 1;
+ EditorGUILayout.PrefixLabel("Layer #" + layerIndex.ToString());
+ EditorGUI.indentLevel -= 1;
+ EditorGUILayout.LabelField("Null");
+ EditorGUILayout.EndHorizontal();
+ }
+ }
+
+ public static void RenderPreview(IList layers, bool showObjects)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+
+ if (layers.Count > 0)
+ {
+ for (var i = 0; i < layers.Count; ++i)
+ {
+ RenderPreview(layers[i], i, showObjects);
+ }
+ }
+ else
+ {
+ EditorGUI.indentLevel += 1;
+ EditorGUILayout.LabelField("No layers.");
+ EditorGUI.indentLevel -= 1;
+ }
+
+ EditorGUI.EndDisabledGroup();
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta
new file mode 100644
index 0000000..28953ac
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ba087138029b59d4bbdf0783db0e2606
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
new file mode 100644
index 0000000..fd4c904
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
@@ -0,0 +1,59 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using UnityEditor.SceneManagement;
+using UnityEngine.Rendering;
+
+namespace UnityFx.Outline
+{
+ [CustomEditor(typeof(OutlineEffect))]
+ public class OutlineEffectEditor : Editor
+ {
+ private OutlineEffect _effect;
+ private bool _debugOpened;
+ private bool _previewOpened;
+
+ private void OnEnable()
+ {
+ _effect = (OutlineEffect)target;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ base.OnInspectorGUI();
+
+ EditorGUI.BeginChangeCheck();
+ var e = (CameraEvent)EditorGUILayout.EnumPopup("Render Event", _effect.RenderEvent);
+
+ if (e != _effect.RenderEvent)
+ {
+ Undo.RecordObject(_effect, "Set Render Event");
+ _effect.RenderEvent = e;
+ }
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ EditorUtility.SetDirty(_effect.gameObject);
+
+ if (!EditorApplication.isPlayingOrWillChangePlaymode)
+ {
+ EditorSceneManager.MarkSceneDirty(_effect.gameObject.scene);
+ }
+ }
+
+ if (_effect.OutlineLayers.Count > 0)
+ {
+ _previewOpened = EditorGUILayout.Foldout(_previewOpened, "Preview", true);
+
+ if (_previewOpened)
+ {
+ OutlineEditorUtility.RenderPreview(_effect.OutlineLayers, true);
+ }
+ }
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta
new file mode 100644
index 0000000..4b3f6af
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 03c2e35bb52d2ba44882b92d7cde45bf
+timeCreated: 1566558360
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs
new file mode 100644
index 0000000..f0c57e0
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs
@@ -0,0 +1,121 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ [CustomEditor(typeof(OutlineLayerCollection))]
+ public class OutlineLayerCollectionEditor : Editor
+ {
+ private readonly GUILayoutOption _layerButtonStyle = GUILayout.ExpandWidth(false);
+ private OutlineLayerCollection _layers;
+
+ public override void OnInspectorGUI()
+ {
+ base.OnInspectorGUI();
+
+ EditorGUI.BeginChangeCheck();
+
+ var removeLayer = -1;
+
+ // 1) Layers list.
+ if (_layers.Count > 0)
+ {
+ for (var i = 0; i < _layers.Count; i++)
+ {
+ EditorGUILayout.Space();
+ OutlineEditorUtility.RenderDivider(Color.gray);
+
+ EditorGUILayout.BeginHorizontal();
+ var enabled = EditorGUILayout.ToggleLeft("Layer #" + i.ToString(), _layers[i].Enabled, EditorStyles.boldLabel);
+
+ if (enabled != _layers[i].Enabled)
+ {
+ if (enabled)
+ {
+ Undo.RecordObject(_layers, "Enable Layer");
+ }
+ else
+ {
+ Undo.RecordObject(_layers, "Disable Layer");
+ }
+
+ _layers[i].Enabled = enabled;
+ }
+
+ GUILayout.FlexibleSpace();
+
+ if (GUILayout.Button("Remove", _layerButtonStyle))
+ {
+ removeLayer = i;
+ }
+
+ EditorGUILayout.EndHorizontal();
+ EditorGUILayout.Space();
+
+ var name = EditorGUILayout.TextField("Layer Name", _layers[i].NameTag);
+
+ if (name != _layers[i].NameTag)
+ {
+ Undo.RecordObject(_layers, "Set Layer Name");
+ _layers[i].NameTag = name;
+ }
+
+ var priority = EditorGUILayout.IntField("Layer Priority", _layers[i].Priority);
+
+ if (priority != _layers[i].Priority)
+ {
+ Undo.RecordObject(_layers, "Set Layer Priority");
+ _layers[i].Priority = priority;
+ }
+
+ OutlineEditorUtility.Render(_layers[i], _layers);
+ }
+ }
+ else
+ {
+ EditorGUILayout.HelpBox("The layer collection is empty.", MessageType.Info, true);
+ }
+
+ // Add/remove processing.
+ OutlineEditorUtility.RenderDivider(Color.gray);
+ EditorGUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+
+ if (GUILayout.Button("Add New", _layerButtonStyle))
+ {
+ Undo.RecordObject(_layers, "Add Layer");
+ _layers.Add(new OutlineLayer());
+ }
+
+ if (GUILayout.Button("Remove All", _layerButtonStyle))
+ {
+ Undo.RecordObject(_layers, "Remove All Layers");
+ _layers.Clear();
+ }
+
+ if (removeLayer >= 0)
+ {
+ Undo.RecordObject(_layers, "Remove Layer");
+ _layers.RemoveAt(removeLayer);
+ }
+
+ EditorGUILayout.EndHorizontal();
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ EditorUtility.SetDirty(_layers);
+ }
+ }
+
+ private void OnEnable()
+ {
+ _layers = (OutlineLayerCollection)target;
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta
new file mode 100644
index 0000000..528a02e
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5f4ec5de59e58794b8e34f2ca3c00199
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs
new file mode 100644
index 0000000..efa43c4
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs
@@ -0,0 +1,33 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ [CustomEditor(typeof(OutlineSettings))]
+ public class OutlineSettingsEditor : Editor
+ {
+ private OutlineSettings _settings;
+
+ public override void OnInspectorGUI()
+ {
+ EditorGUI.BeginChangeCheck();
+ OutlineEditorUtility.Render(_settings, _settings);
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ EditorUtility.SetDirty(_settings);
+ }
+ }
+
+ private void OnEnable()
+ {
+ _settings = (OutlineSettings)target;
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta
new file mode 100644
index 0000000..2569298
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 28f2a32d8600f8045a4b9a9916ff8801
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef b/Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef
new file mode 100644
index 0000000..04858cc
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef
@@ -0,0 +1,16 @@
+{
+ "name": "UnityFx.Outline.Editor",
+ "references": [
+ "UnityFx.Outline"
+ ],
+ "optionalUnityReferences": [],
+ "includePlatforms": [
+ "Editor"
+ ],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": []
+}
\ No newline at end of file
diff --git a/Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta b/Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta
new file mode 100644
index 0000000..ec90eb8
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 9ce6758f27194b64fadf06ac518b5196
+timeCreated: 1566558329
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/README.md b/Outline.Core/Packages/UnityFx.Outline/README.md
new file mode 100644
index 0000000..2bb00b7
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/README.md
@@ -0,0 +1,11 @@
+# UnityFx.Outline
+
+## SUMMARY
+Screen-space outline effects for Unity.
+
+## USEFUL LINKS
+* [Github project](https://github.com/Arvtesh/UnityFx.Outline)
+* [npm package](https://www.npmjs.com/package/com.unityfx.outline)
+* [Documentation](https://github.com/Arvtesh/UnityFx.Outline/blob/master/README.md)
+* [License](https://github.com/Arvtesh/UnityFx.Outline/blob/master/LICENSE.md)
+* [Support](mailto:arvtesh@gmail.com)
diff --git a/Outline.Core/Packages/UnityFx.Outline/README.md.meta b/Outline.Core/Packages/UnityFx.Outline/README.md.meta
new file mode 100644
index 0000000..eb46e78
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/README.md.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 4b1c4eed7166ed4429494dc10c2a3d6c
+timeCreated: 1566148623
+licenseType: Free
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime.meta
new file mode 100644
index 0000000..d5034b4
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: bc6bfa143e596d949867e28985573575
+folderAsset: yes
+timeCreated: 1566126961
+licenseType: Free
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs.meta
new file mode 100644
index 0000000..88c5e98
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 82099d138ba6a5c40a5915c4ca5211fe
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset b/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset
new file mode 100644
index 0000000..5b0a0c7
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset
@@ -0,0 +1,16 @@
+%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: b503341e0a514e3489c4851727e68257, type: 3}
+ m_Name: OutlineResources
+ m_EditorClassIdentifier:
+ RenderShader: {fileID: 4800000, guid: ac20fbf75bafe454aba5ef3c098349df, type: 3}
+ HPassShader: {fileID: 4800000, guid: 41c9acbf41c8245498ac9beab378de12, type: 3}
+ VPassBlendShader: {fileID: 4800000, guid: 1df0cb1700e142f4ca3b28297d3957da, type: 3}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta
new file mode 100644
index 0000000..d66452d
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: d28e70f030b1a634db9a6a6d5478ef19
+timeCreated: 1566149572
+licenseType: Free
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts.meta
new file mode 100644
index 0000000..fdf3731
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5474ddc00e5e1574cba82c3dbad68ded
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
new file mode 100644
index 0000000..c822837
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
@@ -0,0 +1,45 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// Generic outline settings.
+ ///
+ public interface IOutlineSettings : IEquatable
+ {
+ ///
+ /// Gets or sets outline color.
+ ///
+ ///
+ ///
+ Color OutlineColor { get; set; }
+
+ ///
+ /// Gets or sets outline width in pixels. Allowed range is [, ].
+ ///
+ ///
+ ///
+ int OutlineWidth { get; set; }
+
+ ///
+ /// Gets or sets outline intensity value. Allowed range is [, ].
+ /// This is used for blurred oulines only (i.e. is set to ).
+ ///
+ ///
+ ///
+ ///
+ float OutlineIntensity { get; set; }
+
+ ///
+ /// Gets or sets outline render mode.
+ ///
+ ///
+ ///
+ ///
+ OutlineRenderFlags OutlineRenderMode { get; set; }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta
new file mode 100644
index 0000000..688fd30
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: efc18f75d5206f14a80e9306650c858a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs
new file mode 100644
index 0000000..0939a90
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs
@@ -0,0 +1,19 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// Extended outline settings.
+ ///
+ public interface IOutlineSettingsEx : IOutlineSettings
+ {
+ ///
+ /// Gets or sets serializable outline settings. Set this to non- value to share settings with other components.
+ ///
+ OutlineSettings OutlineSettings { get; set; }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta
new file mode 100644
index 0000000..73a20da
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9d3517d0fef6af540b0b046d3b2421dd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
new file mode 100644
index 0000000..325b329
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
@@ -0,0 +1,372 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Rendering;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// Attach this script to a to add outline effect. It can be configured in edit-time or in runtime via scripts.
+ ///
+ ///
+ [ExecuteInEditMode]
+ [DisallowMultipleComponent]
+ public sealed class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
+ {
+ #region data
+
+#pragma warning disable 0649
+
+ [SerializeField, Tooltip("Sets outline resources to use. Do not change the defaults unless you know what you're doing.")]
+ private OutlineResources _outlineResources;
+ [SerializeField, HideInInspector]
+ private OutlineSettingsInstance _outlineSettings;
+ [SerializeField, Tooltip("If set, list of object renderers is updated on each frame. Enable if the object has child renderers which are enabled/disabled frequently.")]
+ private bool _updateRenderers;
+
+#pragma warning restore 0649
+
+ private OutlineRendererCollection _renderers;
+ private CommandBuffer _commandBuffer;
+
+ private Dictionary _cameraMap = new Dictionary();
+ private float _cameraMapUpdateTimer;
+
+ #endregion
+
+ #region interface
+
+ ///
+ /// Gets or sets resources used by the effect implementation.
+ ///
+ /// Thrown if setter argument is .
+ public OutlineResources OutlineResources
+ {
+ get
+ {
+ return _outlineResources;
+ }
+ set
+ {
+ if (value == null)
+ {
+ throw new ArgumentNullException("OutlineResources");
+ }
+
+ if (_outlineResources != value)
+ {
+ CreateSettingsIfNeeded();
+
+ _outlineResources = value;
+ _outlineSettings.OutlineResources = _outlineResources;
+ }
+ }
+ }
+
+ ///
+ /// Gets outline renderers. By default all child components are used for outlining.
+ ///
+ public ICollection OutlineRenderers
+ {
+ get
+ {
+ CreateRenderersIfNeeded();
+ return _renderers;
+ }
+ }
+
+ ///
+ /// Gets all cameras outline data is rendered to.
+ ///
+ public ICollection Cameras
+ {
+ get
+ {
+ return _cameraMap.Keys;
+ }
+ }
+
+ #endregion
+
+ #region MonoBehaviour
+
+ private void Awake()
+ {
+ CreateRenderersIfNeeded();
+ CreateSettingsIfNeeded();
+
+ _outlineSettings.OutlineResources = _outlineResources;
+ }
+
+ private void OnDestroy()
+ {
+ if (_outlineSettings != null)
+ {
+ _outlineSettings.OutlineResources = null;
+ }
+ }
+
+ private void OnEnable()
+ {
+ CreateCommandBufferIfNeeded();
+ Camera.onPreRender += OnCameraPreRender;
+ }
+
+ private void OnDisable()
+ {
+ Camera.onPreRender -= OnCameraPreRender;
+
+ foreach (var kvp in _cameraMap)
+ {
+ if (kvp.Key)
+ {
+ kvp.Key.RemoveCommandBuffer(OutlineRenderer.RenderEvent, kvp.Value);
+ }
+ }
+
+ _cameraMap.Clear();
+
+ if (_commandBuffer != null)
+ {
+ _commandBuffer.Dispose();
+ _commandBuffer = null;
+ }
+ }
+
+ private void Update()
+ {
+ _cameraMapUpdateTimer += Time.deltaTime;
+
+ if (_cameraMapUpdateTimer > 16)
+ {
+ RemoveDestroyedCameras();
+ _cameraMapUpdateTimer = 0;
+ }
+
+ if (_outlineResources != null && _renderers != null)
+ {
+ if (_updateRenderers)
+ {
+ _renderers.Reset(false);
+ }
+
+ _commandBuffer.Clear();
+
+ using (var renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget))
+ {
+ renderer.Render(_renderers.GetList(), _outlineSettings.OutlineResources, _outlineSettings);
+ }
+ }
+ }
+
+#if UNITY_EDITOR
+
+ private void OnValidate()
+ {
+ CreateRenderersIfNeeded();
+ CreateCommandBufferIfNeeded();
+ CreateSettingsIfNeeded();
+
+ _outlineSettings.OutlineResources = _outlineResources;
+ }
+
+ private void Reset()
+ {
+ if (_outlineSettings != null)
+ {
+ _outlineSettings.OutlineResources = _outlineResources;
+ }
+
+ if (_renderers != null)
+ {
+ _renderers.Reset(true);
+ }
+ }
+
+#endif
+
+ #endregion
+
+ #region IOutlineSettingsEx
+
+ ///
+ /// Gets or sets outline settings. Set this to non- value to share settings with other components.
+ ///
+ public OutlineSettings OutlineSettings
+ {
+ get
+ {
+ if (_outlineSettings == null)
+ {
+ _outlineSettings = new OutlineSettingsInstance();
+ }
+
+ return _outlineSettings.OutlineSettings;
+ }
+ set
+ {
+ if (_outlineSettings == null)
+ {
+ _outlineSettings = new OutlineSettingsInstance();
+ }
+
+ _outlineSettings.OutlineSettings = value;
+ }
+ }
+
+ #endregion
+
+ #region IOutlineSettings
+
+ ///
+ public Color OutlineColor
+ {
+ get
+ {
+ CreateSettingsIfNeeded();
+ return _outlineSettings.OutlineColor;
+ }
+ set
+ {
+ CreateSettingsIfNeeded();
+ _outlineSettings.OutlineColor = value;
+ }
+ }
+
+ ///
+ public int OutlineWidth
+ {
+ get
+ {
+ CreateSettingsIfNeeded();
+ return _outlineSettings.OutlineWidth;
+ }
+ set
+ {
+ CreateSettingsIfNeeded();
+ _outlineSettings.OutlineWidth = value;
+ }
+ }
+
+ ///
+ public float OutlineIntensity
+ {
+ get
+ {
+ CreateSettingsIfNeeded();
+ return _outlineSettings.OutlineIntensity;
+ }
+ set
+ {
+ CreateSettingsIfNeeded();
+ _outlineSettings.OutlineIntensity = value;
+ }
+ }
+
+ ///
+ public OutlineRenderFlags OutlineRenderMode
+ {
+ get
+ {
+ CreateSettingsIfNeeded();
+ return _outlineSettings.OutlineRenderMode;
+ }
+ set
+ {
+ CreateSettingsIfNeeded();
+ _outlineSettings.OutlineRenderMode = value;
+ }
+ }
+
+ #endregion
+
+ #region IEquatable
+
+ ///
+ public bool Equals(IOutlineSettings other)
+ {
+ return OutlineSettings.Equals(_outlineSettings, other);
+ }
+
+ #endregion
+
+ #region implementation
+
+ private void OnCameraPreRender(Camera camera)
+ {
+ if (camera)
+ {
+ if (_outlineSettings.RequiresCameraDepth)
+ {
+ camera.depthTextureMode |= DepthTextureMode.Depth;
+ }
+
+ if (!_cameraMap.ContainsKey(camera))
+ {
+ camera.AddCommandBuffer(OutlineRenderer.RenderEvent, _commandBuffer);
+ _cameraMap.Add(camera, _commandBuffer);
+ }
+ }
+ }
+
+ private void RemoveDestroyedCameras()
+ {
+ List camerasToRemove = null;
+
+ foreach (var camera in _cameraMap.Keys)
+ {
+ if (camera == null)
+ {
+ if (camerasToRemove != null)
+ {
+ camerasToRemove.Add(camera);
+ }
+ else
+ {
+ camerasToRemove = new List() { camera };
+ }
+ }
+ }
+
+ if (camerasToRemove != null)
+ {
+ foreach (var camera in camerasToRemove)
+ {
+ _cameraMap.Remove(camera);
+ }
+ }
+ }
+
+ private void CreateCommandBufferIfNeeded()
+ {
+ if (_commandBuffer == null)
+ {
+ _commandBuffer = new CommandBuffer();
+ _commandBuffer.name = string.Format("{0} - {1}", GetType().Name, name);
+ }
+ }
+
+ private void CreateSettingsIfNeeded()
+ {
+ if (_outlineSettings == null)
+ {
+ _outlineSettings = new OutlineSettingsInstance(_outlineResources);
+ }
+ }
+
+ private void CreateRenderersIfNeeded()
+ {
+ if (_renderers == null)
+ {
+ _renderers = new OutlineRendererCollection(gameObject);
+ _renderers.Reset(true);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta
new file mode 100644
index 0000000..a9c85ed
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta
@@ -0,0 +1,15 @@
+fileFormatVersion: 2
+guid: 271c580db5fd384429cdac899152e9e0
+timeCreated: 1566149857
+licenseType: Free
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences:
+ - _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19,
+ type: 2}
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
new file mode 100644
index 0000000..a4bacb8
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
@@ -0,0 +1,240 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Rendering;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// Renders outlines at specific camera. Should be attached to camera to function.
+ ///
+ ///
+ ///
+ ///
+ ///
+ [DisallowMultipleComponent]
+ [RequireComponent(typeof(Camera))]
+ public sealed partial class OutlineEffect : MonoBehaviour
+ {
+ #region data
+
+ [SerializeField, Tooltip("Sets outline resources to use. Do not change the defaults unless you know what you're doing.")]
+ private OutlineResources _outlineResources;
+ [SerializeField, Tooltip("Collection of outline layers to use. This can be used to share outline settings between multiple cameras.")]
+ private OutlineLayerCollection _outlineLayers;
+ [SerializeField, HideInInspector]
+ private CameraEvent _cameraEvent = OutlineRenderer.RenderEvent;
+
+ private CommandBuffer _commandBuffer;
+
+ #endregion
+
+ #region interface
+
+ ///
+ /// Gets or sets resources used by the effect implementation.
+ ///
+ /// Thrown if setter argument is .
+ public OutlineResources OutlineResources
+ {
+ get
+ {
+ return _outlineResources;
+ }
+ set
+ {
+ if (ReferenceEquals(value, null))
+ {
+ throw new ArgumentNullException("OutlineResources");
+ }
+
+ _outlineResources = value;
+ }
+ }
+
+ ///
+ /// Gets collection of outline layers.
+ ///
+ ///
+ public IList OutlineLayers
+ {
+ get
+ {
+ CreateLayersIfNeeded();
+ return _outlineLayers;
+ }
+ }
+
+ ///
+ /// Gets or sets used to render the outlines.
+ ///
+ public CameraEvent RenderEvent
+ {
+ get
+ {
+ return _cameraEvent;
+ }
+ set
+ {
+ if (_cameraEvent != value)
+ {
+ if (_commandBuffer != null)
+ {
+ var camera = GetComponent();
+
+ if (camera)
+ {
+ camera.RemoveCommandBuffer(_cameraEvent, _commandBuffer);
+ camera.AddCommandBuffer(value, _commandBuffer);
+ }
+ }
+
+ _cameraEvent = value;
+ }
+ }
+ }
+
+ ///
+ /// Adds the passed to the first outline layer. Creates the layer if needed.
+ ///
+ /// The to add and render outline for.
+ ///
+ public void AddGameObject(GameObject go)
+ {
+ AddGameObject(go, 0);
+ }
+
+ ///
+ /// Adds the passed to the specified outline layer. Creates the layer if needed.
+ ///
+ /// The to add and render outline for.
+ ///
+ public void AddGameObject(GameObject go, int layerIndex)
+ {
+ if (layerIndex < 0)
+ {
+ throw new ArgumentOutOfRangeException("layerIndex");
+ }
+
+ CreateLayersIfNeeded();
+
+ while (_outlineLayers.Count <= layerIndex)
+ {
+ _outlineLayers.Add(new OutlineLayer());
+ }
+
+ _outlineLayers[layerIndex].Add(go);
+ }
+
+ ///
+ /// Shares with another instance.
+ ///
+ /// Effect to share with.
+ ///
+ public void ShareLayersWith(OutlineEffect other)
+ {
+ if (other)
+ {
+ CreateLayersIfNeeded();
+ other._outlineLayers = _outlineLayers;
+ }
+ }
+
+ #endregion
+
+ #region MonoBehaviour
+
+ private void Awake()
+ {
+ }
+
+ private void OnEnable()
+ {
+ var camera = GetComponent();
+
+ if (camera)
+ {
+ _commandBuffer = new CommandBuffer
+ {
+ name = string.Format("{0} - {1}", GetType().Name, name)
+ };
+
+ camera.depthTextureMode |= DepthTextureMode.Depth;
+ camera.AddCommandBuffer(_cameraEvent, _commandBuffer);
+ }
+ }
+
+ private void OnDisable()
+ {
+ var camera = GetComponent();
+
+ if (camera)
+ {
+ camera.RemoveCommandBuffer(_cameraEvent, _commandBuffer);
+ }
+
+ if (_commandBuffer != null)
+ {
+ _commandBuffer.Dispose();
+ _commandBuffer = null;
+ }
+ }
+
+ private void Update()
+ {
+ if (_outlineLayers)
+ {
+ FillCommandBuffer();
+ }
+ }
+
+ private void OnDestroy()
+ {
+ // TODO: Find a way to do this once per OutlineLayerCollection instance.
+ if (_outlineLayers)
+ {
+ _outlineLayers.Reset();
+ }
+ }
+
+#if UNITY_EDITOR
+
+ private void Reset()
+ {
+ _outlineLayers = null;
+ }
+
+#endif
+
+ #endregion
+
+ #region implementation
+
+ private void FillCommandBuffer()
+ {
+ _commandBuffer.Clear();
+
+ if (_outlineResources && _outlineResources.IsValid)
+ {
+ using (var renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget))
+ {
+ _outlineLayers.Render(renderer, _outlineResources);
+ }
+ }
+ }
+
+ private void CreateLayersIfNeeded()
+ {
+ if (ReferenceEquals(_outlineLayers, null))
+ {
+ _outlineLayers = ScriptableObject.CreateInstance();
+ _outlineLayers.name = "OutlineLayers";
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta
new file mode 100644
index 0000000..1044087
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta
@@ -0,0 +1,15 @@
+fileFormatVersion: 2
+guid: 270d3185d159bf54fb4cddbb42235437
+timeCreated: 1566149591
+licenseType: Free
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences:
+ - _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19,
+ type: 2}
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
new file mode 100644
index 0000000..eac4774
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
@@ -0,0 +1,494 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// A collection of instances that share outline settings. An
+ /// can only belong to one at time.
+ ///
+ ///
+ ///
+ [Serializable]
+ public sealed partial class OutlineLayer : ICollection, IOutlineSettingsEx
+ {
+ #region data
+
+ [SerializeField, HideInInspector]
+ private OutlineSettingsInstance _settings = new OutlineSettingsInstance();
+ [SerializeField, HideInInspector]
+ private string _name;
+ [SerializeField, HideInInspector]
+ private int _zOrder;
+ [SerializeField, HideInInspector]
+ private bool _enabled = true;
+
+ private OutlineLayerCollection _parentCollection;
+ private Dictionary _outlineObjects = new Dictionary();
+
+ #endregion
+
+ #region interface
+
+ ///
+ /// Gets the layer name.
+ ///
+ public string Name
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(_name))
+ {
+ return "OutlineLayer #" + Index.ToString();
+ }
+
+ return _name;
+ }
+ }
+
+ ///
+ /// Gets or sets a value indicating whether the layer is enabled.
+ ///
+ ///
+ public bool Enabled
+ {
+ get
+ {
+ return _enabled;
+ }
+ set
+ {
+ _enabled = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the layer priority. Layers with greater values are rendered on top of layers with lower priority.
+ /// Layers with equal priorities are rendered according to index in parent collection.
+ ///
+ ///
+ public int Priority
+ {
+ get
+ {
+ return _zOrder;
+ }
+ set
+ {
+ if (_zOrder != value)
+ {
+ if (_parentCollection != null)
+ {
+ _parentCollection.SetOrderChanged();
+ }
+
+ _zOrder = value;
+ }
+ }
+ }
+
+ ///
+ /// Gets index of the layer in parent collection.
+ ///
+ public int Index
+ {
+ get
+ {
+ if (_parentCollection != null)
+ {
+ return _parentCollection.IndexOf(this);
+ }
+
+ return -1;
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public OutlineLayer()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public OutlineLayer(string name)
+ {
+ _name = name;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Thrown if is .
+ public OutlineLayer(OutlineSettings settings)
+ {
+ if (ReferenceEquals(settings, null))
+ {
+ throw new ArgumentNullException("settings");
+ }
+
+ _settings.OutlineSettings = settings;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Thrown if is .
+ public OutlineLayer(string name, OutlineSettings settings)
+ {
+ if (ReferenceEquals(settings, null))
+ {
+ throw new ArgumentNullException("settings");
+ }
+
+ _name = name;
+ _settings.OutlineSettings = settings;
+ }
+
+ ///
+ /// Adds a new object to the layer.
+ ///
+ /// Thrown if is .
+ public void Add(GameObject go, int ignoreLayerMask)
+ {
+ if (ReferenceEquals(go, null))
+ {
+ throw new ArgumentNullException("go");
+ }
+
+ if (!_outlineObjects.ContainsKey(go))
+ {
+ var renderers = new OutlineRendererCollection(go);
+ renderers.Reset(false, ignoreLayerMask);
+ _outlineObjects.Add(go, renderers);
+ }
+ }
+
+ ///
+ /// Adds a new object to the layer.
+ ///
+ /// Thrown if is .
+ public void Add(GameObject go, string ignoreLayer)
+ {
+ Add(go, 1 << LayerMask.NameToLayer(ignoreLayer));
+ }
+
+ ///
+ /// Attempts to get renderers assosiated with the specified .
+ ///
+ /// Thrown if is .
+ public bool TryGetRenderers(GameObject go, out ICollection renderers)
+ {
+ if (ReferenceEquals(go, null))
+ {
+ throw new ArgumentNullException("go");
+ }
+
+ OutlineRendererCollection result;
+
+ if (_outlineObjects.TryGetValue(go, out result))
+ {
+ renderers = result;
+ return true;
+ }
+
+ renderers = null;
+ return false;
+ }
+
+ ///
+ /// Renders the layers.
+ ///
+ public void Render(OutlineRenderer renderer, OutlineResources resources)
+ {
+ if (_enabled)
+ {
+ _settings.OutlineResources = resources;
+
+ foreach (var kvp in _outlineObjects)
+ {
+ if (kvp.Key && kvp.Key.activeInHierarchy)
+ {
+ renderer.Render(kvp.Value.GetList(), resources, _settings);
+ }
+ }
+ }
+ }
+
+ #endregion
+
+ #region internals
+
+ internal string NameTag
+ {
+ get
+ {
+ return _name;
+ }
+ set
+ {
+ _name = value;
+ }
+ }
+
+ internal OutlineLayerCollection ParentCollection
+ {
+ get
+ {
+ return _parentCollection;
+ }
+ }
+
+ internal void Reset()
+ {
+ _settings.OutlineResources = null;
+ _outlineObjects.Clear();
+ }
+
+ internal void SetCollection(OutlineLayerCollection collection)
+ {
+ if (_parentCollection == null || collection == null || _parentCollection == collection)
+ {
+ _parentCollection = collection;
+ }
+ else
+ {
+ throw new InvalidOperationException("OutlineLayer can only belong to a single OutlineLayerCollection.");
+ }
+ }
+
+ #endregion
+
+ #region IOutlineSettingsEx
+
+ ///
+ /// Gets or sets outline settings. Set this to non- value to share settings with other components.
+ ///
+ public OutlineSettings OutlineSettings
+ {
+ get
+ {
+ return _settings.OutlineSettings;
+ }
+ set
+ {
+ _settings.OutlineSettings = value;
+ }
+ }
+
+ #endregion
+
+ #region IOutlineSettings
+
+ ///
+ public Color OutlineColor
+ {
+ get
+ {
+ return _settings.OutlineColor;
+ }
+ set
+ {
+ _settings.OutlineColor = value;
+ }
+ }
+
+ ///
+ public int OutlineWidth
+ {
+ get
+ {
+ return _settings.OutlineWidth;
+ }
+ set
+ {
+ _settings.OutlineWidth = value;
+ }
+ }
+
+ ///
+ public float OutlineIntensity
+ {
+ get
+ {
+ return _settings.OutlineIntensity;
+ }
+ set
+ {
+ _settings.OutlineIntensity = value;
+ }
+ }
+
+ ///
+ public OutlineRenderFlags OutlineRenderMode
+ {
+ get
+ {
+ return _settings.OutlineRenderMode;
+ }
+ set
+ {
+ _settings.OutlineRenderMode = value;
+ }
+ }
+
+ #endregion
+
+ #region ICollection
+
+ ///
+ public int Count
+ {
+ get
+ {
+ return _outlineObjects.Count;
+ }
+ }
+
+ ///
+ public bool IsReadOnly
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ ///
+ public void Add(GameObject go)
+ {
+ Add(go, 0);
+ }
+
+ ///
+ public bool Remove(GameObject go)
+ {
+ if (!ReferenceEquals(go, null))
+ {
+ return _outlineObjects.Remove(go);
+ }
+
+ return false;
+ }
+
+ ///
+ public bool Contains(GameObject go)
+ {
+ if (ReferenceEquals(go, null))
+ {
+ return false;
+ }
+
+ return _outlineObjects.ContainsKey(go);
+ }
+
+ ///
+ public void Clear()
+ {
+ _outlineObjects.Clear();
+ }
+
+ ///
+ public void CopyTo(GameObject[] array, int arrayIndex)
+ {
+ _outlineObjects.Keys.CopyTo(array, arrayIndex);
+ }
+
+ #endregion
+
+ #region IEnumerable
+
+ ///
+ public IEnumerator GetEnumerator()
+ {
+ return _outlineObjects.Keys.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return _outlineObjects.Keys.GetEnumerator();
+ }
+
+ #endregion
+
+ #region IEquatable
+
+ ///
+ public bool Equals(IOutlineSettings other)
+ {
+ return OutlineSettings.Equals(this, other);
+ }
+
+ #endregion
+
+ #region Object
+
+ ///
+ public override string ToString()
+ {
+ var text = new StringBuilder();
+
+ if (string.IsNullOrEmpty(_name))
+ {
+ text.Append("OutlineLayer");
+ }
+ else
+ {
+ text.Append(_name);
+ }
+
+ if (_parentCollection != null)
+ {
+ text.Append(" #");
+ text.Append(_parentCollection.IndexOf(this));
+ }
+
+ if (_zOrder > 0)
+ {
+ text.Append(" z");
+ text.Append(_zOrder);
+ }
+
+ if (_outlineObjects.Count > 0)
+ {
+ text.Append(" (");
+
+ foreach (var go in _outlineObjects.Keys)
+ {
+ text.Append(go.name);
+ text.Append(", ");
+ }
+
+ text.Remove(text.Length - 2, 2);
+ text.Append(")");
+ }
+
+ return string.Format("{0}", text);
+ }
+
+ ///
+ public override bool Equals(object other)
+ {
+ return OutlineSettings.Equals(this, other as IOutlineSettings);
+ }
+
+ ///
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ #endregion
+
+ #region implementation
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta
new file mode 100644
index 0000000..f199256
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 1360e19784ddfac45a7dcb6ba39595ed
+timeCreated: 1566130871
+licenseType: Free
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
new file mode 100644
index 0000000..d28f982
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
@@ -0,0 +1,291 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// A serializable collection of outline layers.
+ ///
+ ///
+ ///
+ ///
+ [CreateAssetMenu(fileName = "OutlineLayerCollection", menuName = "UnityFx/Outline/Outline Layer Collection")]
+ public sealed class OutlineLayerCollection : ScriptableObject, IList
+ {
+ #region data
+
+ private class OutlineLayerComparer : IComparer
+ {
+ public int Compare(OutlineLayer x, OutlineLayer y)
+ {
+ return x.Priority - y.Priority;
+ }
+ }
+
+ [SerializeField, HideInInspector]
+ private List _layers = new List();
+
+ private List _sortedLayers = new List();
+ private OutlineLayerComparer _sortComparer = new OutlineLayerComparer();
+ private bool _orderChanged = true;
+
+ #endregion
+
+ #region interface
+
+ ///
+ /// Gets layers ordered by .
+ ///
+ public OutlineLayer[] SortedLayers
+ {
+ get
+ {
+ UpdateSortedLayersIfNeeded();
+ return _sortedLayers.ToArray();
+ }
+ }
+
+ ///
+ /// Renders all layers.
+ ///
+ public void Render(OutlineRenderer renderer, OutlineResources resources)
+ {
+ UpdateSortedLayersIfNeeded();
+
+ foreach (var layer in _sortedLayers)
+ {
+ layer.Render(renderer, resources);
+ }
+ }
+
+ #endregion
+
+ #region internals
+
+ internal void SetOrderChanged()
+ {
+ _orderChanged = true;
+ }
+
+ internal void Reset()
+ {
+ foreach (var layer in _layers)
+ {
+ layer.Reset();
+ }
+ }
+
+ #endregion
+
+ #region ScriptableObject
+
+ private void OnEnable()
+ {
+ foreach (var layer in _layers)
+ {
+ layer.SetCollection(this);
+ }
+
+ _orderChanged = true;
+ }
+
+ #endregion
+
+ #region IList
+
+ ///
+ public OutlineLayer this[int layerIndex]
+ {
+ get
+ {
+ return _layers[layerIndex];
+ }
+ set
+ {
+ if (value == null)
+ {
+ throw new ArgumentNullException("layer");
+ }
+
+ if (layerIndex < 0 || layerIndex >= _layers.Count)
+ {
+ throw new ArgumentOutOfRangeException("layerIndex");
+ }
+
+ if (_layers[layerIndex] != value)
+ {
+ value.SetCollection(this);
+
+ _layers[layerIndex].SetCollection(null);
+ _layers[layerIndex] = value;
+
+ _orderChanged = true;
+ }
+ }
+ }
+
+ ///
+ public int IndexOf(OutlineLayer layer)
+ {
+ if (layer != null)
+ {
+ return _layers.IndexOf(layer);
+ }
+
+ return -1;
+ }
+
+ ///
+ public void Insert(int index, OutlineLayer layer)
+ {
+ if (layer == null)
+ {
+ throw new ArgumentNullException("layer");
+ }
+
+ if (layer.ParentCollection != this)
+ {
+ layer.SetCollection(this);
+
+ _layers.Insert(index, layer);
+
+ _orderChanged = true;
+ }
+ }
+
+ ///
+ public void RemoveAt(int index)
+ {
+ if (index >= 0 && index < _layers.Count)
+ {
+ _layers[index].SetCollection(null);
+ _layers.RemoveAt(index);
+
+ _orderChanged = true;
+ }
+ }
+
+ #endregion
+
+ #region ICollection
+
+ ///
+ public int Count
+ {
+ get
+ {
+ return _layers.Count;
+ }
+ }
+
+ ///
+ public bool IsReadOnly
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ ///
+ public void Add(OutlineLayer layer)
+ {
+ if (layer == null)
+ {
+ throw new ArgumentNullException("layer");
+ }
+
+ if (layer.ParentCollection != this)
+ {
+ layer.SetCollection(this);
+
+ _layers.Add(layer);
+ _orderChanged = true;
+ }
+ }
+
+ ///
+ public bool Remove(OutlineLayer layer)
+ {
+ if (_layers.Remove(layer))
+ {
+ layer.SetCollection(null);
+
+ _sortedLayers.Remove(layer);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ ///
+ public void Clear()
+ {
+ if (_layers.Count > 0)
+ {
+ foreach (var layer in _layers)
+ {
+ layer.SetCollection(null);
+ }
+
+ _layers.Clear();
+ _sortedLayers.Clear();
+ }
+ }
+
+ ///
+ public bool Contains(OutlineLayer layer)
+ {
+ if (layer == null)
+ {
+ return false;
+ }
+
+ return _layers.Contains(layer);
+ }
+
+ ///
+ public void CopyTo(OutlineLayer[] array, int arrayIndex)
+ {
+ _layers.CopyTo(array, arrayIndex);
+ }
+
+ #endregion
+
+ #region IEnumerable
+
+ ///
+ public IEnumerator GetEnumerator()
+ {
+ return _layers.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return _layers.GetEnumerator();
+ }
+
+ #endregion
+
+ #region implementation
+
+ private void UpdateSortedLayersIfNeeded()
+ {
+ if (_orderChanged)
+ {
+ _sortedLayers.Clear();
+ _sortedLayers.AddRange(_layers);
+ _sortedLayers.Sort(_sortComparer);
+ _orderChanged = false;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta
new file mode 100644
index 0000000..3b46761
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 57d0c11168277cf4eb3b4b89706e6aa5
+timeCreated: 1566560091
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
new file mode 100644
index 0000000..c911c0d
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
@@ -0,0 +1,29 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// Enumerates outline render modes.
+ ///
+ [Flags]
+ public enum OutlineRenderFlags
+ {
+ ///
+ /// Outline frame is a solid line.
+ ///
+ Solid = 0,
+
+ ///
+ /// Outline frame is blurred.
+ ///
+ Blurred = 1,
+
+ ///
+ /// Enabled depth testing when rendering object outlines. Only visible parts of objects are outlined.
+ ///
+ EnableDepthTesting = 0x100
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
new file mode 100644
index 0000000..8c8d06c
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 836bd13bd33c59246b1cebab92f8e62a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
new file mode 100644
index 0000000..3569cf7
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
@@ -0,0 +1,493 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Rendering;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// Helper class for outline rendering with .
+ ///
+ ///
+ /// The class can be used on its own or as part of a higher level systems. It is used
+ /// by higher level outline implementations ( and
+ /// ). It is fully compatible with Unity post processing stack as well.
+ /// The class implements to be used inside
+ /// block as shown in the code samples. Disposing does not dispose
+ /// the corresponding .
+ /// Command buffer is not cleared before rendering. It is user responsibility to do so if needed.
+ ///
+ ///
+ /// var commandBuffer = new CommandBuffer();
+ ///
+ /// using (var renderer = new OutlineRenderer(commandBuffer, BuiltinRenderTextureType.CameraTarget))
+ /// {
+ /// renderer.Render(renderers, resources, settings);
+ /// }
+ ///
+ /// camera.AddCommandBuffer(CameraEvent.BeforeImageEffects, commandBuffer);
+ ///
+ ///
+ /// [Preserve]
+ /// public class OutlineEffectRenderer : PostProcessEffectRenderer
+ /// {
+ /// public override void Init()
+ /// {
+ /// base.Init();
+ ///
+ /// // Reuse fullscreen triangle mesh from PostProcessing (do not create own).
+ /// settings.OutlineResources.FullscreenTriangleMesh = RuntimeUtilities.fullscreenTriangle;
+ /// }
+ ///
+ /// public override void Render(PostProcessRenderContext context)
+ /// {
+ /// var resources = settings.OutlineResources;
+ /// var layers = settings.OutlineLayers;
+ ///
+ /// if (resources && resources.IsValid && layers)
+ /// {
+ /// // No need to setup property sheet parameters, all the rendering staff is handled by the OutlineRenderer.
+ /// using (var renderer = new OutlineRenderer(context.command, context.source, context.destination))
+ /// {
+ /// layers.Render(renderer, resources);
+ /// }
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ public struct OutlineRenderer : IDisposable
+ {
+ #region data
+
+ private static readonly int _mainRtId = Shader.PropertyToID("_MainTex");
+ private static readonly int _maskRtId = Shader.PropertyToID("_MaskTex");
+ private static readonly int _hPassRtId = Shader.PropertyToID("_HPassTex");
+
+ private readonly RenderTargetIdentifier _source;
+ private readonly RenderTargetIdentifier _destination;
+ private readonly CommandBuffer _commandBuffer;
+
+ #endregion
+
+ #region interface
+
+ ///
+ /// A default outline rendering should be assosiated with.
+ ///
+ public const CameraEvent RenderEvent = CameraEvent.BeforeImageEffects;
+
+ ///
+ /// Name of the outline effect.
+ ///
+ public const string EffectName = "Outline";
+
+ ///
+ /// Minimum value of outline width parameter.
+ ///
+ ///
+ public const int MinWidth = 1;
+
+ ///
+ /// Maximum value of outline width parameter.
+ ///
+ ///
+ public const int MaxWidth = 32;
+
+ ///
+ /// Minimum value of outline intensity parameter.
+ ///
+ ///
+ ///
+ public const int MinIntensity = 1;
+
+ ///
+ /// Maximum value of outline intensity parameter.
+ ///
+ ///
+ ///
+ public const int MaxIntensity = 64;
+
+ ///
+ /// Value of outline intensity parameter that is treated as solid fill.
+ ///
+ ///
+ ///
+ public const int SolidIntensity = 100;
+
+ ///
+ /// Initializes a new instance of the struct.
+ ///
+ /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
+ /// Render target.
+ /// Thrown if is .
+ public OutlineRenderer(CommandBuffer commandBuffer, BuiltinRenderTextureType rt)
+ : this(commandBuffer, rt, rt, Vector2Int.zero)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the struct.
+ ///
+ /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
+ /// Render target.
+ /// Thrown if is .
+ public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier rt)
+ : this(commandBuffer, rt, rt, Vector2Int.zero)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the struct.
+ ///
+ /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
+ /// Source image. Can be the same as .
+ /// Render target.
+ /// Thrown if is .
+ public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src, RenderTargetIdentifier dst)
+ : this(commandBuffer, src, dst, Vector2Int.zero)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the struct.
+ ///
+ /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
+ /// Source image. Can be the same as .
+ /// Render target.
+ /// Size of the temporaty render textures.
+ /// Thrown if is .
+ public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src, RenderTargetIdentifier dst, Vector2Int rtSize)
+ {
+ if (commandBuffer == null)
+ {
+ throw new ArgumentNullException("commandBuffer");
+ }
+
+ var cx = rtSize.x > 0 ? rtSize.x : -1;
+ var cy = rtSize.y > 0 ? rtSize.y : -1;
+
+ _source = src;
+ _destination = dst;
+
+ _commandBuffer = commandBuffer;
+ _commandBuffer.BeginSample(EffectName);
+ _commandBuffer.GetTemporaryRT(_maskRtId, cx, cy, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
+ _commandBuffer.GetTemporaryRT(_hPassRtId, cx, cy, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
+
+ // Need to copy src content into dst if they are not the same. For instance this is the case when rendering
+ // the outline effect as part of Unity Post Processing stack.
+ if (!src.Equals(dst))
+ {
+ if (SystemInfo.copyTextureSupport > CopyTextureSupport.None)
+ {
+ _commandBuffer.CopyTexture(src, dst);
+ }
+ else
+ {
+#if UNITY_2018_2_OR_NEWER
+ _commandBuffer.SetRenderTarget(dst, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
+#else
+ _commandBuffer.SetRenderTarget(dst);
+#endif
+ _commandBuffer.Blit(src, BuiltinRenderTextureType.CurrentActive);
+ }
+ }
+ }
+
+ ///
+ /// Renders outline around a single object. This version allows enumeration of with no GC allocations.
+ ///
+ /// One or more renderers representing a single object to be outlined.
+ /// Outline resources.
+ /// Outline settings.
+ /// Thrown if any of the arguments is .
+ ///
+ ///
+ public void Render(IList renderers, OutlineResources resources, IOutlineSettings settings)
+ {
+ if (renderers == null)
+ {
+ throw new ArgumentNullException("renderers");
+ }
+
+ if (resources == null)
+ {
+ throw new ArgumentNullException("resources");
+ }
+
+ if (settings == null)
+ {
+ throw new ArgumentNullException("settings");
+ }
+
+ Init(resources, settings);
+ RenderObject(resources, settings, renderers);
+ RenderHPass(resources, settings);
+ RenderVPassBlend(resources, settings);
+ }
+
+ ///
+ /// Renders outline around a single object.
+ ///
+ /// One or more renderers representing a single object to be outlined.
+ /// Outline resources.
+ /// Outline settings.
+ /// Thrown if any of the arguments is .
+ ///
+ ///
+ public void Render(IEnumerable renderers, OutlineResources resources, IOutlineSettings settings)
+ {
+ if (renderers == null)
+ {
+ throw new ArgumentNullException("renderers");
+ }
+
+ if (resources == null)
+ {
+ throw new ArgumentNullException("resources");
+ }
+
+ if (settings == null)
+ {
+ throw new ArgumentNullException("settings");
+ }
+
+ Init(resources, settings);
+ RenderObject(resources, settings, renderers);
+ RenderHPass(resources, settings);
+ RenderVPassBlend(resources, settings);
+ }
+
+ ///
+ /// Renders outline around a single object.
+ ///
+ /// A representing an object to be outlined.
+ /// Outline resources.
+ /// Outline settings.
+ /// Thrown if any of the arguments is .
+ ///
+ ///
+ public void Render(Renderer renderer, OutlineResources resources, IOutlineSettings settings)
+ {
+ if (renderer == null)
+ {
+ throw new ArgumentNullException("renderers");
+ }
+
+ if (resources == null)
+ {
+ throw new ArgumentNullException("resources");
+ }
+
+ if (settings == null)
+ {
+ throw new ArgumentNullException("settings");
+ }
+
+ Init(resources, settings);
+ RenderObject(resources, settings, renderer);
+ RenderHPass(resources, settings);
+ RenderVPassBlend(resources, settings);
+ }
+
+ ///
+ /// Calculates value of Gauss function for the specified and values.
+ ///
+ ///
+ ///
+ public static float Gauss(float x, float stdDev)
+ {
+ var stdDev2 = stdDev * stdDev * 2;
+ var a = 1 / Mathf.Sqrt((float)Math.PI * stdDev2);
+ var gauss = a * Mathf.Pow((float)Math.E, -x * x / stdDev2);
+
+ return gauss;
+ }
+
+ ///
+ /// Samples Gauss function for the specified .
+ ///
+ ///
+ public static float[] GetGaussSamples(int width, float[] samples)
+ {
+ // NOTE: According to '3 sigma' rule there is no reason to have StdDev less then width / 3.
+ // In practice blur looks best when StdDev is within range [width / 3, width / 2].
+ var stdDev = width * 0.5f;
+
+ if (samples == null)
+ {
+ samples = new float[MaxWidth];
+ }
+
+ for (var i = 0; i < width; i++)
+ {
+ samples[i] = Gauss(i, stdDev);
+ }
+
+ return samples;
+ }
+
+ #endregion
+
+ #region IDisposable
+
+ ///
+ /// Finalizes the effect rendering and releases temporary textures used. Should only be called once.
+ ///
+ public void Dispose()
+ {
+ _commandBuffer.ReleaseTemporaryRT(_hPassRtId);
+ _commandBuffer.ReleaseTemporaryRT(_maskRtId);
+ _commandBuffer.EndSample(EffectName);
+ }
+
+ #endregion
+
+ #region implementation
+
+ private void Init(OutlineResources resources, IOutlineSettings settings)
+ {
+ _commandBuffer.SetGlobalFloatArray(resources.GaussSamplesId, resources.GetGaussSamples(settings.OutlineWidth));
+ }
+
+ private void RenderObjectClear(bool depthTestEnabled)
+ {
+ if (depthTestEnabled)
+ {
+ // NOTE: Use the camera depth buffer when rendering the mask. Shader only reads from the depth buffer (ZWrite Off).
+#if UNITY_2018_2_OR_NEWER
+ _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, BuiltinRenderTextureType.Depth, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare);
+#else
+ _commandBuffer.SetRenderTarget(_maskRtId, BuiltinRenderTextureType.Depth);
+#endif
+ }
+ else
+ {
+#if UNITY_2018_2_OR_NEWER
+ _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
+#else
+ _commandBuffer.SetRenderTarget(_maskRtId);
+#endif
+ }
+
+ _commandBuffer.ClearRenderTarget(false, true, Color.clear);
+ }
+
+ private void RenderObject(OutlineResources resources, IOutlineSettings settings, IList renderers)
+ {
+ RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
+
+ for (var i = 0; i < renderers.Count; ++i)
+ {
+ var r = renderers[i];
+
+ if (r && r.enabled && r.gameObject.activeInHierarchy)
+ {
+ // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
+ // list of materials, cached with the outline resources.
+ r.GetSharedMaterials(resources.TmpMaterials);
+
+ for (var j = 0; j < resources.TmpMaterials.Count; ++j)
+ {
+ _commandBuffer.DrawRenderer(r, resources.RenderMaterial, j);
+ }
+ }
+ }
+ }
+
+ private void RenderObject(OutlineResources resources, IOutlineSettings settings, IEnumerable renderers)
+ {
+ RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
+
+ // NOTE: Calling IEnumerable.GetEnumerator() triggers GC.Alloc.
+ foreach (var r in renderers)
+ {
+ if (r && r.enabled && r.gameObject.activeInHierarchy)
+ {
+ // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
+ // list of materials, cached with the outline resources.
+ r.GetSharedMaterials(resources.TmpMaterials);
+
+ for (var j = 0; j < resources.TmpMaterials.Count; ++j)
+ {
+ _commandBuffer.DrawRenderer(r, resources.RenderMaterial, j);
+ }
+ }
+ }
+ }
+
+ private void RenderObject(OutlineResources resources, IOutlineSettings settings, Renderer renderer)
+ {
+ RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
+
+ if (renderer && renderer.gameObject.activeInHierarchy && renderer.enabled)
+ {
+ // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
+ // list of materials, cached with the outline resources.
+ renderer.GetSharedMaterials(resources.TmpMaterials);
+
+ for (var i = 0; i < resources.TmpMaterials.Count; ++i)
+ {
+ _commandBuffer.DrawRenderer(renderer, resources.RenderMaterial, i);
+ }
+ }
+ }
+
+ private void RenderHPass(OutlineResources resources, IOutlineSettings settings)
+ {
+ // Setup shader parameter overrides.
+ var props = resources.HPassProperties;
+ props.SetFloat(resources.WidthId, settings.OutlineWidth);
+
+ // Set source texture as _MainTex to match Blit behavior.
+ _commandBuffer.SetGlobalTexture(_mainRtId, _maskRtId);
+
+ // Set destination texture as render target.
+#if UNITY_2018_2_OR_NEWER
+ _commandBuffer.SetRenderTarget(_hPassRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
+#else
+ _commandBuffer.SetRenderTarget(_hPassRtId);
+#endif
+
+ // Blit fullscreen triangle.
+ _commandBuffer.DrawMesh(resources.FullscreenTriangleMesh, Matrix4x4.identity, resources.HPassMaterial, 0, 0, props);
+ }
+
+ private void RenderVPassBlend(OutlineResources resources, IOutlineSettings settings)
+ {
+ // Setup shader parameter overrides.
+ var props = resources.VPassBlendProperties;
+
+ props.SetFloat(resources.WidthId, settings.OutlineWidth);
+ props.SetColor(resources.ColorId, settings.OutlineColor);
+
+ if ((settings.OutlineRenderMode & OutlineRenderFlags.Blurred) != 0)
+ {
+ props.SetFloat(resources.IntensityId, settings.OutlineIntensity);
+ }
+ else
+ {
+ props.SetFloat(resources.IntensityId, SolidIntensity);
+ }
+
+ // Set source texture as _MainTex to match Blit behavior.
+ _commandBuffer.SetGlobalTexture(_mainRtId, _source);
+
+ // Set destination texture as render target.
+#if UNITY_2018_2_OR_NEWER
+ _commandBuffer.SetRenderTarget(_destination, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
+#else
+ _commandBuffer.SetRenderTarget(_destination);
+#endif
+
+ // Blit fullscreen triangle.
+ _commandBuffer.DrawMesh(resources.FullscreenTriangleMesh, Matrix4x4.identity, resources.VPassBlendMaterial, 0, 0, props);
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta
new file mode 100644
index 0000000..90c49ef
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 4271470bd9f5d5041a4a8881d8457a55
+timeCreated: 1566150038
+licenseType: Free
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
new file mode 100644
index 0000000..730e6dd
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
@@ -0,0 +1,146 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ internal class OutlineRendererCollection : ICollection
+ {
+ #region data
+
+ private readonly List _renderers = new List();
+ private readonly GameObject _go;
+
+ #endregion
+
+ #region interface
+
+ internal OutlineRendererCollection(GameObject go)
+ {
+ Debug.Assert(go);
+ _go = go;
+ }
+
+ internal List GetList()
+ {
+ return _renderers;
+ }
+
+ internal void Reset(bool includeInactive)
+ {
+ _go.GetComponentsInChildren(includeInactive, _renderers);
+ }
+
+ internal void Reset(bool includeInactive, int ignoreLayerMask)
+ {
+ _renderers.Clear();
+
+ var renderers = _go.GetComponentsInChildren(includeInactive);
+
+ if (renderers != null)
+ {
+ if (ignoreLayerMask != 0)
+ {
+ foreach (var renderer in renderers)
+ {
+ if (((1 << renderer.gameObject.layer) & ignoreLayerMask) == 0)
+ {
+ _renderers.Add(renderer);
+ }
+ }
+ }
+ else
+ {
+ foreach (var renderer in renderers)
+ {
+ _renderers.Add(renderer);
+ }
+ }
+ }
+ }
+
+ #endregion
+
+ #region ICollection
+
+ public int Count
+ {
+ get
+ {
+ return _renderers.Count;
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public void Add(Renderer renderer)
+ {
+ Validate(renderer);
+
+ _renderers.Add(renderer);
+ }
+
+ public bool Remove(Renderer renderer)
+ {
+ return _renderers.Remove(renderer);
+ }
+
+ public void Clear()
+ {
+ _renderers.Clear();
+ }
+
+ public bool Contains(Renderer renderer)
+ {
+ return _renderers.Contains(renderer);
+ }
+
+ public void CopyTo(Renderer[] array, int arrayIndex)
+ {
+ _renderers.CopyTo(array, arrayIndex);
+ }
+
+ #endregion
+
+ #region IEnumerable
+
+ public IEnumerator GetEnumerator()
+ {
+ return _renderers.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return _renderers.GetEnumerator();
+ }
+
+ #endregion
+
+ #region implementation
+
+ private void Validate(Renderer renderer)
+ {
+ if (renderer == null)
+ {
+ throw new ArgumentNullException("renderer");
+ }
+
+ if (!renderer.transform.IsChildOf(_go.transform))
+ {
+ throw new ArgumentException(string.Format("Only children of the {0} are allowed.", _go.name), "renderer");
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
new file mode 100644
index 0000000..f582b73
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 89621a3cc73c4e6498a00b2d180ed462
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
new file mode 100644
index 0000000..8d8f169
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
@@ -0,0 +1,234 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// This asset is used to store references to shaders and other resources needed at runtime without having to use a Resources folder.
+ ///
+ ///
+ [CreateAssetMenu(fileName = "OutlineResources", menuName = "UnityFx/Outline/Outline Resources")]
+ public sealed class OutlineResources : ScriptableObject
+ {
+ #region data
+
+ private Material _renderMaterial;
+ private Material _hPassMaterial;
+ private Material _vPassMaterial;
+ private MaterialPropertyBlock _hPassProperties;
+ private MaterialPropertyBlock _vPassProperties;
+ private Mesh _fullscreenTriangleMesh;
+ private float[][] _gaussSamples;
+
+ #endregion
+
+ #region interface
+
+ ///
+ /// Hashed name of _Color shader parameter.
+ ///
+ public readonly int ColorId = Shader.PropertyToID("_Color");
+
+ ///
+ /// Hashed name of _Width shader parameter.
+ ///
+ public readonly int WidthId = Shader.PropertyToID("_Width");
+
+ ///
+ /// Hashed name of _Intensity shader parameter.
+ ///
+ public readonly int IntensityId = Shader.PropertyToID("_Intensity");
+
+ ///
+ /// Hashed name of _GaussSamples shader parameter.
+ ///
+ public readonly int GaussSamplesId = Shader.PropertyToID("_GaussSamples");
+
+ ///
+ /// Temp materials list. Used by to avoid GC allocations.
+ ///
+ public readonly List TmpMaterials = new List();
+
+ ///
+ /// Gets or sets a that renders objects outlined with a solid while color.
+ ///
+ public Shader RenderShader;
+
+ ///
+ /// Gets or sets a that renders outline around the mask, that was generated with (pass 1).
+ ///
+ public Shader HPassShader;
+
+ ///
+ /// Gets or sets a that renders outline around the mask, that was generated with and (pass 2).
+ ///
+ public Shader VPassBlendShader;
+
+ ///
+ /// Gets a -based material.
+ ///
+ public Material RenderMaterial
+ {
+ get
+ {
+ if (_renderMaterial == null)
+ {
+ _renderMaterial = new Material(RenderShader)
+ {
+ name = "Outline - SimpleRender",
+ hideFlags = HideFlags.HideAndDontSave
+ };
+ }
+
+ return _renderMaterial;
+ }
+ }
+
+ ///
+ /// Gets a -based material.
+ ///
+ public Material HPassMaterial
+ {
+ get
+ {
+ if (_hPassMaterial == null)
+ {
+ _hPassMaterial = new Material(HPassShader)
+ {
+ name = "Outline - HPassRender",
+ hideFlags = HideFlags.HideAndDontSave
+ };
+ }
+
+ return _hPassMaterial;
+ }
+ }
+
+ ///
+ /// Gets a -based material.
+ ///
+ public Material VPassBlendMaterial
+ {
+ get
+ {
+ if (_vPassMaterial == null)
+ {
+ _vPassMaterial = new Material(VPassBlendShader)
+ {
+ name = "Outline - VPassBlendRender",
+ hideFlags = HideFlags.HideAndDontSave
+ };
+ }
+
+ return _vPassMaterial;
+ }
+ }
+
+ ///
+ /// Gets a for .
+ ///
+ public MaterialPropertyBlock HPassProperties
+ {
+ get
+ {
+ if (_hPassProperties == null)
+ {
+ _hPassProperties = new MaterialPropertyBlock();
+ }
+
+ return _hPassProperties;
+ }
+ }
+
+ ///
+ /// Gets a for .
+ ///
+ public MaterialPropertyBlock VPassBlendProperties
+ {
+ get
+ {
+ if (_vPassProperties == null)
+ {
+ _vPassProperties = new MaterialPropertyBlock();
+ }
+
+ return _vPassProperties;
+ }
+ }
+
+ ///
+ /// Gets or sets a fullscreen triangle mesh.
+ ///
+ public Mesh FullscreenTriangleMesh
+ {
+ get
+ {
+ if (_fullscreenTriangleMesh == null)
+ {
+ _fullscreenTriangleMesh = new Mesh()
+ {
+ name = "Outline - FullscreenTriangle",
+ hideFlags = HideFlags.HideAndDontSave,
+ vertices = new Vector3[] { new Vector3(-1f, -1f, 0f), new Vector3(-1f, 3f, 0f), new Vector3( 3f, -1f, 0f) },
+ triangles = new int[] {0, 1, 2 }
+ };
+
+ _fullscreenTriangleMesh.UploadMeshData(true);
+ }
+
+ return _fullscreenTriangleMesh;
+ }
+ set
+ {
+ _fullscreenTriangleMesh = value;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the instance is in valid state.
+ ///
+ public bool IsValid
+ {
+ get
+ {
+ return RenderShader && HPassShader && VPassBlendShader;
+ }
+ }
+
+ ///
+ /// Gets cached gauss samples for the specified outline .
+ ///
+ public float[] GetGaussSamples(int width)
+ {
+ var index = Mathf.Clamp(width, 1, OutlineRenderer.MaxWidth) - 1;
+
+ if (_gaussSamples == null)
+ {
+ _gaussSamples = new float[OutlineRenderer.MaxWidth][];
+ }
+
+ if (_gaussSamples[index] == null)
+ {
+ _gaussSamples[index] = OutlineRenderer.GetGaussSamples(width, null);
+ }
+
+ return _gaussSamples[index];
+ }
+
+ ///
+ /// Resets the resources to defaults.
+ ///
+ public void ResetToDefaults()
+ {
+ RenderShader = Shader.Find("UnityFx/Outline/RenderColor");
+ HPassShader = Shader.Find("UnityFx/Outline/HPass");
+ VPassBlendShader = Shader.Find("UnityFx/Outline/VPassBlend");
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta
new file mode 100644
index 0000000..0f1aca3
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta
@@ -0,0 +1,14 @@
+fileFormatVersion: 2
+guid: b503341e0a514e3489c4851727e68257
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences:
+ - RenderShader: {fileID: 4800000, guid: ac20fbf75bafe454aba5ef3c098349df, type: 3}
+ - HPassShader: {fileID: 4800000, guid: 41c9acbf41c8245498ac9beab378de12, type: 3}
+ - VPassBlendShader: {fileID: 4800000, guid: 1df0cb1700e142f4ca3b28297d3957da, type: 3}
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
new file mode 100644
index 0000000..2535031
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
@@ -0,0 +1,128 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ ///
+ /// Outline settings.
+ ///
+ [CreateAssetMenu(fileName = "OutlineSettings", menuName = "UnityFx/Outline/Outline Settings")]
+ public sealed class OutlineSettings : ScriptableObject, IOutlineSettings
+ {
+ #region data
+
+ // NOTE: There is a custom editor for OutlineSettings, so no need to show these in default inspector.
+ [SerializeField, HideInInspector]
+ private Color _outlineColor = Color.red;
+ [SerializeField, HideInInspector]
+ private int _outlineWidth = 4;
+ [SerializeField, HideInInspector]
+ private float _outlineIntensity = 2;
+ [SerializeField, HideInInspector]
+ private OutlineRenderFlags _outlineMode;
+
+ #endregion
+
+ #region interface
+
+ public static bool Equals(IOutlineSettings lhs, IOutlineSettings rhs)
+ {
+ if (lhs == null || rhs == null)
+ {
+ return false;
+ }
+
+ return lhs.OutlineColor == rhs.OutlineColor &&
+ lhs.OutlineWidth == rhs.OutlineWidth &&
+ lhs.OutlineRenderMode == rhs.OutlineRenderMode &&
+ Mathf.Approximately(lhs.OutlineIntensity, rhs.OutlineIntensity);
+ }
+
+ #endregion
+
+ #region IOutlineSettings
+
+ ///
+ public Color OutlineColor
+ {
+ get
+ {
+ return _outlineColor;
+ }
+ set
+ {
+ _outlineColor = value;
+ }
+ }
+
+ ///
+ public int OutlineWidth
+ {
+ get
+ {
+ return _outlineWidth;
+ }
+ set
+ {
+ _outlineWidth = Mathf.Clamp(value, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
+ }
+ }
+
+ ///
+ public float OutlineIntensity
+ {
+ get
+ {
+ return _outlineIntensity;
+ }
+ set
+ {
+ _outlineIntensity = Mathf.Clamp(value, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
+ }
+ }
+
+ ///
+ public OutlineRenderFlags OutlineRenderMode
+ {
+ get
+ {
+ return _outlineMode;
+ }
+ set
+ {
+ _outlineMode = value;
+ }
+ }
+
+ #endregion
+
+ #region IEquatable
+
+ ///
+ public bool Equals(IOutlineSettings other)
+ {
+ return Equals(this, other);
+ }
+
+ #endregion
+
+ #region Object
+
+ ///
+ public override bool Equals(object other)
+ {
+ return Equals(this, other as IOutlineSettings);
+ }
+
+ ///
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta
new file mode 100644
index 0000000..c6de014
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b579424fd3338724cba3155ee4d53475
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
new file mode 100644
index 0000000..a39ef7e
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
@@ -0,0 +1,178 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+
+namespace UnityFx.Outline
+{
+ [Serializable]
+ internal class OutlineSettingsInstance : IOutlineSettingsEx
+ {
+ #region data
+
+#pragma warning disable 0649
+
+ // NOTE: There are custom editors for public components, so no need to show these in default inspector.
+ [SerializeField, HideInInspector]
+ private OutlineSettings _outlineSettings;
+ [SerializeField, HideInInspector]
+ private Color _outlineColor = Color.red;
+ [SerializeField, HideInInspector]
+ private int _outlineWidth = 4;
+ [SerializeField, HideInInspector]
+ private float _outlineIntensity = 2;
+ [SerializeField, HideInInspector]
+ private OutlineRenderFlags _outlineMode;
+
+#pragma warning restore 0649
+
+ private OutlineResources _resources;
+
+ #endregion
+
+ #region interface
+
+ public OutlineResources OutlineResources
+ {
+ get
+ {
+ return _resources;
+ }
+ set
+ {
+ _resources = value;
+ }
+ }
+
+ public bool RequiresCameraDepth
+ {
+ get
+ {
+ var renderMode = _outlineMode;
+
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ renderMode = _outlineSettings.OutlineRenderMode;
+ }
+
+ return (renderMode & OutlineRenderFlags.EnableDepthTesting) != 0;
+ }
+ }
+
+ internal OutlineSettingsInstance()
+ {
+ }
+
+ internal OutlineSettingsInstance(OutlineResources resources)
+ {
+ _resources = resources;
+ }
+
+ #endregion
+
+ #region IOutlineSettingsEx
+
+ public OutlineSettings OutlineSettings
+ {
+ get
+ {
+ return _outlineSettings;
+ }
+ set
+ {
+ _outlineSettings = value;
+ }
+ }
+
+ #endregion
+
+ #region IOutlineSettings
+
+ ///
+ public Color OutlineColor
+ {
+ get
+ {
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ return _outlineSettings.OutlineColor;
+ }
+
+ return _outlineColor;
+ }
+ set
+ {
+ _outlineColor = value;
+ }
+ }
+
+ ///
+ public int OutlineWidth
+ {
+ get
+ {
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ return _outlineSettings.OutlineWidth;
+ }
+
+ return _outlineWidth;
+ }
+ set
+ {
+ _outlineWidth = Mathf.Clamp(value, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
+ }
+ }
+
+ ///
+ public float OutlineIntensity
+ {
+ get
+ {
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ return _outlineSettings.OutlineIntensity;
+ }
+
+ return _outlineIntensity;
+ }
+ set
+ {
+ _outlineIntensity = Mathf.Clamp(value, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
+ }
+ }
+
+ ///
+ public OutlineRenderFlags OutlineRenderMode
+ {
+ get
+ {
+ if (!ReferenceEquals(_outlineSettings, null))
+ {
+ return _outlineSettings.OutlineRenderMode;
+ }
+
+ return _outlineMode;
+ }
+ set
+ {
+ _outlineMode = value;
+ }
+ }
+
+ #endregion
+
+ #region IEquatable
+
+ public bool Equals(IOutlineSettings other)
+ {
+ return OutlineSettings.Equals(this, other);
+ }
+
+ #endregion
+
+ #region implementation
+ #endregion
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta
new file mode 100644
index 0000000..177c3cb
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8ea4c60e473b8ef4790934bb274993cc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties.meta
new file mode 100644
index 0000000..708e1e7
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7bd10545b6de6654b864faecdec920cd
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d7b9f2c
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("UnityFx.Outline")]
+[assembly: AssemblyProduct("UnityFx.Outline")]
+[assembly: AssemblyDescription("Screen-space outlines for Unity3d.")]
+#if DEBUG
+[assembly: AssemblyConfiguration("Debug")]
+#else
+[assembly: AssemblyConfiguration("Release")]
+#endif
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright © Alexander Bogarsukov 2019-2020")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// Make internals visible to the editor assembly.
+[assembly: InternalsVisibleTo("UnityFx.Outline.Editor")]
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs.meta
new file mode 100644
index 0000000..dd9f2bd
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Scripts/Properties/AssemblyInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1613c034178676349be3282789167284
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders.meta
new file mode 100644
index 0000000..bf1ab62
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: e4ede0e617beaeb4a8781136599aa84e
+folderAsset: yes
+timeCreated: 1566126961
+licenseType: Free
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
new file mode 100644
index 0000000..2febb62
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
@@ -0,0 +1,69 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+// Renders outline based on a texture produces by 'UnityF/Outline/RenderColor' output.
+// Modified version of 'Custom/Post Outline' shader taken from https://willweissman.wordpress.com/tutorials/shaders/unity-shaderlab-object-outlines/.
+Shader "UnityFx/Outline/HPass"
+{
+ Properties
+ {
+ _Width("Outline thickness (in pixels)", Range(1, 32)) = 5
+ }
+
+ SubShader
+ {
+ Cull Off
+ ZWrite Off
+ ZTest Always
+ Lighting Off
+
+ Pass
+ {
+ HLSLPROGRAM
+
+ #pragma vertex Vert
+ #pragma fragment Frag
+ #include "UnityCG.cginc"
+
+ CBUFFER_START(UnityPerMaterial)
+ int _Width;
+ CBUFFER_END
+
+ UNITY_DECLARE_TEX2D(_MaskTex);
+ float2 _MaskTex_TexelSize;
+ float _GaussSamples[32];
+
+ struct v2f
+ {
+ float4 pos : POSITION;
+ float2 uvs : TEXCOORD0;
+ };
+
+ v2f Vert(appdata_base v)
+ {
+ v2f o;
+
+ o.pos = float4(v.vertex.xy, 0.0, 1.0);
+ o.uvs = ComputeScreenPos(o.pos);
+
+ return o;
+ }
+
+ float Frag(v2f i) : COLOR
+ {
+ float TX_x = _MaskTex_TexelSize.x;
+ float intensity;
+ int n = _Width;
+
+ for (int k = -n; k <= n; k += 1)
+ {
+ intensity += UNITY_SAMPLE_TEX2D(_MaskTex, i.uvs.xy + float2(k * TX_x, 0)).r * _GaussSamples[abs(k)];
+ }
+
+ return intensity;
+ }
+
+ ENDHLSL
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta
new file mode 100644
index 0000000..bb55354
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 41c9acbf41c8245498ac9beab378de12
+timeCreated: 1566126977
+licenseType: Free
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
new file mode 100644
index 0000000..dbf1a18
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
@@ -0,0 +1,83 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+// Renders outline based on a texture produces by 'UnityF/Outline/RenderColor' output.
+// Modified version of 'Custom/Post Outline' shader taken from https://willweissman.wordpress.com/tutorials/shaders/unity-shaderlab-object-outlines/.
+Shader "UnityFx/Outline/VPassBlend"
+{
+ Properties
+ {
+ _Width("Outline thickness (in pixels)", Range(1, 32)) = 5
+ _Intensity("Outline intensity", Range(0.1, 100)) = 2
+ _Color("Outline color", Color) = (1, 0, 0, 1)
+ }
+
+ SubShader
+ {
+ Cull Off
+ ZWrite Off
+ ZTest Always
+ Lighting Off
+
+ Blend SrcAlpha OneMinusSrcAlpha
+
+ Pass
+ {
+ HLSLPROGRAM
+
+ #pragma vertex Vert
+ #pragma fragment Frag
+ #include "UnityCG.cginc"
+
+ CBUFFER_START(UnityPerMaterial)
+ float _Intensity;
+ int _Width;
+ float4 _Color;
+ CBUFFER_END
+
+ UNITY_DECLARE_TEX2D(_MaskTex);
+ float2 _MaskTex_TexelSize;
+ UNITY_DECLARE_TEX2D(_HPassTex);
+ float2 _HPassTex_TexelSize;
+ float _GaussSamples[32];
+
+ struct v2f
+ {
+ float4 pos : POSITION;
+ float2 uvs : TEXCOORD0;
+ };
+
+ v2f Vert(appdata_base v)
+ {
+ v2f o;
+
+ o.pos = float4(v.vertex.xy, 0.0, 1.0);
+ o.uvs = ComputeScreenPos(o.pos);
+
+ return o;
+ }
+
+ float4 Frag(v2f i) : COLOR
+ {
+ if (UNITY_SAMPLE_TEX2D(_MaskTex, i.uvs.xy).r > 0)
+ {
+ discard;
+ }
+
+ float TX_y = _MaskTex_TexelSize.y;
+ float intensity;
+ int n = _Width;
+
+ for (int k = -n; k <= _Width; k += 1)
+ {
+ intensity += UNITY_SAMPLE_TEX2D(_HPassTex, i.uvs.xy + float2(0, k * TX_y)).r * _GaussSamples[abs(k)];
+ }
+
+ intensity = _Intensity > 99 ? step(0.01, intensity) : intensity * _Intensity;
+ return float4(_Color.rgb, saturate(_Color.a * intensity));
+ }
+
+ ENDHLSL
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta
new file mode 100644
index 0000000..5852e4b
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1df0cb1700e142f4ca3b28297d3957da
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
new file mode 100644
index 0000000..bf53276
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
@@ -0,0 +1,43 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+// Renders everything with while color.
+// Modified version of 'Custom/DrawSimple' shader taken from https://willweissman.wordpress.com/tutorials/shaders/unity-shaderlab-object-outlines/.
+Shader "UnityFx/Outline/RenderColor"
+{
+ SubShader
+ {
+ Cull Off
+ ZWrite Off
+ ZTest LEqual
+ Lighting Off
+
+ Pass
+ {
+ HLSLPROGRAM
+
+ #pragma vertex Vert
+ #pragma fragment Frag
+ #include "UnityCG.cginc"
+
+ struct v2f
+ {
+ float4 pos: POSITION;
+ };
+
+ v2f Vert(v2f i)
+ {
+ v2f o;
+ o.pos = UnityObjectToClipPos(i.pos);
+ return o;
+ }
+
+ half4 Frag(): COLOR0
+ {
+ return half4(1, 1, 1, 1);
+ }
+
+ ENDHLSL
+ }
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta
new file mode 100644
index 0000000..66aa3a2
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: ac20fbf75bafe454aba5ef3c098349df
+timeCreated: 1566126977
+licenseType: Free
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef b/Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef
new file mode 100644
index 0000000..af0702d
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef
@@ -0,0 +1,3 @@
+{
+ "name": "UnityFx.Outline"
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta b/Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta
new file mode 100644
index 0000000..6a74c49
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: de7ed7f8e7092c144bd17cbabf282ba3
+timeCreated: 1566126961
+licenseType: Free
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/UnityFx.Outline/package.json b/Outline.Core/Packages/UnityFx.Outline/package.json
new file mode 100644
index 0000000..0dfd31d
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "com.unityfx.outline",
+ "version": "0.8.0",
+ "displayName": "Screen-space outline",
+ "description": "Configurable per-object and per-camera outlines. Both solid and blurred outline modes are supported (Gauss blur). The outlines can be easily customized either through scripts or with Unity editor (both in edit-time or runtime).",
+ "unity": "2017.2",
+ "keywords": [
+ "UnityFx",
+ "UnityFx.Outline",
+ "outline",
+ "post-effect"
+ ],
+ "category": "UnityFx",
+ "author": {
+ "name": "Arvtesh",
+ "email": "arvtesh@gmail.com"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/Arvtesh/UnityFx.Outline",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Arvtesh/UnityFx.Outline.git"
+ },
+ "bugs": {
+ "url": "https://github.com/Arvtesh/UnityFx.Outline/issues"
+ }
+}
diff --git a/Outline.Core/Packages/UnityFx.Outline/package.json.meta b/Outline.Core/Packages/UnityFx.Outline/package.json.meta
new file mode 100644
index 0000000..d824967
--- /dev/null
+++ b/Outline.Core/Packages/UnityFx.Outline/package.json.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 411b5b9873de2d244ac737335a5117d6
+timeCreated: 1566126977
+licenseType: Free
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.Core/Packages/manifest.json b/Outline.Core/Packages/manifest.json
new file mode 100644
index 0000000..2ca7506
--- /dev/null
+++ b/Outline.Core/Packages/manifest.json
@@ -0,0 +1,35 @@
+{
+ "dependencies": {
+ "com.unity.package-manager-ui": "2.0.8",
+ "com.unity.modules.ai": "1.0.0",
+ "com.unity.modules.animation": "1.0.0",
+ "com.unity.modules.assetbundle": "1.0.0",
+ "com.unity.modules.audio": "1.0.0",
+ "com.unity.modules.cloth": "1.0.0",
+ "com.unity.modules.director": "1.0.0",
+ "com.unity.modules.imageconversion": "1.0.0",
+ "com.unity.modules.imgui": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0",
+ "com.unity.modules.particlesystem": "1.0.0",
+ "com.unity.modules.physics": "1.0.0",
+ "com.unity.modules.physics2d": "1.0.0",
+ "com.unity.modules.screencapture": "1.0.0",
+ "com.unity.modules.terrain": "1.0.0",
+ "com.unity.modules.terrainphysics": "1.0.0",
+ "com.unity.modules.tilemap": "1.0.0",
+ "com.unity.modules.ui": "1.0.0",
+ "com.unity.modules.uielements": "1.0.0",
+ "com.unity.modules.umbra": "1.0.0",
+ "com.unity.modules.unityanalytics": "1.0.0",
+ "com.unity.modules.unitywebrequest": "1.0.0",
+ "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
+ "com.unity.modules.unitywebrequestaudio": "1.0.0",
+ "com.unity.modules.unitywebrequesttexture": "1.0.0",
+ "com.unity.modules.unitywebrequestwww": "1.0.0",
+ "com.unity.modules.vehicles": "1.0.0",
+ "com.unity.modules.video": "1.0.0",
+ "com.unity.modules.vr": "1.0.0",
+ "com.unity.modules.wind": "1.0.0",
+ "com.unity.modules.xr": "1.0.0"
+ }
+}
From 41e967eed5e3ce615976edb5280e687593bb023c Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 2 Apr 2020 14:41:27 +0300
Subject: [PATCH 31/39] Added post-processing specific project
---
Outline.PostProcessing/Assets/Examples.meta | 8 +
.../Assets/Examples/PostProcessing.meta | 8 +
.../PostProcessingProfile.asset | 39 ++
.../PostProcessingProfile.asset.meta | 8 +
.../PostProcessing/PostProcessingSample.unity | 644 ++++++++++++++++++
.../PostProcessingSample.unity.meta | 7 +
.../CHANGELOG.md | 9 +
.../CHANGELOG.md.meta | 7 +
.../UnityFx.Outline.PostProcessing/README.md | 11 +
.../README.md.meta | 7 +
.../Runtime.meta | 8 +
.../Runtime/Scripts.meta | 8 +
.../Runtime/Scripts/Outline.cs | 65 ++
.../Runtime/Scripts/Outline.cs.meta | 13 +
.../Runtime/Scripts/OutlineEffectRenderer.cs | 55 ++
.../Scripts/OutlineEffectRenderer.cs.meta | 11 +
.../UnityFx.Outline.PostProcessing.asmdef | 15 +
...UnityFx.Outline.PostProcessing.asmdef.meta | 7 +
.../package.json | 33 +
.../package.json.meta | 7 +
Outline.PostProcessing/Packages/manifest.json | 45 ++
21 files changed, 1015 insertions(+)
create mode 100644 Outline.PostProcessing/Assets/Examples.meta
create mode 100644 Outline.PostProcessing/Assets/Examples/PostProcessing.meta
create mode 100644 Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset
create mode 100644 Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta
create mode 100644 Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity
create mode 100644 Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json
create mode 100644 Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json.meta
create mode 100644 Outline.PostProcessing/Packages/manifest.json
diff --git a/Outline.PostProcessing/Assets/Examples.meta b/Outline.PostProcessing/Assets/Examples.meta
new file mode 100644
index 0000000..6594ef3
--- /dev/null
+++ b/Outline.PostProcessing/Assets/Examples.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a810a4ae77829ce4d90d97e71431392f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Assets/Examples/PostProcessing.meta b/Outline.PostProcessing/Assets/Examples/PostProcessing.meta
new file mode 100644
index 0000000..ff5cf73
--- /dev/null
+++ b/Outline.PostProcessing/Assets/Examples/PostProcessing.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0afa5bb63d529a84daf887e3dc44b420
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset
new file mode 100644
index 0000000..725ebe2
--- /dev/null
+++ b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset
@@ -0,0 +1,39 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3}
+ m_Name: PostProcessingProfile
+ m_EditorClassIdentifier:
+ settings:
+ - {fileID: 114600372921182068}
+--- !u!114 &114600372921182068
+MonoBehaviour:
+ m_ObjectHideFlags: 3
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 362f6fe821115814693a671c047d5f31, type: 3}
+ m_Name: Outline
+ m_EditorClassIdentifier:
+ active: 1
+ enabled:
+ overrideState: 1
+ value: 1
+ _defaultResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
+ Resources:
+ overrideState: 0
+ value: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
+ Layers:
+ overrideState: 0
+ value: {fileID: 0}
diff --git a/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta
new file mode 100644
index 0000000..c432c9a
--- /dev/null
+++ b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d4e92bcee87e63243abc9035c870abe2
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity
new file mode 100644
index 0000000..289e850
--- /dev/null
+++ b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity
@@ -0,0 +1,644 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!29 &1
+OcclusionCullingSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_OcclusionBakeSettings:
+ smallestOccluder: 5
+ smallestHole: 0.25
+ backfaceThreshold: 100
+ m_SceneGUID: 00000000000000000000000000000000
+ m_OcclusionCullingData: {fileID: 0}
+--- !u!104 &2
+RenderSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 9
+ m_Fog: 0
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+ m_FogMode: 3
+ m_FogDensity: 0.01
+ m_LinearFogStart: 0
+ m_LinearFogEnd: 300
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
+ m_AmbientIntensity: 1
+ m_AmbientMode: 0
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
+ m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
+ m_HaloStrength: 0.5
+ m_FlareStrength: 1
+ m_FlareFadeSpeed: 3
+ m_HaloTexture: {fileID: 0}
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
+ m_DefaultReflectionMode: 0
+ m_DefaultReflectionResolution: 128
+ m_ReflectionBounces: 1
+ m_ReflectionIntensity: 1
+ m_CustomReflection: {fileID: 0}
+ m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
+ m_UseRadianceAmbientProbe: 0
+--- !u!157 &3
+LightmapSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 11
+ m_GIWorkflowMode: 0
+ m_GISettings:
+ serializedVersion: 2
+ m_BounceScale: 1
+ m_IndirectOutputScale: 1
+ m_AlbedoBoost: 1
+ m_EnvironmentLightingMode: 0
+ m_EnableBakedLightmaps: 1
+ m_EnableRealtimeLightmaps: 1
+ m_LightmapEditorSettings:
+ serializedVersion: 10
+ m_Resolution: 2
+ m_BakeResolution: 40
+ m_AtlasSize: 1024
+ m_AO: 0
+ m_AOMaxDistance: 1
+ m_CompAOExponent: 1
+ m_CompAOExponentDirect: 0
+ m_Padding: 2
+ m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
+ m_TextureCompression: 1
+ m_FinalGather: 0
+ m_FinalGatherFiltering: 1
+ m_FinalGatherRayCount: 256
+ m_ReflectionCompression: 2
+ m_MixedBakeMode: 2
+ m_BakeBackend: 0
+ m_PVRSampling: 1
+ m_PVRDirectSampleCount: 32
+ m_PVRSampleCount: 500
+ m_PVRBounces: 2
+ m_PVRFilterTypeDirect: 0
+ m_PVRFilterTypeIndirect: 0
+ m_PVRFilterTypeAO: 0
+ m_PVRFilteringMode: 1
+ m_PVRCulling: 1
+ m_PVRFilteringGaussRadiusDirect: 1
+ m_PVRFilteringGaussRadiusIndirect: 5
+ m_PVRFilteringGaussRadiusAO: 2
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
+ m_PVRFilteringAtrousPositionSigmaAO: 1
+ m_ShowResolutionOverlay: 1
+ m_LightingDataAsset: {fileID: 0}
+ m_UseShadowmask: 1
+--- !u!196 &4
+NavMeshSettings:
+ serializedVersion: 2
+ m_ObjectHideFlags: 0
+ m_BuildSettings:
+ serializedVersion: 2
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.4
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ debug:
+ m_Flags: 0
+ m_NavMeshData: {fileID: 0}
+--- !u!1 &167171210
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 167171212}
+ - component: {fileID: 167171211}
+ m_Layer: 0
+ m_Name: Directional Light
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!108 &167171211
+Light:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 167171210}
+ m_Enabled: 1
+ serializedVersion: 8
+ m_Type: 1
+ m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
+ m_Intensity: 0.5
+ m_Range: 10
+ m_SpotAngle: 30
+ m_CookieSize: 10
+ m_Shadows:
+ m_Type: 2
+ m_Resolution: -1
+ m_CustomResolution: -1
+ m_Strength: 1
+ m_Bias: 0.05
+ m_NormalBias: 0.4
+ m_NearPlane: 0.2
+ m_Cookie: {fileID: 0}
+ m_DrawHalo: 0
+ m_Flare: {fileID: 0}
+ m_RenderMode: 0
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_Lightmapping: 4
+ m_LightShadowCasterMode: 0
+ m_AreaSize: {x: 1, y: 1}
+ m_BounceIntensity: 1
+ m_ColorTemperature: 6570
+ m_UseColorTemperature: 0
+ m_ShadowRadius: 0
+ m_ShadowAngle: 0
+--- !u!4 &167171212
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 167171210}
+ m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
+ m_LocalPosition: {x: 0, y: 3, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
+--- !u!1 &692811812
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 692811816}
+ - component: {fileID: 692811815}
+ - component: {fileID: 692811813}
+ m_Layer: 0
+ m_Name: Main Camera
+ m_TagString: MainCamera
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!114 &692811813
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 692811812}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ volumeTrigger: {fileID: 692811816}
+ volumeLayer:
+ serializedVersion: 2
+ m_Bits: 256
+ stopNaNPropagation: 1
+ finalBlitToCameraTarget: 0
+ antialiasingMode: 0
+ temporalAntialiasing:
+ jitterSpread: 0.75
+ sharpness: 0.25
+ stationaryBlending: 0.95
+ motionBlending: 0.85
+ subpixelMorphologicalAntialiasing:
+ quality: 2
+ 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:
+ linearDepth: 0
+ motionColorIntensity: 4
+ motionGridSize: 64
+ colorBlindnessType: 0
+ colorBlindnessStrength: 1
+ m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2}
+ m_ShowToolkit: 0
+ m_ShowCustomSorter: 0
+ breakBeforeColorGrading: 0
+ m_BeforeTransparentBundles: []
+ m_BeforeStackBundles:
+ - assemblyQualifiedName: UnityFx.Outline.PostProcessing.Outline, UnityFx.Outline.PostProcessing,
+ Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ m_AfterStackBundles: []
+--- !u!20 &692811815
+Camera:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 692811812}
+ m_Enabled: 1
+ serializedVersion: 2
+ m_ClearFlags: 1
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
+ m_projectionMatrixMode: 1
+ m_SensorSize: {x: 36, y: 24}
+ m_LensShift: {x: 0, y: 0}
+ m_GateFitMode: 2
+ m_FocalLength: 50
+ m_NormalizedViewPortRect:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ near clip plane: 0.3
+ far clip plane: 1000
+ field of view: 60
+ orthographic: 0
+ orthographic size: 5
+ m_Depth: -1
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_RenderingPath: -1
+ m_TargetTexture: {fileID: 0}
+ m_TargetDisplay: 0
+ m_TargetEye: 3
+ m_HDR: 1
+ m_AllowMSAA: 1
+ m_AllowDynamicResolution: 0
+ m_ForceIntoRT: 1
+ m_OcclusionCulling: 1
+ m_StereoConvergence: 10
+ m_StereoSeparation: 0.022
+--- !u!4 &692811816
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 692811812}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 1, z: -10}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children:
+ - {fileID: 1579373806}
+ - {fileID: 748173443}
+ - {fileID: 1789341921}
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &748173439
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 748173443}
+ - component: {fileID: 748173442}
+ - component: {fileID: 748173441}
+ - component: {fileID: 748173440}
+ m_Layer: 0
+ m_Name: Cube
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!23 &748173440
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 1
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 0
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+--- !u!65 &748173441
+BoxCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ serializedVersion: 2
+ m_Size: {x: 1, y: 1, z: 1}
+ m_Center: {x: 0, y: 0, z: 0}
+--- !u!33 &748173442
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!4 &748173443
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 748173439}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -1.51, y: 0, z: 4}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 692811816}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &880286468
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 880286470}
+ - component: {fileID: 880286469}
+ m_Layer: 8
+ m_Name: PostProcessingVolume
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!114 &880286469
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 880286468}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ sharedProfile: {fileID: 11400000, guid: d4e92bcee87e63243abc9035c870abe2, type: 2}
+ isGlobal: 1
+ blendDistance: 0
+ weight: 1
+ priority: 0
+--- !u!4 &880286470
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 880286468}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1579373802
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1579373806}
+ - component: {fileID: 1579373805}
+ - component: {fileID: 1579373804}
+ - component: {fileID: 1579373803}
+ m_Layer: 0
+ m_Name: Sphere
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!23 &1579373803
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 1
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 0
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+--- !u!135 &1579373804
+SphereCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ serializedVersion: 2
+ m_Radius: 0.5
+ m_Center: {x: 0, y: 0, z: 0}
+--- !u!33 &1579373805
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!4 &1579373806
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1579373802}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 4}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 692811816}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1789341920
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1789341921}
+ - component: {fileID: 1789341925}
+ - component: {fileID: 1789341924}
+ - component: {fileID: 1789341923}
+ m_Layer: 0
+ m_Name: Cylinder
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1789341921
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 1.5, y: 0, z: 4}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 692811816}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!23 &1789341923
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 1
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 0
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+--- !u!136 &1789341924
+CapsuleCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ m_Radius: 0.5
+ m_Height: 2
+ m_Direction: 1
+ m_Center: {x: 0, y: 0, z: 0}
+--- !u!33 &1789341925
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1789341920}
+ m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
diff --git a/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity.meta b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity.meta
new file mode 100644
index 0000000..8ca40bd
--- /dev/null
+++ b/Outline.PostProcessing/Assets/Examples/PostProcessing/PostProcessingSample.unity.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 4d21e5bd8f334a040a5dd6da35054df4
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md
new file mode 100644
index 0000000..3a73de8
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md
@@ -0,0 +1,9 @@
+# UnityFx.Outline.PostProcessing changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
+
+## [0.1.0] - unreleased
+
+### Added
+- Initial release.
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta
new file mode 100644
index 0000000..73d1d67
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d5d97340f52aca745b5b5d55c881ebc5
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md
new file mode 100644
index 0000000..1fc72d2
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md
@@ -0,0 +1,11 @@
+# UnityFx.Outline.PostProcessing
+
+## SUMMARY
+Screen-space outline effects for Unity Post-processing Stack v2.
+
+## USEFUL LINKS
+* [Github project](https://github.com/Arvtesh/UnityFx.Outline)
+* [npm package](https://www.npmjs.com/package/com.unityfx.outline.postprocessing)
+* [Documentation](https://github.com/Arvtesh/UnityFx.Outline/blob/master/README.md)
+* [License](https://github.com/Arvtesh/UnityFx.Outline/blob/master/LICENSE.md)
+* [Support](mailto:arvtesh@gmail.com)
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md.meta
new file mode 100644
index 0000000..48d5112
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/README.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 9b8ad98b0bcd54241b6b9c186551ecc3
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime.meta
new file mode 100644
index 0000000..9898607
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 58b0863f5e2afd341a39b8095514add5
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta
new file mode 100644
index 0000000..0fe0ce1
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 96bc3f6fffa960f4691dcc70b0dc8a02
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
new file mode 100644
index 0000000..e7ef71d
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
@@ -0,0 +1,65 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+using UnityEngine.Rendering.PostProcessing;
+
+namespace UnityFx.Outline.PostProcessing
+{
+ [Serializable]
+ [PostProcess(typeof(OutlineEffectRenderer), PostProcessEvent.BeforeStack, "UnityFx/Outline", false)]
+ public sealed class Outline : PostProcessEffectSettings
+ {
+#pragma warning disable 0649
+
+ [SerializeField]
+ private OutlineResources _defaultResources;
+
+#pragma warning restore 0649
+
+ [Serializable]
+ public class OutlineResourcesParameter : ParameterOverride
+ {
+ internal Outline Settings;
+
+ protected override void OnEnable()
+ {
+ if (value == null)
+ {
+ value = Settings._defaultResources;
+ }
+ }
+ }
+
+ [Serializable]
+ public class OutlineLayersParameter : ParameterOverride
+ {
+ }
+
+ // NOTE: PostProcessEffectSettings.OnEnable implementation requires the fields to be public to function properly.
+ public OutlineResourcesParameter Resources = new OutlineResourcesParameter();
+ public OutlineLayersParameter Layers = new OutlineLayersParameter();
+
+ public Outline()
+ {
+ // NOTE: The better way to do this is implementing OnEnable(), but it is already implemented as private (!!!) method in PostProcessEffectSettings.
+ Resources.Settings = this;
+ }
+
+ public override bool IsEnabledAndSupported(PostProcessRenderContext context)
+ {
+#if UNITY_EDITOR
+
+ // Don't render outline preview when the editor is not playing.
+ if (!Application.isPlaying)
+ {
+ return false;
+ }
+
+#endif
+
+ return base.IsEnabledAndSupported(context) && Resources != null && Layers != null && Layers.value != null;
+ }
+ }
+}
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta
new file mode 100644
index 0000000..063c836
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 362f6fe821115814693a671c047d5f31
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences:
+ - _defaultResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19,
+ type: 2}
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs
new file mode 100644
index 0000000..3b8cf2f
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs
@@ -0,0 +1,55 @@
+// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
+// See the LICENSE.md file in the project root for more information.
+
+using System;
+using UnityEngine;
+using UnityEngine.Rendering.PostProcessing;
+using UnityEngine.Scripting;
+
+namespace UnityFx.Outline.PostProcessing
+{
+ [Preserve]
+ public sealed class OutlineEffectRenderer : PostProcessEffectRenderer
+ {
+ private OutlineResources _defaultResources;
+
+ public override void Render(PostProcessRenderContext context)
+ {
+ OutlineResources resources;
+
+ if (settings.Resources.value != null)
+ {
+ resources = settings.Resources;
+ }
+ else
+ {
+ if (!_defaultResources)
+ {
+ _defaultResources = ScriptableObject.CreateInstance();
+ _defaultResources.ResetToDefaults();
+ _defaultResources.FullscreenTriangleMesh = RuntimeUtilities.fullscreenTriangle;
+ }
+
+ resources = _defaultResources;
+ }
+
+ if (resources && resources.IsValid)
+ {
+ using (var renderer = new OutlineRenderer(context.command, context.source, context.destination))
+ {
+ settings.Layers.value.Render(renderer, resources);
+ }
+ }
+ }
+
+ public override void Release()
+ {
+ if (_defaultResources)
+ {
+ ScriptableObject.Destroy(_defaultResources);
+ }
+
+ base.Release();
+ }
+ }
+}
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta
new file mode 100644
index 0000000..4fbea54
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 94b195a6784c3664eb4f501e87f38ce3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef
new file mode 100644
index 0000000..7ccfffc
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef
@@ -0,0 +1,15 @@
+{
+ "name": "UnityFx.Outline.PostProcessing",
+ "references": [
+ "Unity.Postprocessing.Runtime",
+ "UnityFx.Outline"
+ ],
+ "optionalUnityReferences": [],
+ "includePlatforms": [],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": []
+}
\ No newline at end of file
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta
new file mode 100644
index 0000000..c9386d2
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 8e3d165dc2f9115429adabaabad94f93
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json
new file mode 100644
index 0000000..a6caddb
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "com.unityfx.outline.postprocessing",
+ "version": "0.1.0",
+ "displayName": "Screen-space outline (Post-processing v2)",
+ "description": "Configurable outline for Unity post-processing stack (v2). Both solid and blurred modes supported (Gauss blur).",
+ "unity": "2018.4",
+ "dependencies": {
+ "com.unityfx.outline": "0.7.1",
+ "com.unity.postprocessing": "2.2.2"
+ },
+ "keywords": [
+ "UnityFx",
+ "UnityFx.Outline",
+ "UnityFx.Outline.PostProcessing",
+ "Outline",
+ "Post-processing",
+ "Post-effect"
+ ],
+ "category": "UnityFx",
+ "author": {
+ "name": "Arvtesh",
+ "email": "arvtesh@gmail.com"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/Arvtesh/UnityFx.Outline",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Arvtesh/UnityFx.Outline.git"
+ },
+ "bugs": {
+ "url": "https://github.com/Arvtesh/UnityFx.Outline/issues"
+ }
+}
diff --git a/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json.meta b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json.meta
new file mode 100644
index 0000000..62b5420
--- /dev/null
+++ b/Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing/package.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 5e0ccba19a9670b46ad359a388c4ddc5
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Outline.PostProcessing/Packages/manifest.json b/Outline.PostProcessing/Packages/manifest.json
new file mode 100644
index 0000000..215c50c
--- /dev/null
+++ b/Outline.PostProcessing/Packages/manifest.json
@@ -0,0 +1,45 @@
+{
+ "scopedRegistries": [
+ {
+ "name": "Arvtesh",
+ "url": "https://registry.npmjs.org/",
+ "scopes": [
+ "com.unityfx"
+ ]
+ }
+ ],
+ "dependencies": {
+ "com.unity.package-manager-ui": "2.0.8",
+ "com.unityfx.outline": "0.7.1",
+ "com.unity.modules.ai": "1.0.0",
+ "com.unity.modules.animation": "1.0.0",
+ "com.unity.modules.assetbundle": "1.0.0",
+ "com.unity.modules.audio": "1.0.0",
+ "com.unity.modules.cloth": "1.0.0",
+ "com.unity.modules.director": "1.0.0",
+ "com.unity.modules.imageconversion": "1.0.0",
+ "com.unity.modules.imgui": "1.0.0",
+ "com.unity.modules.jsonserialize": "1.0.0",
+ "com.unity.modules.particlesystem": "1.0.0",
+ "com.unity.modules.physics": "1.0.0",
+ "com.unity.modules.physics2d": "1.0.0",
+ "com.unity.modules.screencapture": "1.0.0",
+ "com.unity.modules.terrain": "1.0.0",
+ "com.unity.modules.terrainphysics": "1.0.0",
+ "com.unity.modules.tilemap": "1.0.0",
+ "com.unity.modules.ui": "1.0.0",
+ "com.unity.modules.uielements": "1.0.0",
+ "com.unity.modules.umbra": "1.0.0",
+ "com.unity.modules.unityanalytics": "1.0.0",
+ "com.unity.modules.unitywebrequest": "1.0.0",
+ "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
+ "com.unity.modules.unitywebrequestaudio": "1.0.0",
+ "com.unity.modules.unitywebrequesttexture": "1.0.0",
+ "com.unity.modules.unitywebrequestwww": "1.0.0",
+ "com.unity.modules.vehicles": "1.0.0",
+ "com.unity.modules.video": "1.0.0",
+ "com.unity.modules.vr": "1.0.0",
+ "com.unity.modules.wind": "1.0.0",
+ "com.unity.modules.xr": "1.0.0"
+ }
+}
From 5cc04a888a2f57ace10c9c59d5607b31a6c60b79 Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 2 Apr 2020 15:24:08 +0300
Subject: [PATCH 32/39] Added HDRP specific project
---
Assets/Examples.meta | 8 -
Assets/Examples/PostProcessing.meta | 8 -
.../PostProcessingProfile.asset | 39 --
.../PostProcessingProfile.asset.meta | 8 -
.../PostProcessing/PostProcessingSample.unity | 644 ------------------
.../PostProcessingSample.unity.meta | 7 -
Assets/Examples/SimplePerCamera.meta | 8 -
Assets/Examples/SimplePerCamera/Outline.unity | 586 ----------------
.../SimplePerCamera/Outline.unity.meta | 9 -
.../SimplePerCamera/OutlineEffectBuilder.cs | 88 ---
.../OutlineEffectBuilder.cs.meta | 13 -
.../SimplePerCamera/TestOutlineLayers.asset | 43 --
.../TestOutlineLayers.asset.meta | 10 -
Assets/Examples/SimplePerObject.meta | 8 -
.../SimplePerObject/TestOutlineSettings.asset | 18 -
.../TestOutlineSettings.asset.meta | 8 -
.../UnityFx.Outline.HDRP/CHANGELOG.md | 0
.../UnityFx.Outline.HDRP/CHANGELOG.md.meta | 0
.../Packages}/UnityFx.Outline.HDRP/README.md | 0
.../UnityFx.Outline.HDRP/README.md.meta | 0
.../UnityFx.Outline.HDRP/Runtime.meta | 0
.../UnityFx.Outline.HDRP/Runtime/Scripts.meta | 0
.../Runtime/Scripts/Outline.cs | 0
.../Runtime/Scripts/Outline.cs.meta | 0
.../Runtime/UnityFx.Outline.HDRP.asmdef | 0
.../Runtime/UnityFx.Outline.HDRP.asmdef.meta | 0
.../UnityFx.Outline.HDRP/package.json | 0
.../UnityFx.Outline.HDRP/package.json.meta | 0
.../Packages}/manifest.json | 4 +-
.../CHANGELOG.md | 9 -
.../CHANGELOG.md.meta | 7 -
.../UnityFx.Outline.PostProcessing/README.md | 11 -
.../README.md.meta | 7 -
.../Runtime.meta | 8 -
.../Runtime/Scripts.meta | 8 -
.../Runtime/Scripts/Outline.cs | 65 --
.../Runtime/Scripts/Outline.cs.meta | 13 -
.../Runtime/Scripts/OutlineEffectRenderer.cs | 55 --
.../Scripts/OutlineEffectRenderer.cs.meta | 11 -
.../UnityFx.Outline.PostProcessing.asmdef | 15 -
...UnityFx.Outline.PostProcessing.asmdef.meta | 7 -
.../package.json | 33 -
.../package.json.meta | 7 -
Packages/UnityFx.Outline/CHANGELOG.md | 106 ---
Packages/UnityFx.Outline/CHANGELOG.md.meta | 7 -
Packages/UnityFx.Outline/Editor.meta | 10 -
Packages/UnityFx.Outline/Editor/Scripts.meta | 10 -
.../Editor/Scripts/OutlineBehaviourEditor.cs | 84 ---
.../Scripts/OutlineBehaviourEditor.cs.meta | 13 -
.../Editor/Scripts/OutlineEditorUtility.cs | 201 ------
.../Scripts/OutlineEditorUtility.cs.meta | 11 -
.../Editor/Scripts/OutlineEffectEditor.cs | 59 --
.../Scripts/OutlineEffectEditor.cs.meta | 13 -
.../Scripts/OutlineLayerCollectionEditor.cs | 121 ----
.../OutlineLayerCollectionEditor.cs.meta | 11 -
.../Editor/Scripts/OutlineSettingsEditor.cs | 33 -
.../Scripts/OutlineSettingsEditor.cs.meta | 11 -
.../Editor/UnityFx.Outline.Editor.asmdef | 16 -
.../Editor/UnityFx.Outline.Editor.asmdef.meta | 9 -
Packages/UnityFx.Outline/README.md | 11 -
Packages/UnityFx.Outline/README.md.meta | 9 -
Packages/UnityFx.Outline/Runtime.meta | 10 -
Packages/UnityFx.Outline/Runtime/Prefabs.meta | 8 -
.../Runtime/Prefabs/OutlineResources.asset | 16 -
.../Prefabs/OutlineResources.asset.meta | 10 -
Packages/UnityFx.Outline/Runtime/Scripts.meta | 8 -
.../Runtime/Scripts/AssemblyInfo.cs | 29 -
.../Runtime/Scripts/AssemblyInfo.cs.meta | 11 -
.../Runtime/Scripts/IOutlineSettings.cs | 45 --
.../Runtime/Scripts/IOutlineSettings.cs.meta | 11 -
.../Runtime/Scripts/IOutlineSettingsEx.cs | 19 -
.../Scripts/IOutlineSettingsEx.cs.meta | 11 -
.../Runtime/Scripts/OutlineBehaviour.cs | 372 ----------
.../Runtime/Scripts/OutlineBehaviour.cs.meta | 15 -
.../Runtime/Scripts/OutlineEffect.cs | 240 -------
.../Runtime/Scripts/OutlineEffect.cs.meta | 15 -
.../Runtime/Scripts/OutlineLayer.cs | 494 --------------
.../Runtime/Scripts/OutlineLayer.cs.meta | 13 -
.../Runtime/Scripts/OutlineLayerCollection.cs | 291 --------
.../Scripts/OutlineLayerCollection.cs.meta | 13 -
.../Runtime/Scripts/OutlineRenderFlags.cs | 29 -
.../Scripts/OutlineRenderFlags.cs.meta | 11 -
.../Runtime/Scripts/OutlineRenderer.cs | 493 --------------
.../Runtime/Scripts/OutlineRenderer.cs.meta | 13 -
.../Scripts/OutlineRendererCollection.cs | 146 ----
.../Scripts/OutlineRendererCollection.cs.meta | 11 -
.../Runtime/Scripts/OutlineResources.cs | 234 -------
.../Runtime/Scripts/OutlineResources.cs.meta | 14 -
.../Runtime/Scripts/OutlineSettings.cs | 128 ----
.../Runtime/Scripts/OutlineSettings.cs.meta | 11 -
.../Scripts/OutlineSettingsInstance.cs | 178 -----
.../Scripts/OutlineSettingsInstance.cs.meta | 11 -
Packages/UnityFx.Outline/Runtime/Shaders.meta | 10 -
.../Runtime/Shaders/OutlinePass1.shader | 69 --
.../Runtime/Shaders/OutlinePass1.shader.meta | 10 -
.../Runtime/Shaders/OutlinePass2.shader | 83 ---
.../Runtime/Shaders/OutlinePass2.shader.meta | 8 -
.../Runtime/Shaders/OutlineRenderColor.shader | 43 --
.../Shaders/OutlineRenderColor.shader.meta | 10 -
.../Runtime/UnityFx.Outline.asmdef | 3 -
.../Runtime/UnityFx.Outline.asmdef.meta | 9 -
Packages/UnityFx.Outline/Tests.meta | 8 -
Packages/UnityFx.Outline/Tests/Editor.meta | 8 -
.../UnityFx.Outline/Tests/Editor/Scripts.meta | 8 -
.../Tests/Editor/Scripts/Helpers.meta | 8 -
.../Helpers/IOutlineSettingsExTests.cs | 98 ---
.../Helpers/IOutlineSettingsExTests.cs.meta | 11 -
.../Scripts/Helpers/IOutlineSettingsTests.cs | 195 ------
.../Helpers/IOutlineSettingsTests.cs.meta | 11 -
.../Editor/Scripts/OutlineBehaviourTests.cs | 33 -
.../Scripts/OutlineBehaviourTests.cs.meta | 11 -
.../Scripts/OutlineLayerCollectionTests.cs | 164 -----
.../OutlineLayerCollectionTests.cs.meta | 11 -
.../Tests/Editor/Scripts/OutlineLayerTests.cs | 117 ----
.../Editor/Scripts/OutlineLayerTests.cs.meta | 11 -
.../Editor/Scripts/OutlineRendererTests.cs | 47 --
.../Scripts/OutlineRendererTests.cs.meta | 11 -
.../Editor/Scripts/OutlineSettingsTests.cs | 32 -
.../Scripts/OutlineSettingsTests.cs.meta | 11 -
.../UnityFx.Outline.Editor.Tests.asmdef | 19 -
.../UnityFx.Outline.Editor.Tests.asmdef.meta | 7 -
Packages/UnityFx.Outline/package.json | 27 -
Packages/UnityFx.Outline/package.json.meta | 9 -
123 files changed, 2 insertions(+), 6510 deletions(-)
delete mode 100644 Assets/Examples.meta
delete mode 100644 Assets/Examples/PostProcessing.meta
delete mode 100644 Assets/Examples/PostProcessing/PostProcessingProfile.asset
delete mode 100644 Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta
delete mode 100644 Assets/Examples/PostProcessing/PostProcessingSample.unity
delete mode 100644 Assets/Examples/PostProcessing/PostProcessingSample.unity.meta
delete mode 100644 Assets/Examples/SimplePerCamera.meta
delete mode 100644 Assets/Examples/SimplePerCamera/Outline.unity
delete mode 100644 Assets/Examples/SimplePerCamera/Outline.unity.meta
delete mode 100644 Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs
delete mode 100644 Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta
delete mode 100644 Assets/Examples/SimplePerCamera/TestOutlineLayers.asset
delete mode 100644 Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta
delete mode 100644 Assets/Examples/SimplePerObject.meta
delete mode 100644 Assets/Examples/SimplePerObject/TestOutlineSettings.asset
delete mode 100644 Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/CHANGELOG.md (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/CHANGELOG.md.meta (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/README.md (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/README.md.meta (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/Runtime.meta (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/Runtime/Scripts.meta (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/package.json (100%)
rename {Packages => Outline.HDRP/Packages}/UnityFx.Outline.HDRP/package.json.meta (100%)
rename {Packages => Outline.HDRP/Packages}/manifest.json (91%)
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/README.md
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/README.md.meta
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime.meta
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/package.json
delete mode 100644 Packages/UnityFx.Outline.PostProcessing/package.json.meta
delete mode 100644 Packages/UnityFx.Outline/CHANGELOG.md
delete mode 100644 Packages/UnityFx.Outline/CHANGELOG.md.meta
delete mode 100644 Packages/UnityFx.Outline/Editor.meta
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts.meta
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs
delete mode 100644 Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef
delete mode 100644 Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta
delete mode 100644 Packages/UnityFx.Outline/README.md
delete mode 100644 Packages/UnityFx.Outline/README.md.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Prefabs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset
delete mode 100644 Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
delete mode 100644 Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Shaders.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
delete mode 100644 Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
delete mode 100644 Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
delete mode 100644 Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta
delete mode 100644 Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef
delete mode 100644 Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta
delete mode 100644 Packages/UnityFx.Outline/Tests.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef
delete mode 100644 Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef.meta
delete mode 100644 Packages/UnityFx.Outline/package.json
delete mode 100644 Packages/UnityFx.Outline/package.json.meta
diff --git a/Assets/Examples.meta b/Assets/Examples.meta
deleted file mode 100644
index 040f581..0000000
--- a/Assets/Examples.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: cd9a1f8eda7b3ae4da8c3a27817dae4e
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/PostProcessing.meta b/Assets/Examples/PostProcessing.meta
deleted file mode 100644
index ff5cf73..0000000
--- a/Assets/Examples/PostProcessing.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 0afa5bb63d529a84daf887e3dc44b420
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/PostProcessing/PostProcessingProfile.asset b/Assets/Examples/PostProcessing/PostProcessingProfile.asset
deleted file mode 100644
index 725ebe2..0000000
--- a/Assets/Examples/PostProcessing/PostProcessingProfile.asset
+++ /dev/null
@@ -1,39 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3}
- m_Name: PostProcessingProfile
- m_EditorClassIdentifier:
- settings:
- - {fileID: 114600372921182068}
---- !u!114 &114600372921182068
-MonoBehaviour:
- m_ObjectHideFlags: 3
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 362f6fe821115814693a671c047d5f31, type: 3}
- m_Name: Outline
- m_EditorClassIdentifier:
- active: 1
- enabled:
- overrideState: 1
- value: 1
- _defaultResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
- Resources:
- overrideState: 0
- value: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
- Layers:
- overrideState: 0
- value: {fileID: 0}
diff --git a/Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta b/Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta
deleted file mode 100644
index c432c9a..0000000
--- a/Assets/Examples/PostProcessing/PostProcessingProfile.asset.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: d4e92bcee87e63243abc9035c870abe2
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/PostProcessing/PostProcessingSample.unity b/Assets/Examples/PostProcessing/PostProcessingSample.unity
deleted file mode 100644
index 289e850..0000000
--- a/Assets/Examples/PostProcessing/PostProcessingSample.unity
+++ /dev/null
@@ -1,644 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!29 &1
-OcclusionCullingSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_OcclusionBakeSettings:
- smallestOccluder: 5
- smallestHole: 0.25
- backfaceThreshold: 100
- m_SceneGUID: 00000000000000000000000000000000
- m_OcclusionCullingData: {fileID: 0}
---- !u!104 &2
-RenderSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 9
- m_Fog: 0
- m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
- m_FogMode: 3
- m_FogDensity: 0.01
- m_LinearFogStart: 0
- m_LinearFogEnd: 300
- m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
- m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
- m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
- m_AmbientIntensity: 1
- m_AmbientMode: 0
- m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
- m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
- m_HaloStrength: 0.5
- m_FlareStrength: 1
- m_FlareFadeSpeed: 3
- m_HaloTexture: {fileID: 0}
- m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
- m_DefaultReflectionMode: 0
- m_DefaultReflectionResolution: 128
- m_ReflectionBounces: 1
- m_ReflectionIntensity: 1
- m_CustomReflection: {fileID: 0}
- m_Sun: {fileID: 0}
- m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
- m_UseRadianceAmbientProbe: 0
---- !u!157 &3
-LightmapSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 11
- m_GIWorkflowMode: 0
- m_GISettings:
- serializedVersion: 2
- m_BounceScale: 1
- m_IndirectOutputScale: 1
- m_AlbedoBoost: 1
- m_EnvironmentLightingMode: 0
- m_EnableBakedLightmaps: 1
- m_EnableRealtimeLightmaps: 1
- m_LightmapEditorSettings:
- serializedVersion: 10
- m_Resolution: 2
- m_BakeResolution: 40
- m_AtlasSize: 1024
- m_AO: 0
- m_AOMaxDistance: 1
- m_CompAOExponent: 1
- m_CompAOExponentDirect: 0
- m_Padding: 2
- m_LightmapParameters: {fileID: 0}
- m_LightmapsBakeMode: 1
- m_TextureCompression: 1
- m_FinalGather: 0
- m_FinalGatherFiltering: 1
- m_FinalGatherRayCount: 256
- m_ReflectionCompression: 2
- m_MixedBakeMode: 2
- m_BakeBackend: 0
- m_PVRSampling: 1
- m_PVRDirectSampleCount: 32
- m_PVRSampleCount: 500
- m_PVRBounces: 2
- m_PVRFilterTypeDirect: 0
- m_PVRFilterTypeIndirect: 0
- m_PVRFilterTypeAO: 0
- m_PVRFilteringMode: 1
- m_PVRCulling: 1
- m_PVRFilteringGaussRadiusDirect: 1
- m_PVRFilteringGaussRadiusIndirect: 5
- m_PVRFilteringGaussRadiusAO: 2
- m_PVRFilteringAtrousPositionSigmaDirect: 0.5
- m_PVRFilteringAtrousPositionSigmaIndirect: 2
- m_PVRFilteringAtrousPositionSigmaAO: 1
- m_ShowResolutionOverlay: 1
- m_LightingDataAsset: {fileID: 0}
- m_UseShadowmask: 1
---- !u!196 &4
-NavMeshSettings:
- serializedVersion: 2
- m_ObjectHideFlags: 0
- m_BuildSettings:
- serializedVersion: 2
- agentTypeID: 0
- agentRadius: 0.5
- agentHeight: 2
- agentSlope: 45
- agentClimb: 0.4
- ledgeDropHeight: 0
- maxJumpAcrossDistance: 0
- minRegionArea: 2
- manualCellSize: 0
- cellSize: 0.16666667
- manualTileSize: 0
- tileSize: 256
- accuratePlacement: 0
- debug:
- m_Flags: 0
- m_NavMeshData: {fileID: 0}
---- !u!1 &167171210
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 167171212}
- - component: {fileID: 167171211}
- m_Layer: 0
- m_Name: Directional Light
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!108 &167171211
-Light:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 167171210}
- m_Enabled: 1
- serializedVersion: 8
- m_Type: 1
- m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
- m_Intensity: 0.5
- m_Range: 10
- m_SpotAngle: 30
- m_CookieSize: 10
- m_Shadows:
- m_Type: 2
- m_Resolution: -1
- m_CustomResolution: -1
- m_Strength: 1
- m_Bias: 0.05
- m_NormalBias: 0.4
- m_NearPlane: 0.2
- m_Cookie: {fileID: 0}
- m_DrawHalo: 0
- m_Flare: {fileID: 0}
- m_RenderMode: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_Lightmapping: 4
- m_LightShadowCasterMode: 0
- m_AreaSize: {x: 1, y: 1}
- m_BounceIntensity: 1
- m_ColorTemperature: 6570
- m_UseColorTemperature: 0
- m_ShadowRadius: 0
- m_ShadowAngle: 0
---- !u!4 &167171212
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 167171210}
- m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
- m_LocalPosition: {x: 0, y: 3, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
---- !u!1 &692811812
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 692811816}
- - component: {fileID: 692811815}
- - component: {fileID: 692811813}
- m_Layer: 0
- m_Name: Main Camera
- m_TagString: MainCamera
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &692811813
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 692811812}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- volumeTrigger: {fileID: 692811816}
- volumeLayer:
- serializedVersion: 2
- m_Bits: 256
- stopNaNPropagation: 1
- finalBlitToCameraTarget: 0
- antialiasingMode: 0
- temporalAntialiasing:
- jitterSpread: 0.75
- sharpness: 0.25
- stationaryBlending: 0.95
- motionBlending: 0.85
- subpixelMorphologicalAntialiasing:
- quality: 2
- 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:
- linearDepth: 0
- motionColorIntensity: 4
- motionGridSize: 64
- colorBlindnessType: 0
- colorBlindnessStrength: 1
- m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2}
- m_ShowToolkit: 0
- m_ShowCustomSorter: 0
- breakBeforeColorGrading: 0
- m_BeforeTransparentBundles: []
- m_BeforeStackBundles:
- - assemblyQualifiedName: UnityFx.Outline.PostProcessing.Outline, UnityFx.Outline.PostProcessing,
- Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- m_AfterStackBundles: []
---- !u!20 &692811815
-Camera:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 692811812}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
- m_projectionMatrixMode: 1
- m_SensorSize: {x: 36, y: 24}
- m_LensShift: {x: 0, y: 0}
- m_GateFitMode: 2
- m_FocalLength: 50
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: 0.3
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: -1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_TargetEye: 3
- m_HDR: 1
- m_AllowMSAA: 1
- m_AllowDynamicResolution: 0
- m_ForceIntoRT: 1
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: 0.022
---- !u!4 &692811816
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 692811812}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 1, z: -10}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 1579373806}
- - {fileID: 748173443}
- - {fileID: 1789341921}
- m_Father: {fileID: 0}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &748173439
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 748173443}
- - component: {fileID: 748173442}
- - component: {fileID: 748173441}
- - component: {fileID: 748173440}
- m_Layer: 0
- m_Name: Cube
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!23 &748173440
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_DynamicOccludee: 1
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_PreserveUVs: 1
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 0
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
---- !u!65 &748173441
-BoxCollider:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_Material: {fileID: 0}
- m_IsTrigger: 0
- m_Enabled: 1
- serializedVersion: 2
- m_Size: {x: 1, y: 1, z: 1}
- m_Center: {x: 0, y: 0, z: 0}
---- !u!33 &748173442
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
---- !u!4 &748173443
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: -1.51, y: 0, z: 4}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 692811816}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &880286468
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 880286470}
- - component: {fileID: 880286469}
- m_Layer: 8
- m_Name: PostProcessingVolume
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &880286469
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 880286468}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- sharedProfile: {fileID: 11400000, guid: d4e92bcee87e63243abc9035c870abe2, type: 2}
- isGlobal: 1
- blendDistance: 0
- weight: 1
- priority: 0
---- !u!4 &880286470
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 880286468}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 2
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &1579373802
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 1579373806}
- - component: {fileID: 1579373805}
- - component: {fileID: 1579373804}
- - component: {fileID: 1579373803}
- m_Layer: 0
- m_Name: Sphere
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!23 &1579373803
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_DynamicOccludee: 1
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_PreserveUVs: 1
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 0
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
---- !u!135 &1579373804
-SphereCollider:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_Material: {fileID: 0}
- m_IsTrigger: 0
- m_Enabled: 1
- serializedVersion: 2
- m_Radius: 0.5
- m_Center: {x: 0, y: 0, z: 0}
---- !u!33 &1579373805
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
---- !u!4 &1579373806
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 4}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 692811816}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &1789341920
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 1789341921}
- - component: {fileID: 1789341925}
- - component: {fileID: 1789341924}
- - component: {fileID: 1789341923}
- m_Layer: 0
- m_Name: Cylinder
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &1789341921
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 1.5, y: 0, z: 4}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 692811816}
- m_RootOrder: 2
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!23 &1789341923
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_DynamicOccludee: 1
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_PreserveUVs: 1
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 0
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
---- !u!136 &1789341924
-CapsuleCollider:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_Material: {fileID: 0}
- m_IsTrigger: 0
- m_Enabled: 1
- m_Radius: 0.5
- m_Height: 2
- m_Direction: 1
- m_Center: {x: 0, y: 0, z: 0}
---- !u!33 &1789341925
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
diff --git a/Assets/Examples/PostProcessing/PostProcessingSample.unity.meta b/Assets/Examples/PostProcessing/PostProcessingSample.unity.meta
deleted file mode 100644
index 8ca40bd..0000000
--- a/Assets/Examples/PostProcessing/PostProcessingSample.unity.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 4d21e5bd8f334a040a5dd6da35054df4
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/SimplePerCamera.meta b/Assets/Examples/SimplePerCamera.meta
deleted file mode 100644
index 31b3630..0000000
--- a/Assets/Examples/SimplePerCamera.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 874c6e35dd593604d9dc8bf919bc94d7
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/SimplePerCamera/Outline.unity b/Assets/Examples/SimplePerCamera/Outline.unity
deleted file mode 100644
index c172ec7..0000000
--- a/Assets/Examples/SimplePerCamera/Outline.unity
+++ /dev/null
@@ -1,586 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!29 &1
-OcclusionCullingSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_OcclusionBakeSettings:
- smallestOccluder: 5
- smallestHole: 0.25
- backfaceThreshold: 100
- m_SceneGUID: 00000000000000000000000000000000
- m_OcclusionCullingData: {fileID: 0}
---- !u!104 &2
-RenderSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 9
- m_Fog: 0
- m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
- m_FogMode: 3
- m_FogDensity: 0.01
- m_LinearFogStart: 0
- m_LinearFogEnd: 300
- m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
- m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
- m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
- m_AmbientIntensity: 1
- m_AmbientMode: 0
- m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
- m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
- m_HaloStrength: 0.5
- m_FlareStrength: 1
- m_FlareFadeSpeed: 3
- m_HaloTexture: {fileID: 0}
- m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
- m_DefaultReflectionMode: 0
- m_DefaultReflectionResolution: 128
- m_ReflectionBounces: 1
- m_ReflectionIntensity: 1
- m_CustomReflection: {fileID: 0}
- m_Sun: {fileID: 0}
- m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
- m_UseRadianceAmbientProbe: 0
---- !u!157 &3
-LightmapSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 11
- m_GIWorkflowMode: 0
- m_GISettings:
- serializedVersion: 2
- m_BounceScale: 1
- m_IndirectOutputScale: 1
- m_AlbedoBoost: 1
- m_EnvironmentLightingMode: 0
- m_EnableBakedLightmaps: 1
- m_EnableRealtimeLightmaps: 1
- m_LightmapEditorSettings:
- serializedVersion: 10
- m_Resolution: 2
- m_BakeResolution: 40
- m_AtlasSize: 1024
- m_AO: 0
- m_AOMaxDistance: 1
- m_CompAOExponent: 1
- m_CompAOExponentDirect: 0
- m_Padding: 2
- m_LightmapParameters: {fileID: 0}
- m_LightmapsBakeMode: 1
- m_TextureCompression: 1
- m_FinalGather: 0
- m_FinalGatherFiltering: 1
- m_FinalGatherRayCount: 256
- m_ReflectionCompression: 2
- m_MixedBakeMode: 2
- m_BakeBackend: 0
- m_PVRSampling: 1
- m_PVRDirectSampleCount: 32
- m_PVRSampleCount: 500
- m_PVRBounces: 2
- m_PVRFilterTypeDirect: 0
- m_PVRFilterTypeIndirect: 0
- m_PVRFilterTypeAO: 0
- m_PVRFilteringMode: 1
- m_PVRCulling: 1
- m_PVRFilteringGaussRadiusDirect: 1
- m_PVRFilteringGaussRadiusIndirect: 5
- m_PVRFilteringGaussRadiusAO: 2
- m_PVRFilteringAtrousPositionSigmaDirect: 0.5
- m_PVRFilteringAtrousPositionSigmaIndirect: 2
- m_PVRFilteringAtrousPositionSigmaAO: 1
- m_ShowResolutionOverlay: 1
- m_LightingDataAsset: {fileID: 0}
- m_UseShadowmask: 1
---- !u!196 &4
-NavMeshSettings:
- serializedVersion: 2
- m_ObjectHideFlags: 0
- m_BuildSettings:
- serializedVersion: 2
- agentTypeID: 0
- agentRadius: 0.5
- agentHeight: 2
- agentSlope: 45
- agentClimb: 0.4
- ledgeDropHeight: 0
- maxJumpAcrossDistance: 0
- minRegionArea: 2
- manualCellSize: 0
- cellSize: 0.16666667
- manualTileSize: 0
- tileSize: 256
- accuratePlacement: 0
- debug:
- m_Flags: 0
- m_NavMeshData: {fileID: 0}
---- !u!1 &167171210
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 167171212}
- - component: {fileID: 167171211}
- m_Layer: 0
- m_Name: Directional Light
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!108 &167171211
-Light:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 167171210}
- m_Enabled: 1
- serializedVersion: 8
- m_Type: 1
- m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
- m_Intensity: 0.5
- m_Range: 10
- m_SpotAngle: 30
- m_CookieSize: 10
- m_Shadows:
- m_Type: 2
- m_Resolution: -1
- m_CustomResolution: -1
- m_Strength: 1
- m_Bias: 0.05
- m_NormalBias: 0.4
- m_NearPlane: 0.2
- m_Cookie: {fileID: 0}
- m_DrawHalo: 0
- m_Flare: {fileID: 0}
- m_RenderMode: 0
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_Lightmapping: 4
- m_LightShadowCasterMode: 0
- m_AreaSize: {x: 1, y: 1}
- m_BounceIntensity: 1
- m_ColorTemperature: 6570
- m_UseColorTemperature: 0
- m_ShadowRadius: 0
- m_ShadowAngle: 0
---- !u!4 &167171212
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 167171210}
- m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
- m_LocalPosition: {x: 0, y: 3, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
---- !u!1 &692811812
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 692811816}
- - component: {fileID: 692811815}
- - component: {fileID: 692811818}
- - component: {fileID: 692811817}
- m_Layer: 0
- m_Name: Main Camera
- m_TagString: MainCamera
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!20 &692811815
-Camera:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 692811812}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
- m_projectionMatrixMode: 1
- m_SensorSize: {x: 36, y: 24}
- m_LensShift: {x: 0, y: 0}
- m_GateFitMode: 2
- m_FocalLength: 50
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: 0.3
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: -1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_TargetEye: 3
- m_HDR: 1
- m_AllowMSAA: 1
- m_AllowDynamicResolution: 0
- m_ForceIntoRT: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: 0.022
---- !u!4 &692811816
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 692811812}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 1, z: -10}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 1579373806}
- - {fileID: 748173443}
- - {fileID: 1789341921}
- m_Father: {fileID: 0}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &692811817
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 692811812}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 5a318c96b1bc1614683eccf7abd717a1, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- _outlineGos:
- - {fileID: 1579373802}
- - {fileID: 748173439}
---- !u!114 &692811818
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 692811812}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 270d3185d159bf54fb4cddbb42235437, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
- _outlineLayers: {fileID: 11400000, guid: 3a6c3b3c5f6e3ad4ab8e09fc219865bd, type: 2}
- _cameraEvent: 18
---- !u!1 &748173439
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 748173443}
- - component: {fileID: 748173442}
- - component: {fileID: 748173441}
- - component: {fileID: 748173440}
- m_Layer: 0
- m_Name: Cube
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!23 &748173440
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_DynamicOccludee: 1
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_PreserveUVs: 1
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 0
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
---- !u!65 &748173441
-BoxCollider:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_Material: {fileID: 0}
- m_IsTrigger: 0
- m_Enabled: 1
- serializedVersion: 2
- m_Size: {x: 1, y: 1, z: 1}
- m_Center: {x: 0, y: 0, z: 0}
---- !u!33 &748173442
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
---- !u!4 &748173443
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 748173439}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: -1, y: 0, z: 5.58}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 692811816}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &1579373802
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 1579373806}
- - component: {fileID: 1579373805}
- - component: {fileID: 1579373804}
- - component: {fileID: 1579373803}
- m_Layer: 0
- m_Name: Sphere
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!23 &1579373803
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_DynamicOccludee: 1
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_PreserveUVs: 1
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 0
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
---- !u!135 &1579373804
-SphereCollider:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_Material: {fileID: 0}
- m_IsTrigger: 0
- m_Enabled: 1
- serializedVersion: 2
- m_Radius: 0.5
- m_Center: {x: 0, y: 0, z: 0}
---- !u!33 &1579373805
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
---- !u!4 &1579373806
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1579373802}
- m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 4}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 692811816}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &1789341920
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 1789341921}
- - component: {fileID: 1789341925}
- - component: {fileID: 1789341924}
- - component: {fileID: 1789341923}
- - component: {fileID: 1789341922}
- m_Layer: 0
- m_Name: Cylinder
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &1789341921
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 1.5, y: 0, z: 4}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 692811816}
- m_RootOrder: 2
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &1789341922
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 271c580db5fd384429cdac899152e9e0, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19, type: 2}
- _outlineSettings:
- _outlineSettings: {fileID: 0}
- _outlineColor: {r: 0, g: 1, b: 0, a: 1}
- _outlineWidth: 15
- _outlineIntensity: 2
- _outlineMode: 1
- _depthTestEnabled: 0
---- !u!23 &1789341923
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_Enabled: 1
- m_CastShadows: 1
- m_ReceiveShadows: 1
- m_DynamicOccludee: 1
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_PreserveUVs: 1
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 0
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
---- !u!136 &1789341924
-CapsuleCollider:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_Material: {fileID: 0}
- m_IsTrigger: 0
- m_Enabled: 1
- m_Radius: 0.5
- m_Height: 2
- m_Direction: 1
- m_Center: {x: 0, y: 0, z: 0}
---- !u!33 &1789341925
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1789341920}
- m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
diff --git a/Assets/Examples/SimplePerCamera/Outline.unity.meta b/Assets/Examples/SimplePerCamera/Outline.unity.meta
deleted file mode 100644
index bb769c6..0000000
--- a/Assets/Examples/SimplePerCamera/Outline.unity.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: e1f1f5e7ceb61b746b9f2016f0e53a93
-timeCreated: 1566127107
-licenseType: Free
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs b/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs
deleted file mode 100644
index 444b39c..0000000
--- a/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEngine;
-
-namespace UnityFx.Outline.Examples
-{
- ///
- /// Helperr class for managing outlines from editor.
- ///
- [RequireComponent(typeof(OutlineEffect))]
- public class OutlineEffectBuilder : MonoBehaviour
- {
- #region data
-
-#pragma warning disable 0649
-
- [SerializeField]
- private GameObject[] _outlineGos;
-
-#pragma warning restore 0649
-
- private OutlineEffect _outlineEffect;
- private OutlineLayer _outlineLayer;
-
- #endregion
-
- #region MonoBehaviour
-
- private void Awake()
- {
- if (_outlineEffect == null)
- {
- _outlineEffect = GetComponent();
- }
-
- if (_outlineLayer == null)
- {
- if (_outlineEffect.OutlineLayers.Count > 0)
- {
- _outlineLayer = _outlineEffect.OutlineLayers[0];
- }
- else
- {
- _outlineLayer = new OutlineLayer();
- _outlineEffect.OutlineLayers.Add(_outlineLayer);
- }
- }
-
- foreach (var go in _outlineGos)
- {
- if (go)
- {
- _outlineLayer.Add(go);
- }
- }
- }
-
- private void OnValidate()
- {
- if (_outlineEffect == null)
- {
- _outlineEffect = GetComponent();
- }
-
- if (_outlineEffect.OutlineLayers.Count > 0)
- {
- _outlineLayer = _outlineEffect.OutlineLayers[0];
- }
- else
- {
- _outlineLayer = new OutlineLayer();
- _outlineEffect.OutlineLayers.Add(_outlineLayer);
- }
-
- foreach (var go in _outlineGos)
- {
- if (go)
- {
- _outlineLayer.Add(go);
- }
- }
- }
-
- #endregion
- }
-}
diff --git a/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta b/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta
deleted file mode 100644
index 7150935..0000000
--- a/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 5a318c96b1bc1614683eccf7abd717a1
-timeCreated: 1566138009
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset b/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset
deleted file mode 100644
index 3de703c..0000000
--- a/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset
+++ /dev/null
@@ -1,43 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 57d0c11168277cf4eb3b4b89706e6aa5, type: 3}
- m_Name: TestOutlineLayers
- m_EditorClassIdentifier:
- _layers:
- - _settings:
- _outlineSettings: {fileID: 11400000, guid: 45705bbb29366194eb01ca517d80967c,
- type: 2}
- _outlineColor: {r: 1, g: 0, b: 0, a: 1}
- _outlineWidth: 5
- _outlineIntensity: 2
- _outlineMode: 0
- _name:
- _zOrder: 0
- _enabled: 1
- - _settings:
- _outlineSettings: {fileID: 0}
- _outlineColor: {r: 1, g: 1, b: 0, a: 1}
- _outlineWidth: 15
- _outlineIntensity: 2
- _outlineMode: 1
- _name:
- _zOrder: 0
- _enabled: 1
- - _settings:
- _outlineSettings: {fileID: 0}
- _outlineColor: {r: 1, g: 0, b: 1, a: 1}
- _outlineWidth: 4
- _outlineIntensity: 2
- _outlineMode: 0
- _name:
- _zOrder: 0
- _enabled: 1
diff --git a/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta b/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta
deleted file mode 100644
index 354a62d..0000000
--- a/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 3a6c3b3c5f6e3ad4ab8e09fc219865bd
-timeCreated: 1566565181
-licenseType: Pro
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/SimplePerObject.meta b/Assets/Examples/SimplePerObject.meta
deleted file mode 100644
index 9c27014..0000000
--- a/Assets/Examples/SimplePerObject.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: dc9211a2b55b6d44098fcc852d15936c
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset b/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
deleted file mode 100644
index a32e433..0000000
--- a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset
+++ /dev/null
@@ -1,18 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: b579424fd3338724cba3155ee4d53475, type: 3}
- m_Name: TestOutlineSettings
- m_EditorClassIdentifier:
- _outlineColor: {r: 1, g: 0, b: 0, a: 1}
- _outlineWidth: 5
- _outlineIntensity: 1
- _outlineMode: 0
diff --git a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta b/Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta
deleted file mode 100644
index 253e14e..0000000
--- a/Assets/Examples/SimplePerObject/TestOutlineSettings.asset.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 45705bbb29366194eb01ca517d80967c
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.HDRP/CHANGELOG.md b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/CHANGELOG.md
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/CHANGELOG.md
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/CHANGELOG.md
diff --git a/Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/CHANGELOG.md.meta
diff --git a/Packages/UnityFx.Outline.HDRP/README.md b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/README.md
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/README.md
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/README.md
diff --git a/Packages/UnityFx.Outline.HDRP/README.md.meta b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/README.md.meta
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/README.md.meta
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/README.md.meta
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime.meta b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime.meta
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/Runtime.meta
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime.meta
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/Scripts.meta
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/Scripts/Outline.cs.meta
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef
diff --git a/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/Runtime/UnityFx.Outline.HDRP.asmdef.meta
diff --git a/Packages/UnityFx.Outline.HDRP/package.json b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/package.json
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/package.json
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/package.json
diff --git a/Packages/UnityFx.Outline.HDRP/package.json.meta b/Outline.HDRP/Packages/UnityFx.Outline.HDRP/package.json.meta
similarity index 100%
rename from Packages/UnityFx.Outline.HDRP/package.json.meta
rename to Outline.HDRP/Packages/UnityFx.Outline.HDRP/package.json.meta
diff --git a/Packages/manifest.json b/Outline.HDRP/Packages/manifest.json
similarity index 91%
rename from Packages/manifest.json
rename to Outline.HDRP/Packages/manifest.json
index ca7d94d..1acdf96 100644
--- a/Packages/manifest.json
+++ b/Outline.HDRP/Packages/manifest.json
@@ -1,8 +1,8 @@
{
"dependencies": {
- "com.unity.package-manager-ui": "2.0.8",
- "com.unity.postprocessing": "2.3.0",
+ "com.unityfx.outline": "file:../../Outline.Core/Packages/UnityFx.Outline",
"com.unity.modules.ai": "1.0.0",
+ "com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
diff --git a/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md b/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md
deleted file mode 100644
index 3a73de8..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# UnityFx.Outline.PostProcessing changelog
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
-
-## [0.1.0] - unreleased
-
-### Added
-- Initial release.
diff --git a/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta b/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta
deleted file mode 100644
index 73d1d67..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/CHANGELOG.md.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: d5d97340f52aca745b5b5d55c881ebc5
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/README.md b/Packages/UnityFx.Outline.PostProcessing/README.md
deleted file mode 100644
index 1fc72d2..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# UnityFx.Outline.PostProcessing
-
-## SUMMARY
-Screen-space outline effects for Unity Post-processing Stack v2.
-
-## USEFUL LINKS
-* [Github project](https://github.com/Arvtesh/UnityFx.Outline)
-* [npm package](https://www.npmjs.com/package/com.unityfx.outline.postprocessing)
-* [Documentation](https://github.com/Arvtesh/UnityFx.Outline/blob/master/README.md)
-* [License](https://github.com/Arvtesh/UnityFx.Outline/blob/master/LICENSE.md)
-* [Support](mailto:arvtesh@gmail.com)
diff --git a/Packages/UnityFx.Outline.PostProcessing/README.md.meta b/Packages/UnityFx.Outline.PostProcessing/README.md.meta
deleted file mode 100644
index 48d5112..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/README.md.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 9b8ad98b0bcd54241b6b9c186551ecc3
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime.meta b/Packages/UnityFx.Outline.PostProcessing/Runtime.meta
deleted file mode 100644
index 9898607..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 58b0863f5e2afd341a39b8095514add5
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta b/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta
deleted file mode 100644
index 0fe0ce1..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 96bc3f6fffa960f4691dcc70b0dc8a02
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs b/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
deleted file mode 100644
index e7ef71d..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-
-namespace UnityFx.Outline.PostProcessing
-{
- [Serializable]
- [PostProcess(typeof(OutlineEffectRenderer), PostProcessEvent.BeforeStack, "UnityFx/Outline", false)]
- public sealed class Outline : PostProcessEffectSettings
- {
-#pragma warning disable 0649
-
- [SerializeField]
- private OutlineResources _defaultResources;
-
-#pragma warning restore 0649
-
- [Serializable]
- public class OutlineResourcesParameter : ParameterOverride
- {
- internal Outline Settings;
-
- protected override void OnEnable()
- {
- if (value == null)
- {
- value = Settings._defaultResources;
- }
- }
- }
-
- [Serializable]
- public class OutlineLayersParameter : ParameterOverride
- {
- }
-
- // NOTE: PostProcessEffectSettings.OnEnable implementation requires the fields to be public to function properly.
- public OutlineResourcesParameter Resources = new OutlineResourcesParameter();
- public OutlineLayersParameter Layers = new OutlineLayersParameter();
-
- public Outline()
- {
- // NOTE: The better way to do this is implementing OnEnable(), but it is already implemented as private (!!!) method in PostProcessEffectSettings.
- Resources.Settings = this;
- }
-
- public override bool IsEnabledAndSupported(PostProcessRenderContext context)
- {
-#if UNITY_EDITOR
-
- // Don't render outline preview when the editor is not playing.
- if (!Application.isPlaying)
- {
- return false;
- }
-
-#endif
-
- return base.IsEnabledAndSupported(context) && Resources != null && Layers != null && Layers.value != null;
- }
- }
-}
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta b/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta
deleted file mode 100644
index 063c836..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/Outline.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 362f6fe821115814693a671c047d5f31
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences:
- - _defaultResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19,
- type: 2}
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs b/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs
deleted file mode 100644
index 3b8cf2f..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEngine;
-using UnityEngine.Rendering.PostProcessing;
-using UnityEngine.Scripting;
-
-namespace UnityFx.Outline.PostProcessing
-{
- [Preserve]
- public sealed class OutlineEffectRenderer : PostProcessEffectRenderer
- {
- private OutlineResources _defaultResources;
-
- public override void Render(PostProcessRenderContext context)
- {
- OutlineResources resources;
-
- if (settings.Resources.value != null)
- {
- resources = settings.Resources;
- }
- else
- {
- if (!_defaultResources)
- {
- _defaultResources = ScriptableObject.CreateInstance();
- _defaultResources.ResetToDefaults();
- _defaultResources.FullscreenTriangleMesh = RuntimeUtilities.fullscreenTriangle;
- }
-
- resources = _defaultResources;
- }
-
- if (resources && resources.IsValid)
- {
- using (var renderer = new OutlineRenderer(context.command, context.source, context.destination))
- {
- settings.Layers.value.Render(renderer, resources);
- }
- }
- }
-
- public override void Release()
- {
- if (_defaultResources)
- {
- ScriptableObject.Destroy(_defaultResources);
- }
-
- base.Release();
- }
- }
-}
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta b/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta
deleted file mode 100644
index 4fbea54..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/Scripts/OutlineEffectRenderer.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 94b195a6784c3664eb4f501e87f38ce3
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef b/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef
deleted file mode 100644
index 7ccfffc..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "UnityFx.Outline.PostProcessing",
- "references": [
- "Unity.Postprocessing.Runtime",
- "UnityFx.Outline"
- ],
- "optionalUnityReferences": [],
- "includePlatforms": [],
- "excludePlatforms": [],
- "allowUnsafeCode": false,
- "overrideReferences": false,
- "precompiledReferences": [],
- "autoReferenced": true,
- "defineConstraints": []
-}
\ No newline at end of file
diff --git a/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta b/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta
deleted file mode 100644
index c9386d2..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/Runtime/UnityFx.Outline.PostProcessing.asmdef.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 8e3d165dc2f9115429adabaabad94f93
-AssemblyDefinitionImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline.PostProcessing/package.json b/Packages/UnityFx.Outline.PostProcessing/package.json
deleted file mode 100644
index 49d5161..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/package.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "com.unityfx.outline.postprocessing",
- "version": "0.1.0",
- "displayName": "Screen-space outline (Post-processing v2)",
- "description": "Configurable outline for Unity post-processing stack (v2). Both solid and blurred modes supported (Gauss blur).",
- "unity": "2018.4",
- "dependencies": {
- "com.unityfx.outline": "0.8.0",
- "com.unity.postprocessing": "2.2.2"
- },
- "keywords": [
- "UnityFx",
- "UnityFx.Outline",
- "UnityFx.Outline.PostProcessing",
- "Outline",
- "Post-processing",
- "Post-effect"
- ],
- "category": "UnityFx",
- "author": {
- "name": "Arvtesh",
- "email": "arvtesh@gmail.com"
- },
- "license": "MIT",
- "homepage": "https://github.com/Arvtesh/UnityFx.Outline",
- "repository": {
- "type": "git",
- "url": "https://github.com/Arvtesh/UnityFx.Outline.git"
- },
- "bugs": {
- "url": "https://github.com/Arvtesh/UnityFx.Outline/issues"
- }
-}
diff --git a/Packages/UnityFx.Outline.PostProcessing/package.json.meta b/Packages/UnityFx.Outline.PostProcessing/package.json.meta
deleted file mode 100644
index 62b5420..0000000
--- a/Packages/UnityFx.Outline.PostProcessing/package.json.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 5e0ccba19a9670b46ad359a388c4ddc5
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/CHANGELOG.md b/Packages/UnityFx.Outline/CHANGELOG.md
deleted file mode 100644
index c7d442d..0000000
--- a/Packages/UnityFx.Outline/CHANGELOG.md
+++ /dev/null
@@ -1,106 +0,0 @@
-# UnityFx.Outline changelog
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
-
-## [0.7.1] - 2020.01.28
-
-Bugfixes and project layout changes.
-
-### Fixed
-- Fixed `OutlineBehaviour` to allow changing its state while its `GameObject` is inactive.
-
-## [0.7.0] - 2019.11.26
-
-`MaterialPropertyBlock`-based rendering and [Unity Post-processing Stack v2](https://github.com/Unity-Technologies/PostProcessing/tree/v2) compatibility.
-
-### Added
-- Moved to for `MaterialPropertyBlock`-based rendering. This is in-line with Unity post-processing Stack and is more performant approach.
-- Significant optimizations made to `OutlineRenderer`.
-
-### Changed
-- `IOutlineSettings` now implements `IEquatable`.
-- Changed all outline shaders to use HLSL-based macros.
-- Modified all shaders to ignore MVP vertex transform to be compatible with the new rendering model.
-- Exposed rendering APIs for `OutlineLayer` and `OutlineLayerCollection`.
-
-### Fixed
-- Fixed `TiledGPUPerformanceWarning` on mobile targets.
-
-### Removed
-- Removed `OutlineMaterialSet` class. It is not used in `MaterialPropertyBlock`-based effect rendering.
-
-## [0.6.0] - 2019.09.26
-
-Quality of life improvements.
-
-### Added
-- Added `OutlineLayer.Enabled`.
-- Added `OutlineLayer.Name`.
-- Added possibility to change render order of layers via `OutlineLayer.Priority`.
-- Added possibility to edit renderers of an `OutlineLayer`.
-- Added possibility to alter `CameraEvent` used to render `OutlineEffect`.
-- Added more info to the `OutlineLayer` preview inspector.
-
-### Changed
-- `IOutilneSettings` setters now throw if overriden.
-
-### Fixed
-- Fixed `OutlineLayer.Add` not filtering renderers by the mask passed.
-
-## [0.5.0] - 2019.09.09
-
-Editor UI improvements and unit tests.
-
-### Added
-- Added `OutlineSettings`, that can be shared between dfferent `OutlineLayer` and `OutlineBehaviour` instances.
-- Added custom inspectors for `OutlineSettings`, `OutlineLayerCollection`.
-- Added undo/redo support to all custom inspectors.
-- Added unit-tests.
-
-### Changed
-- Improved inspectors for `OutlineBehaviour` and `OutlineEffect`.
-
-## [0.4.0] - 2019.08.31
-
-Blurred outlines.
-
-### Added
-- Added Gauss blurring to outlines.
-- Added outline mode parameter (possible values are `Solid` and `Blurred`).
-- Added outline intensity parameter (for blurred outlines only).
-- Added `IOutlineSettings` interface to make outline settings the same for `OutlineBehaviour` and `OutlineLayer`.
-- Added `OutlineMaterialSet` helper.
-
-### Changed
-- Changed solid outline to use Gauss sampling (to achieve smoother outlines).
-- Changed outline implementation to use different passed for horizontal and vertical sampling (to make algorithm complexity linear instead of quadric).
-
-### Fixed
-- Fixed an issue with `OutlineBehaviour` not rendering outlines if attached to a `GameObject` with no renderers.
-
-### Removed
-- Removed `OutlineResourceCache` class.
-
-## [0.3.0] - 2019.08.27
-
-### Added
-- Added support for sharing outline layers between `OutlineEffect` instances.
-- Added custom editors for `OutlineEffect` and `OutlineBehaviour`.
-- Added possibility to setup outline layers as `ScriptableObject` asset.
-
-### Fixed
-- Fixed profiler error 'BeginSample and EndSample count must match'.
-
-## [0.2.0] - 2019.08.19
-
-### Added
-- Added `OutlineBehaviour` for rendering per-object outlines.
-- Added `OutlineResources` to help initialize outline effects in runtime.
-- Added `OutlineRenderer` as low-level helper for outline rendering.
-
-## [0.1.0] - 2019.08.18
-
-### Added
-- Initial release.
-
diff --git a/Packages/UnityFx.Outline/CHANGELOG.md.meta b/Packages/UnityFx.Outline/CHANGELOG.md.meta
deleted file mode 100644
index b191c07..0000000
--- a/Packages/UnityFx.Outline/CHANGELOG.md.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: a0afeafc656ad714fbfb0e40dc4587e1
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor.meta b/Packages/UnityFx.Outline/Editor.meta
deleted file mode 100644
index c29e17b..0000000
--- a/Packages/UnityFx.Outline/Editor.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 155cf68da709a7a4da2ba665007263f2
-folderAsset: yes
-timeCreated: 1566558257
-licenseType: Pro
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor/Scripts.meta b/Packages/UnityFx.Outline/Editor/Scripts.meta
deleted file mode 100644
index 7da429c..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 15c9c665be3d06048bebd0e20ec2b173
-folderAsset: yes
-timeCreated: 1566558344
-licenseType: Pro
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
deleted file mode 100644
index 492498a..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEditor;
-using UnityEditor.SceneManagement;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- [CustomEditor(typeof(OutlineBehaviour))]
- public class OutlineBehaviourEditor : Editor
- {
- private OutlineBehaviour _effect;
- private bool _debugOpened;
- private bool _renderersOpened;
- private bool _camerasOpened;
-
- private void OnEnable()
- {
- _effect = (OutlineBehaviour)target;
- }
-
- public override void OnInspectorGUI()
- {
- base.OnInspectorGUI();
-
- // 1) Outline settings.
- EditorGUI.BeginChangeCheck();
-
- OutlineEditorUtility.Render(_effect, _effect);
-
- if (EditorGUI.EndChangeCheck())
- {
- EditorUtility.SetDirty(_effect.gameObject);
-
- if (!EditorApplication.isPlayingOrWillChangePlaymode)
- {
- EditorSceneManager.MarkSceneDirty(_effect.gameObject.scene);
- }
- }
-
- // 2) Renderers (read-only).
- _renderersOpened = EditorGUILayout.Foldout(_renderersOpened, "Renderers", true);
-
- if (_renderersOpened)
- {
- EditorGUI.BeginDisabledGroup(true);
- EditorGUI.indentLevel += 1;
-
- var rendererNumber = 1;
-
- foreach (var renderer in _effect.OutlineRenderers)
- {
- EditorGUILayout.ObjectField("#" + rendererNumber.ToString(), renderer, typeof(Renderer), true);
- rendererNumber++;
- }
-
- EditorGUI.indentLevel -= 1;
- EditorGUI.EndDisabledGroup();
- }
-
- // 3) Cameras (read-only).
- _camerasOpened = EditorGUILayout.Foldout(_camerasOpened, "Cameras", true);
-
- if (_camerasOpened)
- {
- EditorGUI.BeginDisabledGroup(true);
- EditorGUI.indentLevel += 1;
-
- var cameraNumber = 1;
-
- foreach (var camera in _effect.Cameras)
- {
- EditorGUILayout.ObjectField("#" + cameraNumber.ToString(), camera, typeof(Camera), true);
- cameraNumber++;
- }
-
- EditorGUI.indentLevel -= 1;
- EditorGUI.EndDisabledGroup();
- }
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta b/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta
deleted file mode 100644
index 1c3d375..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineBehaviourEditor.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: a6e77a9d499a86e4fbdc52a2977e774f
-timeCreated: 1566572433
-licenseType: Pro
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
deleted file mode 100644
index 3f82a55..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEditor;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- public static class OutlineEditorUtility
- {
- public static void RenderDivider(Color color, int thickness = 1, int padding = 5)
- {
- var r = EditorGUILayout.GetControlRect(GUILayout.Height(padding + thickness));
-
- r.height = thickness;
- r.y += padding / 2;
- r.x -= 2;
-
- EditorGUI.DrawRect(r, color);
- }
-
- public static void Render(IOutlineSettingsEx settings, UnityEngine.Object undoContext)
- {
- var obj = (OutlineSettings)EditorGUILayout.ObjectField("Outline Settings", settings.OutlineSettings, typeof(OutlineSettings), true);
-
- if (settings.OutlineSettings != obj)
- {
- Undo.RecordObject(undoContext, "Settings");
- settings.OutlineSettings = obj;
- }
-
- if (obj)
- {
- EditorGUI.BeginDisabledGroup(true);
- EditorGUI.indentLevel += 1;
-
- Render((IOutlineSettings)settings, undoContext);
-
- EditorGUILayout.HelpBox(string.Format("Outline settings are overriden with values from {0}.", obj.name), MessageType.Info, true);
- EditorGUI.indentLevel -= 1;
- EditorGUI.EndDisabledGroup();
- }
- else
- {
- EditorGUI.indentLevel += 1;
-
- Render((IOutlineSettings)settings, undoContext);
-
- EditorGUI.indentLevel -= 1;
- }
- }
-
- public static void Render(IOutlineSettings settings, UnityEngine.Object undoContext)
- {
- var color = EditorGUILayout.ColorField("Color", settings.OutlineColor);
-
- if (settings.OutlineColor != color)
- {
- Undo.RecordObject(undoContext, "Color");
- settings.OutlineColor = color;
- }
-
- var width = EditorGUILayout.IntSlider("Width", settings.OutlineWidth, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
-
- if (settings.OutlineWidth != width)
- {
- Undo.RecordObject(undoContext, "Width");
- settings.OutlineWidth = width;
- }
-
- var prevBlurred = (settings.OutlineRenderMode & OutlineRenderFlags.Blurred) != 0;
- var blurred = EditorGUILayout.Toggle("Blurred", prevBlurred);
-
- if (blurred)
- {
- EditorGUI.indentLevel += 1;
-
- var i = EditorGUILayout.Slider("Blur Intensity", settings.OutlineIntensity, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
-
- if (!Mathf.Approximately(settings.OutlineIntensity, i))
- {
- Undo.RecordObject(undoContext, "Blur Intensity");
- settings.OutlineIntensity = i;
- }
-
- EditorGUI.indentLevel -= 1;
- }
-
- if (blurred != prevBlurred)
- {
- Undo.RecordObject(undoContext, "Blur");
-
- if (blurred)
- {
- settings.OutlineRenderMode |= OutlineRenderFlags.Blurred;
- }
- else
- {
- settings.OutlineRenderMode &= ~OutlineRenderFlags.Blurred;
- }
- }
-
- var prevDepthTestEnabled = (settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0;
- var depthTestEnabled = EditorGUILayout.Toggle("Depth Test", prevDepthTestEnabled);
-
- if (depthTestEnabled != prevDepthTestEnabled)
- {
- Undo.RecordObject(undoContext, "Depth Test");
-
- if (depthTestEnabled)
- {
- settings.OutlineRenderMode |= OutlineRenderFlags.EnableDepthTesting;
- }
- else
- {
- settings.OutlineRenderMode &= ~OutlineRenderFlags.EnableDepthTesting;
- }
- }
- }
-
- public static void RenderPreview(OutlineLayer layer, int layerIndex, bool showObjects)
- {
- if (layer != null)
- {
- var goIndex = 1;
-
- EditorGUILayout.BeginHorizontal();
- EditorGUI.indentLevel += 1;
- EditorGUILayout.PrefixLabel("Layer #" + layerIndex.ToString());
- EditorGUI.indentLevel -= 1;
-
- if (layer.Enabled)
- {
- EditorGUILayout.LabelField(layer.OutlineRenderMode == OutlineRenderFlags.Solid ? layer.OutlineRenderMode.ToString() : string.Format("Blurred ({0})", layer.OutlineIntensity), GUILayout.MaxWidth(70));
- EditorGUILayout.IntField(layer.OutlineWidth, GUILayout.MaxWidth(100));
- EditorGUILayout.ColorField(layer.OutlineColor, GUILayout.MinWidth(100));
- }
- else
- {
- EditorGUILayout.LabelField("Disabled.");
- }
-
- EditorGUILayout.EndHorizontal();
-
- if (showObjects)
- {
- if (layer.Count > 0)
- {
- foreach (var go in layer)
- {
- EditorGUI.indentLevel += 2;
- EditorGUILayout.ObjectField("#" + goIndex.ToString(), go, typeof(GameObject), true);
- EditorGUI.indentLevel -= 2;
-
- goIndex++;
- }
- }
- else
- {
- EditorGUI.indentLevel += 2;
- EditorGUILayout.LabelField("No objects.");
- EditorGUI.indentLevel -= 2;
- }
- }
- }
- else
- {
- EditorGUILayout.BeginHorizontal();
- EditorGUI.indentLevel += 1;
- EditorGUILayout.PrefixLabel("Layer #" + layerIndex.ToString());
- EditorGUI.indentLevel -= 1;
- EditorGUILayout.LabelField("Null");
- EditorGUILayout.EndHorizontal();
- }
- }
-
- public static void RenderPreview(IList layers, bool showObjects)
- {
- EditorGUI.BeginDisabledGroup(true);
-
- if (layers.Count > 0)
- {
- for (var i = 0; i < layers.Count; ++i)
- {
- RenderPreview(layers[i], i, showObjects);
- }
- }
- else
- {
- EditorGUI.indentLevel += 1;
- EditorGUILayout.LabelField("No layers.");
- EditorGUI.indentLevel -= 1;
- }
-
- EditorGUI.EndDisabledGroup();
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta
deleted file mode 100644
index 28953ac..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEditorUtility.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ba087138029b59d4bbdf0783db0e2606
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
deleted file mode 100644
index fd4c904..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEditor;
-using UnityEditor.SceneManagement;
-using UnityEngine.Rendering;
-
-namespace UnityFx.Outline
-{
- [CustomEditor(typeof(OutlineEffect))]
- public class OutlineEffectEditor : Editor
- {
- private OutlineEffect _effect;
- private bool _debugOpened;
- private bool _previewOpened;
-
- private void OnEnable()
- {
- _effect = (OutlineEffect)target;
- }
-
- public override void OnInspectorGUI()
- {
- base.OnInspectorGUI();
-
- EditorGUI.BeginChangeCheck();
- var e = (CameraEvent)EditorGUILayout.EnumPopup("Render Event", _effect.RenderEvent);
-
- if (e != _effect.RenderEvent)
- {
- Undo.RecordObject(_effect, "Set Render Event");
- _effect.RenderEvent = e;
- }
-
- if (EditorGUI.EndChangeCheck())
- {
- EditorUtility.SetDirty(_effect.gameObject);
-
- if (!EditorApplication.isPlayingOrWillChangePlaymode)
- {
- EditorSceneManager.MarkSceneDirty(_effect.gameObject.scene);
- }
- }
-
- if (_effect.OutlineLayers.Count > 0)
- {
- _previewOpened = EditorGUILayout.Foldout(_previewOpened, "Preview", true);
-
- if (_previewOpened)
- {
- OutlineEditorUtility.RenderPreview(_effect.OutlineLayers, true);
- }
- }
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta b/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta
deleted file mode 100644
index 4b3f6af..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineEffectEditor.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 03c2e35bb52d2ba44882b92d7cde45bf
-timeCreated: 1566558360
-licenseType: Pro
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs
deleted file mode 100644
index f0c57e0..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEditor;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- [CustomEditor(typeof(OutlineLayerCollection))]
- public class OutlineLayerCollectionEditor : Editor
- {
- private readonly GUILayoutOption _layerButtonStyle = GUILayout.ExpandWidth(false);
- private OutlineLayerCollection _layers;
-
- public override void OnInspectorGUI()
- {
- base.OnInspectorGUI();
-
- EditorGUI.BeginChangeCheck();
-
- var removeLayer = -1;
-
- // 1) Layers list.
- if (_layers.Count > 0)
- {
- for (var i = 0; i < _layers.Count; i++)
- {
- EditorGUILayout.Space();
- OutlineEditorUtility.RenderDivider(Color.gray);
-
- EditorGUILayout.BeginHorizontal();
- var enabled = EditorGUILayout.ToggleLeft("Layer #" + i.ToString(), _layers[i].Enabled, EditorStyles.boldLabel);
-
- if (enabled != _layers[i].Enabled)
- {
- if (enabled)
- {
- Undo.RecordObject(_layers, "Enable Layer");
- }
- else
- {
- Undo.RecordObject(_layers, "Disable Layer");
- }
-
- _layers[i].Enabled = enabled;
- }
-
- GUILayout.FlexibleSpace();
-
- if (GUILayout.Button("Remove", _layerButtonStyle))
- {
- removeLayer = i;
- }
-
- EditorGUILayout.EndHorizontal();
- EditorGUILayout.Space();
-
- var name = EditorGUILayout.TextField("Layer Name", _layers[i].NameTag);
-
- if (name != _layers[i].NameTag)
- {
- Undo.RecordObject(_layers, "Set Layer Name");
- _layers[i].NameTag = name;
- }
-
- var priority = EditorGUILayout.IntField("Layer Priority", _layers[i].Priority);
-
- if (priority != _layers[i].Priority)
- {
- Undo.RecordObject(_layers, "Set Layer Priority");
- _layers[i].Priority = priority;
- }
-
- OutlineEditorUtility.Render(_layers[i], _layers);
- }
- }
- else
- {
- EditorGUILayout.HelpBox("The layer collection is empty.", MessageType.Info, true);
- }
-
- // Add/remove processing.
- OutlineEditorUtility.RenderDivider(Color.gray);
- EditorGUILayout.BeginHorizontal();
- GUILayout.FlexibleSpace();
-
- if (GUILayout.Button("Add New", _layerButtonStyle))
- {
- Undo.RecordObject(_layers, "Add Layer");
- _layers.Add(new OutlineLayer());
- }
-
- if (GUILayout.Button("Remove All", _layerButtonStyle))
- {
- Undo.RecordObject(_layers, "Remove All Layers");
- _layers.Clear();
- }
-
- if (removeLayer >= 0)
- {
- Undo.RecordObject(_layers, "Remove Layer");
- _layers.RemoveAt(removeLayer);
- }
-
- EditorGUILayout.EndHorizontal();
-
- if (EditorGUI.EndChangeCheck())
- {
- EditorUtility.SetDirty(_layers);
- }
- }
-
- private void OnEnable()
- {
- _layers = (OutlineLayerCollection)target;
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta b/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta
deleted file mode 100644
index 528a02e..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineLayerCollectionEditor.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 5f4ec5de59e58794b8e34f2ca3c00199
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs b/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs
deleted file mode 100644
index efa43c4..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEditor;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- [CustomEditor(typeof(OutlineSettings))]
- public class OutlineSettingsEditor : Editor
- {
- private OutlineSettings _settings;
-
- public override void OnInspectorGUI()
- {
- EditorGUI.BeginChangeCheck();
- OutlineEditorUtility.Render(_settings, _settings);
-
- if (EditorGUI.EndChangeCheck())
- {
- EditorUtility.SetDirty(_settings);
- }
- }
-
- private void OnEnable()
- {
- _settings = (OutlineSettings)target;
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta b/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta
deleted file mode 100644
index 2569298..0000000
--- a/Packages/UnityFx.Outline/Editor/Scripts/OutlineSettingsEditor.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 28f2a32d8600f8045a4b9a9916ff8801
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef b/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef
deleted file mode 100644
index 04858cc..0000000
--- a/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "UnityFx.Outline.Editor",
- "references": [
- "UnityFx.Outline"
- ],
- "optionalUnityReferences": [],
- "includePlatforms": [
- "Editor"
- ],
- "excludePlatforms": [],
- "allowUnsafeCode": false,
- "overrideReferences": false,
- "precompiledReferences": [],
- "autoReferenced": true,
- "defineConstraints": []
-}
\ No newline at end of file
diff --git a/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta b/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta
deleted file mode 100644
index ec90eb8..0000000
--- a/Packages/UnityFx.Outline/Editor/UnityFx.Outline.Editor.asmdef.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 9ce6758f27194b64fadf06ac518b5196
-timeCreated: 1566558329
-licenseType: Pro
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/README.md b/Packages/UnityFx.Outline/README.md
deleted file mode 100644
index 2bb00b7..0000000
--- a/Packages/UnityFx.Outline/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# UnityFx.Outline
-
-## SUMMARY
-Screen-space outline effects for Unity.
-
-## USEFUL LINKS
-* [Github project](https://github.com/Arvtesh/UnityFx.Outline)
-* [npm package](https://www.npmjs.com/package/com.unityfx.outline)
-* [Documentation](https://github.com/Arvtesh/UnityFx.Outline/blob/master/README.md)
-* [License](https://github.com/Arvtesh/UnityFx.Outline/blob/master/LICENSE.md)
-* [Support](mailto:arvtesh@gmail.com)
diff --git a/Packages/UnityFx.Outline/README.md.meta b/Packages/UnityFx.Outline/README.md.meta
deleted file mode 100644
index eb46e78..0000000
--- a/Packages/UnityFx.Outline/README.md.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 4b1c4eed7166ed4429494dc10c2a3d6c
-timeCreated: 1566148623
-licenseType: Free
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime.meta b/Packages/UnityFx.Outline/Runtime.meta
deleted file mode 100644
index d5034b4..0000000
--- a/Packages/UnityFx.Outline/Runtime.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: bc6bfa143e596d949867e28985573575
-folderAsset: yes
-timeCreated: 1566126961
-licenseType: Free
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Prefabs.meta b/Packages/UnityFx.Outline/Runtime/Prefabs.meta
deleted file mode 100644
index 88c5e98..0000000
--- a/Packages/UnityFx.Outline/Runtime/Prefabs.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 82099d138ba6a5c40a5915c4ca5211fe
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset b/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset
deleted file mode 100644
index 5b0a0c7..0000000
--- a/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.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: b503341e0a514e3489c4851727e68257, type: 3}
- m_Name: OutlineResources
- m_EditorClassIdentifier:
- RenderShader: {fileID: 4800000, guid: ac20fbf75bafe454aba5ef3c098349df, type: 3}
- HPassShader: {fileID: 4800000, guid: 41c9acbf41c8245498ac9beab378de12, type: 3}
- VPassBlendShader: {fileID: 4800000, guid: 1df0cb1700e142f4ca3b28297d3957da, type: 3}
diff --git a/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta b/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta
deleted file mode 100644
index d66452d..0000000
--- a/Packages/UnityFx.Outline/Runtime/Prefabs/OutlineResources.asset.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: d28e70f030b1a634db9a6a6d5478ef19
-timeCreated: 1566149572
-licenseType: Free
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts.meta b/Packages/UnityFx.Outline/Runtime/Scripts.meta
deleted file mode 100644
index fdf3731..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 5474ddc00e5e1574cba82c3dbad68ded
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs b/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs
deleted file mode 100644
index d7b9f2c..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("UnityFx.Outline")]
-[assembly: AssemblyProduct("UnityFx.Outline")]
-[assembly: AssemblyDescription("Screen-space outlines for Unity3d.")]
-#if DEBUG
-[assembly: AssemblyConfiguration("Debug")]
-#else
-[assembly: AssemblyConfiguration("Release")]
-#endif
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyCopyright("Copyright © Alexander Bogarsukov 2019-2020")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// Make internals visible to the editor assembly.
-[assembly: InternalsVisibleTo("UnityFx.Outline.Editor")]
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs.meta
deleted file mode 100644
index dd9f2bd..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/AssemblyInfo.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 1613c034178676349be3282789167284
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
deleted file mode 100644
index c822837..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- ///
- /// Generic outline settings.
- ///
- public interface IOutlineSettings : IEquatable
- {
- ///
- /// Gets or sets outline color.
- ///
- ///
- ///
- Color OutlineColor { get; set; }
-
- ///
- /// Gets or sets outline width in pixels. Allowed range is [, ].
- ///
- ///
- ///
- int OutlineWidth { get; set; }
-
- ///
- /// Gets or sets outline intensity value. Allowed range is [, ].
- /// This is used for blurred oulines only (i.e. is set to ).
- ///
- ///
- ///
- ///
- float OutlineIntensity { get; set; }
-
- ///
- /// Gets or sets outline render mode.
- ///
- ///
- ///
- ///
- OutlineRenderFlags OutlineRenderMode { get; set; }
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta
deleted file mode 100644
index 688fd30..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettings.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: efc18f75d5206f14a80e9306650c858a
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs
deleted file mode 100644
index 0939a90..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- ///
- /// Extended outline settings.
- ///
- public interface IOutlineSettingsEx : IOutlineSettings
- {
- ///
- /// Gets or sets serializable outline settings. Set this to non- value to share settings with other components.
- ///
- OutlineSettings OutlineSettings { get; set; }
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta
deleted file mode 100644
index 73a20da..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/IOutlineSettingsEx.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 9d3517d0fef6af540b0b046d3b2421dd
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
deleted file mode 100644
index 325b329..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs
+++ /dev/null
@@ -1,372 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Rendering;
-
-namespace UnityFx.Outline
-{
- ///
- /// Attach this script to a to add outline effect. It can be configured in edit-time or in runtime via scripts.
- ///
- ///
- [ExecuteInEditMode]
- [DisallowMultipleComponent]
- public sealed class OutlineBehaviour : MonoBehaviour, IOutlineSettingsEx
- {
- #region data
-
-#pragma warning disable 0649
-
- [SerializeField, Tooltip("Sets outline resources to use. Do not change the defaults unless you know what you're doing.")]
- private OutlineResources _outlineResources;
- [SerializeField, HideInInspector]
- private OutlineSettingsInstance _outlineSettings;
- [SerializeField, Tooltip("If set, list of object renderers is updated on each frame. Enable if the object has child renderers which are enabled/disabled frequently.")]
- private bool _updateRenderers;
-
-#pragma warning restore 0649
-
- private OutlineRendererCollection _renderers;
- private CommandBuffer _commandBuffer;
-
- private Dictionary _cameraMap = new Dictionary();
- private float _cameraMapUpdateTimer;
-
- #endregion
-
- #region interface
-
- ///
- /// Gets or sets resources used by the effect implementation.
- ///
- /// Thrown if setter argument is .
- public OutlineResources OutlineResources
- {
- get
- {
- return _outlineResources;
- }
- set
- {
- if (value == null)
- {
- throw new ArgumentNullException("OutlineResources");
- }
-
- if (_outlineResources != value)
- {
- CreateSettingsIfNeeded();
-
- _outlineResources = value;
- _outlineSettings.OutlineResources = _outlineResources;
- }
- }
- }
-
- ///
- /// Gets outline renderers. By default all child components are used for outlining.
- ///
- public ICollection OutlineRenderers
- {
- get
- {
- CreateRenderersIfNeeded();
- return _renderers;
- }
- }
-
- ///
- /// Gets all cameras outline data is rendered to.
- ///
- public ICollection Cameras
- {
- get
- {
- return _cameraMap.Keys;
- }
- }
-
- #endregion
-
- #region MonoBehaviour
-
- private void Awake()
- {
- CreateRenderersIfNeeded();
- CreateSettingsIfNeeded();
-
- _outlineSettings.OutlineResources = _outlineResources;
- }
-
- private void OnDestroy()
- {
- if (_outlineSettings != null)
- {
- _outlineSettings.OutlineResources = null;
- }
- }
-
- private void OnEnable()
- {
- CreateCommandBufferIfNeeded();
- Camera.onPreRender += OnCameraPreRender;
- }
-
- private void OnDisable()
- {
- Camera.onPreRender -= OnCameraPreRender;
-
- foreach (var kvp in _cameraMap)
- {
- if (kvp.Key)
- {
- kvp.Key.RemoveCommandBuffer(OutlineRenderer.RenderEvent, kvp.Value);
- }
- }
-
- _cameraMap.Clear();
-
- if (_commandBuffer != null)
- {
- _commandBuffer.Dispose();
- _commandBuffer = null;
- }
- }
-
- private void Update()
- {
- _cameraMapUpdateTimer += Time.deltaTime;
-
- if (_cameraMapUpdateTimer > 16)
- {
- RemoveDestroyedCameras();
- _cameraMapUpdateTimer = 0;
- }
-
- if (_outlineResources != null && _renderers != null)
- {
- if (_updateRenderers)
- {
- _renderers.Reset(false);
- }
-
- _commandBuffer.Clear();
-
- using (var renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget))
- {
- renderer.Render(_renderers.GetList(), _outlineSettings.OutlineResources, _outlineSettings);
- }
- }
- }
-
-#if UNITY_EDITOR
-
- private void OnValidate()
- {
- CreateRenderersIfNeeded();
- CreateCommandBufferIfNeeded();
- CreateSettingsIfNeeded();
-
- _outlineSettings.OutlineResources = _outlineResources;
- }
-
- private void Reset()
- {
- if (_outlineSettings != null)
- {
- _outlineSettings.OutlineResources = _outlineResources;
- }
-
- if (_renderers != null)
- {
- _renderers.Reset(true);
- }
- }
-
-#endif
-
- #endregion
-
- #region IOutlineSettingsEx
-
- ///
- /// Gets or sets outline settings. Set this to non- value to share settings with other components.
- ///
- public OutlineSettings OutlineSettings
- {
- get
- {
- if (_outlineSettings == null)
- {
- _outlineSettings = new OutlineSettingsInstance();
- }
-
- return _outlineSettings.OutlineSettings;
- }
- set
- {
- if (_outlineSettings == null)
- {
- _outlineSettings = new OutlineSettingsInstance();
- }
-
- _outlineSettings.OutlineSettings = value;
- }
- }
-
- #endregion
-
- #region IOutlineSettings
-
- ///
- public Color OutlineColor
- {
- get
- {
- CreateSettingsIfNeeded();
- return _outlineSettings.OutlineColor;
- }
- set
- {
- CreateSettingsIfNeeded();
- _outlineSettings.OutlineColor = value;
- }
- }
-
- ///
- public int OutlineWidth
- {
- get
- {
- CreateSettingsIfNeeded();
- return _outlineSettings.OutlineWidth;
- }
- set
- {
- CreateSettingsIfNeeded();
- _outlineSettings.OutlineWidth = value;
- }
- }
-
- ///
- public float OutlineIntensity
- {
- get
- {
- CreateSettingsIfNeeded();
- return _outlineSettings.OutlineIntensity;
- }
- set
- {
- CreateSettingsIfNeeded();
- _outlineSettings.OutlineIntensity = value;
- }
- }
-
- ///
- public OutlineRenderFlags OutlineRenderMode
- {
- get
- {
- CreateSettingsIfNeeded();
- return _outlineSettings.OutlineRenderMode;
- }
- set
- {
- CreateSettingsIfNeeded();
- _outlineSettings.OutlineRenderMode = value;
- }
- }
-
- #endregion
-
- #region IEquatable
-
- ///
- public bool Equals(IOutlineSettings other)
- {
- return OutlineSettings.Equals(_outlineSettings, other);
- }
-
- #endregion
-
- #region implementation
-
- private void OnCameraPreRender(Camera camera)
- {
- if (camera)
- {
- if (_outlineSettings.RequiresCameraDepth)
- {
- camera.depthTextureMode |= DepthTextureMode.Depth;
- }
-
- if (!_cameraMap.ContainsKey(camera))
- {
- camera.AddCommandBuffer(OutlineRenderer.RenderEvent, _commandBuffer);
- _cameraMap.Add(camera, _commandBuffer);
- }
- }
- }
-
- private void RemoveDestroyedCameras()
- {
- List camerasToRemove = null;
-
- foreach (var camera in _cameraMap.Keys)
- {
- if (camera == null)
- {
- if (camerasToRemove != null)
- {
- camerasToRemove.Add(camera);
- }
- else
- {
- camerasToRemove = new List() { camera };
- }
- }
- }
-
- if (camerasToRemove != null)
- {
- foreach (var camera in camerasToRemove)
- {
- _cameraMap.Remove(camera);
- }
- }
- }
-
- private void CreateCommandBufferIfNeeded()
- {
- if (_commandBuffer == null)
- {
- _commandBuffer = new CommandBuffer();
- _commandBuffer.name = string.Format("{0} - {1}", GetType().Name, name);
- }
- }
-
- private void CreateSettingsIfNeeded()
- {
- if (_outlineSettings == null)
- {
- _outlineSettings = new OutlineSettingsInstance(_outlineResources);
- }
- }
-
- private void CreateRenderersIfNeeded()
- {
- if (_renderers == null)
- {
- _renderers = new OutlineRendererCollection(gameObject);
- _renderers.Reset(true);
- }
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta
deleted file mode 100644
index a9c85ed..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineBehaviour.cs.meta
+++ /dev/null
@@ -1,15 +0,0 @@
-fileFormatVersion: 2
-guid: 271c580db5fd384429cdac899152e9e0
-timeCreated: 1566149857
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences:
- - _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19,
- type: 2}
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
deleted file mode 100644
index a4bacb8..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Rendering;
-
-namespace UnityFx.Outline
-{
- ///
- /// Renders outlines at specific camera. Should be attached to camera to function.
- ///
- ///
- ///
- ///
- ///
- [DisallowMultipleComponent]
- [RequireComponent(typeof(Camera))]
- public sealed partial class OutlineEffect : MonoBehaviour
- {
- #region data
-
- [SerializeField, Tooltip("Sets outline resources to use. Do not change the defaults unless you know what you're doing.")]
- private OutlineResources _outlineResources;
- [SerializeField, Tooltip("Collection of outline layers to use. This can be used to share outline settings between multiple cameras.")]
- private OutlineLayerCollection _outlineLayers;
- [SerializeField, HideInInspector]
- private CameraEvent _cameraEvent = OutlineRenderer.RenderEvent;
-
- private CommandBuffer _commandBuffer;
-
- #endregion
-
- #region interface
-
- ///
- /// Gets or sets resources used by the effect implementation.
- ///
- /// Thrown if setter argument is .
- public OutlineResources OutlineResources
- {
- get
- {
- return _outlineResources;
- }
- set
- {
- if (ReferenceEquals(value, null))
- {
- throw new ArgumentNullException("OutlineResources");
- }
-
- _outlineResources = value;
- }
- }
-
- ///
- /// Gets collection of outline layers.
- ///
- ///
- public IList OutlineLayers
- {
- get
- {
- CreateLayersIfNeeded();
- return _outlineLayers;
- }
- }
-
- ///
- /// Gets or sets used to render the outlines.
- ///
- public CameraEvent RenderEvent
- {
- get
- {
- return _cameraEvent;
- }
- set
- {
- if (_cameraEvent != value)
- {
- if (_commandBuffer != null)
- {
- var camera = GetComponent();
-
- if (camera)
- {
- camera.RemoveCommandBuffer(_cameraEvent, _commandBuffer);
- camera.AddCommandBuffer(value, _commandBuffer);
- }
- }
-
- _cameraEvent = value;
- }
- }
- }
-
- ///
- /// Adds the passed to the first outline layer. Creates the layer if needed.
- ///
- /// The to add and render outline for.
- ///
- public void AddGameObject(GameObject go)
- {
- AddGameObject(go, 0);
- }
-
- ///
- /// Adds the passed to the specified outline layer. Creates the layer if needed.
- ///
- /// The to add and render outline for.
- ///
- public void AddGameObject(GameObject go, int layerIndex)
- {
- if (layerIndex < 0)
- {
- throw new ArgumentOutOfRangeException("layerIndex");
- }
-
- CreateLayersIfNeeded();
-
- while (_outlineLayers.Count <= layerIndex)
- {
- _outlineLayers.Add(new OutlineLayer());
- }
-
- _outlineLayers[layerIndex].Add(go);
- }
-
- ///
- /// Shares with another instance.
- ///
- /// Effect to share with.
- ///
- public void ShareLayersWith(OutlineEffect other)
- {
- if (other)
- {
- CreateLayersIfNeeded();
- other._outlineLayers = _outlineLayers;
- }
- }
-
- #endregion
-
- #region MonoBehaviour
-
- private void Awake()
- {
- }
-
- private void OnEnable()
- {
- var camera = GetComponent();
-
- if (camera)
- {
- _commandBuffer = new CommandBuffer
- {
- name = string.Format("{0} - {1}", GetType().Name, name)
- };
-
- camera.depthTextureMode |= DepthTextureMode.Depth;
- camera.AddCommandBuffer(_cameraEvent, _commandBuffer);
- }
- }
-
- private void OnDisable()
- {
- var camera = GetComponent();
-
- if (camera)
- {
- camera.RemoveCommandBuffer(_cameraEvent, _commandBuffer);
- }
-
- if (_commandBuffer != null)
- {
- _commandBuffer.Dispose();
- _commandBuffer = null;
- }
- }
-
- private void Update()
- {
- if (_outlineLayers)
- {
- FillCommandBuffer();
- }
- }
-
- private void OnDestroy()
- {
- // TODO: Find a way to do this once per OutlineLayerCollection instance.
- if (_outlineLayers)
- {
- _outlineLayers.Reset();
- }
- }
-
-#if UNITY_EDITOR
-
- private void Reset()
- {
- _outlineLayers = null;
- }
-
-#endif
-
- #endregion
-
- #region implementation
-
- private void FillCommandBuffer()
- {
- _commandBuffer.Clear();
-
- if (_outlineResources && _outlineResources.IsValid)
- {
- using (var renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget))
- {
- _outlineLayers.Render(renderer, _outlineResources);
- }
- }
- }
-
- private void CreateLayersIfNeeded()
- {
- if (ReferenceEquals(_outlineLayers, null))
- {
- _outlineLayers = ScriptableObject.CreateInstance();
- _outlineLayers.name = "OutlineLayers";
- }
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta
deleted file mode 100644
index 1044087..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineEffect.cs.meta
+++ /dev/null
@@ -1,15 +0,0 @@
-fileFormatVersion: 2
-guid: 270d3185d159bf54fb4cddbb42235437
-timeCreated: 1566149591
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences:
- - _outlineResources: {fileID: 11400000, guid: d28e70f030b1a634db9a6a6d5478ef19,
- type: 2}
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
deleted file mode 100644
index eac4774..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs
+++ /dev/null
@@ -1,494 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- ///
- /// A collection of instances that share outline settings. An
- /// can only belong to one at time.
- ///
- ///
- ///
- [Serializable]
- public sealed partial class OutlineLayer : ICollection, IOutlineSettingsEx
- {
- #region data
-
- [SerializeField, HideInInspector]
- private OutlineSettingsInstance _settings = new OutlineSettingsInstance();
- [SerializeField, HideInInspector]
- private string _name;
- [SerializeField, HideInInspector]
- private int _zOrder;
- [SerializeField, HideInInspector]
- private bool _enabled = true;
-
- private OutlineLayerCollection _parentCollection;
- private Dictionary _outlineObjects = new Dictionary();
-
- #endregion
-
- #region interface
-
- ///
- /// Gets the layer name.
- ///
- public string Name
- {
- get
- {
- if (string.IsNullOrEmpty(_name))
- {
- return "OutlineLayer #" + Index.ToString();
- }
-
- return _name;
- }
- }
-
- ///
- /// Gets or sets a value indicating whether the layer is enabled.
- ///
- ///
- public bool Enabled
- {
- get
- {
- return _enabled;
- }
- set
- {
- _enabled = value;
- }
- }
-
- ///
- /// Gets or sets the layer priority. Layers with greater values are rendered on top of layers with lower priority.
- /// Layers with equal priorities are rendered according to index in parent collection.
- ///
- ///
- public int Priority
- {
- get
- {
- return _zOrder;
- }
- set
- {
- if (_zOrder != value)
- {
- if (_parentCollection != null)
- {
- _parentCollection.SetOrderChanged();
- }
-
- _zOrder = value;
- }
- }
- }
-
- ///
- /// Gets index of the layer in parent collection.
- ///
- public int Index
- {
- get
- {
- if (_parentCollection != null)
- {
- return _parentCollection.IndexOf(this);
- }
-
- return -1;
- }
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public OutlineLayer()
- {
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public OutlineLayer(string name)
- {
- _name = name;
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// Thrown if is .
- public OutlineLayer(OutlineSettings settings)
- {
- if (ReferenceEquals(settings, null))
- {
- throw new ArgumentNullException("settings");
- }
-
- _settings.OutlineSettings = settings;
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// Thrown if is .
- public OutlineLayer(string name, OutlineSettings settings)
- {
- if (ReferenceEquals(settings, null))
- {
- throw new ArgumentNullException("settings");
- }
-
- _name = name;
- _settings.OutlineSettings = settings;
- }
-
- ///
- /// Adds a new object to the layer.
- ///
- /// Thrown if is .
- public void Add(GameObject go, int ignoreLayerMask)
- {
- if (ReferenceEquals(go, null))
- {
- throw new ArgumentNullException("go");
- }
-
- if (!_outlineObjects.ContainsKey(go))
- {
- var renderers = new OutlineRendererCollection(go);
- renderers.Reset(false, ignoreLayerMask);
- _outlineObjects.Add(go, renderers);
- }
- }
-
- ///
- /// Adds a new object to the layer.
- ///
- /// Thrown if is .
- public void Add(GameObject go, string ignoreLayer)
- {
- Add(go, 1 << LayerMask.NameToLayer(ignoreLayer));
- }
-
- ///
- /// Attempts to get renderers assosiated with the specified .
- ///
- /// Thrown if is .
- public bool TryGetRenderers(GameObject go, out ICollection renderers)
- {
- if (ReferenceEquals(go, null))
- {
- throw new ArgumentNullException("go");
- }
-
- OutlineRendererCollection result;
-
- if (_outlineObjects.TryGetValue(go, out result))
- {
- renderers = result;
- return true;
- }
-
- renderers = null;
- return false;
- }
-
- ///
- /// Renders the layers.
- ///
- public void Render(OutlineRenderer renderer, OutlineResources resources)
- {
- if (_enabled)
- {
- _settings.OutlineResources = resources;
-
- foreach (var kvp in _outlineObjects)
- {
- if (kvp.Key && kvp.Key.activeInHierarchy)
- {
- renderer.Render(kvp.Value.GetList(), resources, _settings);
- }
- }
- }
- }
-
- #endregion
-
- #region internals
-
- internal string NameTag
- {
- get
- {
- return _name;
- }
- set
- {
- _name = value;
- }
- }
-
- internal OutlineLayerCollection ParentCollection
- {
- get
- {
- return _parentCollection;
- }
- }
-
- internal void Reset()
- {
- _settings.OutlineResources = null;
- _outlineObjects.Clear();
- }
-
- internal void SetCollection(OutlineLayerCollection collection)
- {
- if (_parentCollection == null || collection == null || _parentCollection == collection)
- {
- _parentCollection = collection;
- }
- else
- {
- throw new InvalidOperationException("OutlineLayer can only belong to a single OutlineLayerCollection.");
- }
- }
-
- #endregion
-
- #region IOutlineSettingsEx
-
- ///
- /// Gets or sets outline settings. Set this to non- value to share settings with other components.
- ///
- public OutlineSettings OutlineSettings
- {
- get
- {
- return _settings.OutlineSettings;
- }
- set
- {
- _settings.OutlineSettings = value;
- }
- }
-
- #endregion
-
- #region IOutlineSettings
-
- ///
- public Color OutlineColor
- {
- get
- {
- return _settings.OutlineColor;
- }
- set
- {
- _settings.OutlineColor = value;
- }
- }
-
- ///
- public int OutlineWidth
- {
- get
- {
- return _settings.OutlineWidth;
- }
- set
- {
- _settings.OutlineWidth = value;
- }
- }
-
- ///
- public float OutlineIntensity
- {
- get
- {
- return _settings.OutlineIntensity;
- }
- set
- {
- _settings.OutlineIntensity = value;
- }
- }
-
- ///
- public OutlineRenderFlags OutlineRenderMode
- {
- get
- {
- return _settings.OutlineRenderMode;
- }
- set
- {
- _settings.OutlineRenderMode = value;
- }
- }
-
- #endregion
-
- #region ICollection
-
- ///
- public int Count
- {
- get
- {
- return _outlineObjects.Count;
- }
- }
-
- ///
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- ///
- public void Add(GameObject go)
- {
- Add(go, 0);
- }
-
- ///
- public bool Remove(GameObject go)
- {
- if (!ReferenceEquals(go, null))
- {
- return _outlineObjects.Remove(go);
- }
-
- return false;
- }
-
- ///
- public bool Contains(GameObject go)
- {
- if (ReferenceEquals(go, null))
- {
- return false;
- }
-
- return _outlineObjects.ContainsKey(go);
- }
-
- ///
- public void Clear()
- {
- _outlineObjects.Clear();
- }
-
- ///
- public void CopyTo(GameObject[] array, int arrayIndex)
- {
- _outlineObjects.Keys.CopyTo(array, arrayIndex);
- }
-
- #endregion
-
- #region IEnumerable
-
- ///
- public IEnumerator GetEnumerator()
- {
- return _outlineObjects.Keys.GetEnumerator();
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return _outlineObjects.Keys.GetEnumerator();
- }
-
- #endregion
-
- #region IEquatable
-
- ///
- public bool Equals(IOutlineSettings other)
- {
- return OutlineSettings.Equals(this, other);
- }
-
- #endregion
-
- #region Object
-
- ///
- public override string ToString()
- {
- var text = new StringBuilder();
-
- if (string.IsNullOrEmpty(_name))
- {
- text.Append("OutlineLayer");
- }
- else
- {
- text.Append(_name);
- }
-
- if (_parentCollection != null)
- {
- text.Append(" #");
- text.Append(_parentCollection.IndexOf(this));
- }
-
- if (_zOrder > 0)
- {
- text.Append(" z");
- text.Append(_zOrder);
- }
-
- if (_outlineObjects.Count > 0)
- {
- text.Append(" (");
-
- foreach (var go in _outlineObjects.Keys)
- {
- text.Append(go.name);
- text.Append(", ");
- }
-
- text.Remove(text.Length - 2, 2);
- text.Append(")");
- }
-
- return string.Format("{0}", text);
- }
-
- ///
- public override bool Equals(object other)
- {
- return OutlineSettings.Equals(this, other as IOutlineSettings);
- }
-
- ///
- public override int GetHashCode()
- {
- return base.GetHashCode();
- }
-
- #endregion
-
- #region implementation
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta
deleted file mode 100644
index f199256..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayer.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 1360e19784ddfac45a7dcb6ba39595ed
-timeCreated: 1566130871
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
deleted file mode 100644
index d28f982..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs
+++ /dev/null
@@ -1,291 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- ///
- /// A serializable collection of outline layers.
- ///
- ///
- ///
- ///
- [CreateAssetMenu(fileName = "OutlineLayerCollection", menuName = "UnityFx/Outline/Outline Layer Collection")]
- public sealed class OutlineLayerCollection : ScriptableObject, IList
- {
- #region data
-
- private class OutlineLayerComparer : IComparer
- {
- public int Compare(OutlineLayer x, OutlineLayer y)
- {
- return x.Priority - y.Priority;
- }
- }
-
- [SerializeField, HideInInspector]
- private List _layers = new List();
-
- private List _sortedLayers = new List();
- private OutlineLayerComparer _sortComparer = new OutlineLayerComparer();
- private bool _orderChanged = true;
-
- #endregion
-
- #region interface
-
- ///
- /// Gets layers ordered by .
- ///
- public OutlineLayer[] SortedLayers
- {
- get
- {
- UpdateSortedLayersIfNeeded();
- return _sortedLayers.ToArray();
- }
- }
-
- ///
- /// Renders all layers.
- ///
- public void Render(OutlineRenderer renderer, OutlineResources resources)
- {
- UpdateSortedLayersIfNeeded();
-
- foreach (var layer in _sortedLayers)
- {
- layer.Render(renderer, resources);
- }
- }
-
- #endregion
-
- #region internals
-
- internal void SetOrderChanged()
- {
- _orderChanged = true;
- }
-
- internal void Reset()
- {
- foreach (var layer in _layers)
- {
- layer.Reset();
- }
- }
-
- #endregion
-
- #region ScriptableObject
-
- private void OnEnable()
- {
- foreach (var layer in _layers)
- {
- layer.SetCollection(this);
- }
-
- _orderChanged = true;
- }
-
- #endregion
-
- #region IList
-
- ///
- public OutlineLayer this[int layerIndex]
- {
- get
- {
- return _layers[layerIndex];
- }
- set
- {
- if (value == null)
- {
- throw new ArgumentNullException("layer");
- }
-
- if (layerIndex < 0 || layerIndex >= _layers.Count)
- {
- throw new ArgumentOutOfRangeException("layerIndex");
- }
-
- if (_layers[layerIndex] != value)
- {
- value.SetCollection(this);
-
- _layers[layerIndex].SetCollection(null);
- _layers[layerIndex] = value;
-
- _orderChanged = true;
- }
- }
- }
-
- ///
- public int IndexOf(OutlineLayer layer)
- {
- if (layer != null)
- {
- return _layers.IndexOf(layer);
- }
-
- return -1;
- }
-
- ///
- public void Insert(int index, OutlineLayer layer)
- {
- if (layer == null)
- {
- throw new ArgumentNullException("layer");
- }
-
- if (layer.ParentCollection != this)
- {
- layer.SetCollection(this);
-
- _layers.Insert(index, layer);
-
- _orderChanged = true;
- }
- }
-
- ///
- public void RemoveAt(int index)
- {
- if (index >= 0 && index < _layers.Count)
- {
- _layers[index].SetCollection(null);
- _layers.RemoveAt(index);
-
- _orderChanged = true;
- }
- }
-
- #endregion
-
- #region ICollection
-
- ///
- public int Count
- {
- get
- {
- return _layers.Count;
- }
- }
-
- ///
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- ///
- public void Add(OutlineLayer layer)
- {
- if (layer == null)
- {
- throw new ArgumentNullException("layer");
- }
-
- if (layer.ParentCollection != this)
- {
- layer.SetCollection(this);
-
- _layers.Add(layer);
- _orderChanged = true;
- }
- }
-
- ///
- public bool Remove(OutlineLayer layer)
- {
- if (_layers.Remove(layer))
- {
- layer.SetCollection(null);
-
- _sortedLayers.Remove(layer);
-
- return true;
- }
-
- return false;
- }
-
- ///
- public void Clear()
- {
- if (_layers.Count > 0)
- {
- foreach (var layer in _layers)
- {
- layer.SetCollection(null);
- }
-
- _layers.Clear();
- _sortedLayers.Clear();
- }
- }
-
- ///
- public bool Contains(OutlineLayer layer)
- {
- if (layer == null)
- {
- return false;
- }
-
- return _layers.Contains(layer);
- }
-
- ///
- public void CopyTo(OutlineLayer[] array, int arrayIndex)
- {
- _layers.CopyTo(array, arrayIndex);
- }
-
- #endregion
-
- #region IEnumerable
-
- ///
- public IEnumerator GetEnumerator()
- {
- return _layers.GetEnumerator();
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return _layers.GetEnumerator();
- }
-
- #endregion
-
- #region implementation
-
- private void UpdateSortedLayersIfNeeded()
- {
- if (_orderChanged)
- {
- _sortedLayers.Clear();
- _sortedLayers.AddRange(_layers);
- _sortedLayers.Sort(_sortComparer);
- _orderChanged = false;
- }
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta
deleted file mode 100644
index 3b46761..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineLayerCollection.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 57d0c11168277cf4eb3b4b89706e6aa5
-timeCreated: 1566560091
-licenseType: Pro
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
deleted file mode 100644
index c911c0d..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-
-namespace UnityFx.Outline
-{
- ///
- /// Enumerates outline render modes.
- ///
- [Flags]
- public enum OutlineRenderFlags
- {
- ///
- /// Outline frame is a solid line.
- ///
- Solid = 0,
-
- ///
- /// Outline frame is blurred.
- ///
- Blurred = 1,
-
- ///
- /// Enabled depth testing when rendering object outlines. Only visible parts of objects are outlined.
- ///
- EnableDepthTesting = 0x100
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
deleted file mode 100644
index 8c8d06c..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderFlags.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 836bd13bd33c59246b1cebab92f8e62a
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
deleted file mode 100644
index 3569cf7..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs
+++ /dev/null
@@ -1,493 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Rendering;
-
-namespace UnityFx.Outline
-{
- ///
- /// Helper class for outline rendering with .
- ///
- ///
- /// The class can be used on its own or as part of a higher level systems. It is used
- /// by higher level outline implementations ( and
- /// ). It is fully compatible with Unity post processing stack as well.
- /// The class implements to be used inside
- /// block as shown in the code samples. Disposing does not dispose
- /// the corresponding .
- /// Command buffer is not cleared before rendering. It is user responsibility to do so if needed.
- ///
- ///
- /// var commandBuffer = new CommandBuffer();
- ///
- /// using (var renderer = new OutlineRenderer(commandBuffer, BuiltinRenderTextureType.CameraTarget))
- /// {
- /// renderer.Render(renderers, resources, settings);
- /// }
- ///
- /// camera.AddCommandBuffer(CameraEvent.BeforeImageEffects, commandBuffer);
- ///
- ///
- /// [Preserve]
- /// public class OutlineEffectRenderer : PostProcessEffectRenderer
- /// {
- /// public override void Init()
- /// {
- /// base.Init();
- ///
- /// // Reuse fullscreen triangle mesh from PostProcessing (do not create own).
- /// settings.OutlineResources.FullscreenTriangleMesh = RuntimeUtilities.fullscreenTriangle;
- /// }
- ///
- /// public override void Render(PostProcessRenderContext context)
- /// {
- /// var resources = settings.OutlineResources;
- /// var layers = settings.OutlineLayers;
- ///
- /// if (resources && resources.IsValid && layers)
- /// {
- /// // No need to setup property sheet parameters, all the rendering staff is handled by the OutlineRenderer.
- /// using (var renderer = new OutlineRenderer(context.command, context.source, context.destination))
- /// {
- /// layers.Render(renderer, resources);
- /// }
- /// }
- /// }
- /// }
- ///
- ///
- public struct OutlineRenderer : IDisposable
- {
- #region data
-
- private static readonly int _mainRtId = Shader.PropertyToID("_MainTex");
- private static readonly int _maskRtId = Shader.PropertyToID("_MaskTex");
- private static readonly int _hPassRtId = Shader.PropertyToID("_HPassTex");
-
- private readonly RenderTargetIdentifier _source;
- private readonly RenderTargetIdentifier _destination;
- private readonly CommandBuffer _commandBuffer;
-
- #endregion
-
- #region interface
-
- ///
- /// A default outline rendering should be assosiated with.
- ///
- public const CameraEvent RenderEvent = CameraEvent.BeforeImageEffects;
-
- ///
- /// Name of the outline effect.
- ///
- public const string EffectName = "Outline";
-
- ///
- /// Minimum value of outline width parameter.
- ///
- ///
- public const int MinWidth = 1;
-
- ///
- /// Maximum value of outline width parameter.
- ///
- ///
- public const int MaxWidth = 32;
-
- ///
- /// Minimum value of outline intensity parameter.
- ///
- ///
- ///
- public const int MinIntensity = 1;
-
- ///
- /// Maximum value of outline intensity parameter.
- ///
- ///
- ///
- public const int MaxIntensity = 64;
-
- ///
- /// Value of outline intensity parameter that is treated as solid fill.
- ///
- ///
- ///
- public const int SolidIntensity = 100;
-
- ///
- /// Initializes a new instance of the struct.
- ///
- /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
- /// Render target.
- /// Thrown if is .
- public OutlineRenderer(CommandBuffer commandBuffer, BuiltinRenderTextureType rt)
- : this(commandBuffer, rt, rt, Vector2Int.zero)
- {
- }
-
- ///
- /// Initializes a new instance of the struct.
- ///
- /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
- /// Render target.
- /// Thrown if is .
- public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier rt)
- : this(commandBuffer, rt, rt, Vector2Int.zero)
- {
- }
-
- ///
- /// Initializes a new instance of the struct.
- ///
- /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
- /// Source image. Can be the same as .
- /// Render target.
- /// Thrown if is .
- public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src, RenderTargetIdentifier dst)
- : this(commandBuffer, src, dst, Vector2Int.zero)
- {
- }
-
- ///
- /// Initializes a new instance of the struct.
- ///
- /// A to render the effect to. It should be cleared manually (if needed) before passing to this method.
- /// Source image. Can be the same as .
- /// Render target.
- /// Size of the temporaty render textures.
- /// Thrown if is .
- public OutlineRenderer(CommandBuffer commandBuffer, RenderTargetIdentifier src, RenderTargetIdentifier dst, Vector2Int rtSize)
- {
- if (commandBuffer == null)
- {
- throw new ArgumentNullException("commandBuffer");
- }
-
- var cx = rtSize.x > 0 ? rtSize.x : -1;
- var cy = rtSize.y > 0 ? rtSize.y : -1;
-
- _source = src;
- _destination = dst;
-
- _commandBuffer = commandBuffer;
- _commandBuffer.BeginSample(EffectName);
- _commandBuffer.GetTemporaryRT(_maskRtId, cx, cy, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
- _commandBuffer.GetTemporaryRT(_hPassRtId, cx, cy, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
-
- // Need to copy src content into dst if they are not the same. For instance this is the case when rendering
- // the outline effect as part of Unity Post Processing stack.
- if (!src.Equals(dst))
- {
- if (SystemInfo.copyTextureSupport > CopyTextureSupport.None)
- {
- _commandBuffer.CopyTexture(src, dst);
- }
- else
- {
-#if UNITY_2018_2_OR_NEWER
- _commandBuffer.SetRenderTarget(dst, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
-#else
- _commandBuffer.SetRenderTarget(dst);
-#endif
- _commandBuffer.Blit(src, BuiltinRenderTextureType.CurrentActive);
- }
- }
- }
-
- ///
- /// Renders outline around a single object. This version allows enumeration of with no GC allocations.
- ///
- /// One or more renderers representing a single object to be outlined.
- /// Outline resources.
- /// Outline settings.
- /// Thrown if any of the arguments is .
- ///
- ///
- public void Render(IList renderers, OutlineResources resources, IOutlineSettings settings)
- {
- if (renderers == null)
- {
- throw new ArgumentNullException("renderers");
- }
-
- if (resources == null)
- {
- throw new ArgumentNullException("resources");
- }
-
- if (settings == null)
- {
- throw new ArgumentNullException("settings");
- }
-
- Init(resources, settings);
- RenderObject(resources, settings, renderers);
- RenderHPass(resources, settings);
- RenderVPassBlend(resources, settings);
- }
-
- ///
- /// Renders outline around a single object.
- ///
- /// One or more renderers representing a single object to be outlined.
- /// Outline resources.
- /// Outline settings.
- /// Thrown if any of the arguments is .
- ///
- ///
- public void Render(IEnumerable renderers, OutlineResources resources, IOutlineSettings settings)
- {
- if (renderers == null)
- {
- throw new ArgumentNullException("renderers");
- }
-
- if (resources == null)
- {
- throw new ArgumentNullException("resources");
- }
-
- if (settings == null)
- {
- throw new ArgumentNullException("settings");
- }
-
- Init(resources, settings);
- RenderObject(resources, settings, renderers);
- RenderHPass(resources, settings);
- RenderVPassBlend(resources, settings);
- }
-
- ///
- /// Renders outline around a single object.
- ///
- /// A representing an object to be outlined.
- /// Outline resources.
- /// Outline settings.
- /// Thrown if any of the arguments is .
- ///
- ///
- public void Render(Renderer renderer, OutlineResources resources, IOutlineSettings settings)
- {
- if (renderer == null)
- {
- throw new ArgumentNullException("renderers");
- }
-
- if (resources == null)
- {
- throw new ArgumentNullException("resources");
- }
-
- if (settings == null)
- {
- throw new ArgumentNullException("settings");
- }
-
- Init(resources, settings);
- RenderObject(resources, settings, renderer);
- RenderHPass(resources, settings);
- RenderVPassBlend(resources, settings);
- }
-
- ///
- /// Calculates value of Gauss function for the specified and values.
- ///
- ///
- ///
- public static float Gauss(float x, float stdDev)
- {
- var stdDev2 = stdDev * stdDev * 2;
- var a = 1 / Mathf.Sqrt((float)Math.PI * stdDev2);
- var gauss = a * Mathf.Pow((float)Math.E, -x * x / stdDev2);
-
- return gauss;
- }
-
- ///
- /// Samples Gauss function for the specified .
- ///
- ///
- public static float[] GetGaussSamples(int width, float[] samples)
- {
- // NOTE: According to '3 sigma' rule there is no reason to have StdDev less then width / 3.
- // In practice blur looks best when StdDev is within range [width / 3, width / 2].
- var stdDev = width * 0.5f;
-
- if (samples == null)
- {
- samples = new float[MaxWidth];
- }
-
- for (var i = 0; i < width; i++)
- {
- samples[i] = Gauss(i, stdDev);
- }
-
- return samples;
- }
-
- #endregion
-
- #region IDisposable
-
- ///
- /// Finalizes the effect rendering and releases temporary textures used. Should only be called once.
- ///
- public void Dispose()
- {
- _commandBuffer.ReleaseTemporaryRT(_hPassRtId);
- _commandBuffer.ReleaseTemporaryRT(_maskRtId);
- _commandBuffer.EndSample(EffectName);
- }
-
- #endregion
-
- #region implementation
-
- private void Init(OutlineResources resources, IOutlineSettings settings)
- {
- _commandBuffer.SetGlobalFloatArray(resources.GaussSamplesId, resources.GetGaussSamples(settings.OutlineWidth));
- }
-
- private void RenderObjectClear(bool depthTestEnabled)
- {
- if (depthTestEnabled)
- {
- // NOTE: Use the camera depth buffer when rendering the mask. Shader only reads from the depth buffer (ZWrite Off).
-#if UNITY_2018_2_OR_NEWER
- _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, BuiltinRenderTextureType.Depth, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare);
-#else
- _commandBuffer.SetRenderTarget(_maskRtId, BuiltinRenderTextureType.Depth);
-#endif
- }
- else
- {
-#if UNITY_2018_2_OR_NEWER
- _commandBuffer.SetRenderTarget(_maskRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
-#else
- _commandBuffer.SetRenderTarget(_maskRtId);
-#endif
- }
-
- _commandBuffer.ClearRenderTarget(false, true, Color.clear);
- }
-
- private void RenderObject(OutlineResources resources, IOutlineSettings settings, IList renderers)
- {
- RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
-
- for (var i = 0; i < renderers.Count; ++i)
- {
- var r = renderers[i];
-
- if (r && r.enabled && r.gameObject.activeInHierarchy)
- {
- // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
- // list of materials, cached with the outline resources.
- r.GetSharedMaterials(resources.TmpMaterials);
-
- for (var j = 0; j < resources.TmpMaterials.Count; ++j)
- {
- _commandBuffer.DrawRenderer(r, resources.RenderMaterial, j);
- }
- }
- }
- }
-
- private void RenderObject(OutlineResources resources, IOutlineSettings settings, IEnumerable renderers)
- {
- RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
-
- // NOTE: Calling IEnumerable.GetEnumerator() triggers GC.Alloc.
- foreach (var r in renderers)
- {
- if (r && r.enabled && r.gameObject.activeInHierarchy)
- {
- // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
- // list of materials, cached with the outline resources.
- r.GetSharedMaterials(resources.TmpMaterials);
-
- for (var j = 0; j < resources.TmpMaterials.Count; ++j)
- {
- _commandBuffer.DrawRenderer(r, resources.RenderMaterial, j);
- }
- }
- }
- }
-
- private void RenderObject(OutlineResources resources, IOutlineSettings settings, Renderer renderer)
- {
- RenderObjectClear((settings.OutlineRenderMode & OutlineRenderFlags.EnableDepthTesting) != 0);
-
- if (renderer && renderer.gameObject.activeInHierarchy && renderer.enabled)
- {
- // NOTE: Accessing Renderer.sharedMaterials triggers GC.Alloc. That's why we use a temporary
- // list of materials, cached with the outline resources.
- renderer.GetSharedMaterials(resources.TmpMaterials);
-
- for (var i = 0; i < resources.TmpMaterials.Count; ++i)
- {
- _commandBuffer.DrawRenderer(renderer, resources.RenderMaterial, i);
- }
- }
- }
-
- private void RenderHPass(OutlineResources resources, IOutlineSettings settings)
- {
- // Setup shader parameter overrides.
- var props = resources.HPassProperties;
- props.SetFloat(resources.WidthId, settings.OutlineWidth);
-
- // Set source texture as _MainTex to match Blit behavior.
- _commandBuffer.SetGlobalTexture(_mainRtId, _maskRtId);
-
- // Set destination texture as render target.
-#if UNITY_2018_2_OR_NEWER
- _commandBuffer.SetRenderTarget(_hPassRtId, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
-#else
- _commandBuffer.SetRenderTarget(_hPassRtId);
-#endif
-
- // Blit fullscreen triangle.
- _commandBuffer.DrawMesh(resources.FullscreenTriangleMesh, Matrix4x4.identity, resources.HPassMaterial, 0, 0, props);
- }
-
- private void RenderVPassBlend(OutlineResources resources, IOutlineSettings settings)
- {
- // Setup shader parameter overrides.
- var props = resources.VPassBlendProperties;
-
- props.SetFloat(resources.WidthId, settings.OutlineWidth);
- props.SetColor(resources.ColorId, settings.OutlineColor);
-
- if ((settings.OutlineRenderMode & OutlineRenderFlags.Blurred) != 0)
- {
- props.SetFloat(resources.IntensityId, settings.OutlineIntensity);
- }
- else
- {
- props.SetFloat(resources.IntensityId, SolidIntensity);
- }
-
- // Set source texture as _MainTex to match Blit behavior.
- _commandBuffer.SetGlobalTexture(_mainRtId, _source);
-
- // Set destination texture as render target.
-#if UNITY_2018_2_OR_NEWER
- _commandBuffer.SetRenderTarget(_destination, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
-#else
- _commandBuffer.SetRenderTarget(_destination);
-#endif
-
- // Blit fullscreen triangle.
- _commandBuffer.DrawMesh(resources.FullscreenTriangleMesh, Matrix4x4.identity, resources.VPassBlendMaterial, 0, 0, props);
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta
deleted file mode 100644
index 90c49ef..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRenderer.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 4271470bd9f5d5041a4a8881d8457a55
-timeCreated: 1566150038
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
deleted file mode 100644
index 730e6dd..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- internal class OutlineRendererCollection : ICollection
- {
- #region data
-
- private readonly List _renderers = new List();
- private readonly GameObject _go;
-
- #endregion
-
- #region interface
-
- internal OutlineRendererCollection(GameObject go)
- {
- Debug.Assert(go);
- _go = go;
- }
-
- internal List GetList()
- {
- return _renderers;
- }
-
- internal void Reset(bool includeInactive)
- {
- _go.GetComponentsInChildren(includeInactive, _renderers);
- }
-
- internal void Reset(bool includeInactive, int ignoreLayerMask)
- {
- _renderers.Clear();
-
- var renderers = _go.GetComponentsInChildren(includeInactive);
-
- if (renderers != null)
- {
- if (ignoreLayerMask != 0)
- {
- foreach (var renderer in renderers)
- {
- if (((1 << renderer.gameObject.layer) & ignoreLayerMask) == 0)
- {
- _renderers.Add(renderer);
- }
- }
- }
- else
- {
- foreach (var renderer in renderers)
- {
- _renderers.Add(renderer);
- }
- }
- }
- }
-
- #endregion
-
- #region ICollection
-
- public int Count
- {
- get
- {
- return _renderers.Count;
- }
- }
-
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- public void Add(Renderer renderer)
- {
- Validate(renderer);
-
- _renderers.Add(renderer);
- }
-
- public bool Remove(Renderer renderer)
- {
- return _renderers.Remove(renderer);
- }
-
- public void Clear()
- {
- _renderers.Clear();
- }
-
- public bool Contains(Renderer renderer)
- {
- return _renderers.Contains(renderer);
- }
-
- public void CopyTo(Renderer[] array, int arrayIndex)
- {
- _renderers.CopyTo(array, arrayIndex);
- }
-
- #endregion
-
- #region IEnumerable
-
- public IEnumerator GetEnumerator()
- {
- return _renderers.GetEnumerator();
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return _renderers.GetEnumerator();
- }
-
- #endregion
-
- #region implementation
-
- private void Validate(Renderer renderer)
- {
- if (renderer == null)
- {
- throw new ArgumentNullException("renderer");
- }
-
- if (!renderer.transform.IsChildOf(_go.transform))
- {
- throw new ArgumentException(string.Format("Only children of the {0} are allowed.", _go.name), "renderer");
- }
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
deleted file mode 100644
index f582b73..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineRendererCollection.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 89621a3cc73c4e6498a00b2d180ed462
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
deleted file mode 100644
index 8d8f169..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- ///
- /// This asset is used to store references to shaders and other resources needed at runtime without having to use a Resources folder.
- ///
- ///
- [CreateAssetMenu(fileName = "OutlineResources", menuName = "UnityFx/Outline/Outline Resources")]
- public sealed class OutlineResources : ScriptableObject
- {
- #region data
-
- private Material _renderMaterial;
- private Material _hPassMaterial;
- private Material _vPassMaterial;
- private MaterialPropertyBlock _hPassProperties;
- private MaterialPropertyBlock _vPassProperties;
- private Mesh _fullscreenTriangleMesh;
- private float[][] _gaussSamples;
-
- #endregion
-
- #region interface
-
- ///
- /// Hashed name of _Color shader parameter.
- ///
- public readonly int ColorId = Shader.PropertyToID("_Color");
-
- ///
- /// Hashed name of _Width shader parameter.
- ///
- public readonly int WidthId = Shader.PropertyToID("_Width");
-
- ///
- /// Hashed name of _Intensity shader parameter.
- ///
- public readonly int IntensityId = Shader.PropertyToID("_Intensity");
-
- ///
- /// Hashed name of _GaussSamples shader parameter.
- ///
- public readonly int GaussSamplesId = Shader.PropertyToID("_GaussSamples");
-
- ///
- /// Temp materials list. Used by to avoid GC allocations.
- ///
- public readonly List TmpMaterials = new List();
-
- ///
- /// Gets or sets a that renders objects outlined with a solid while color.
- ///
- public Shader RenderShader;
-
- ///
- /// Gets or sets a that renders outline around the mask, that was generated with (pass 1).
- ///
- public Shader HPassShader;
-
- ///
- /// Gets or sets a that renders outline around the mask, that was generated with and (pass 2).
- ///
- public Shader VPassBlendShader;
-
- ///
- /// Gets a -based material.
- ///
- public Material RenderMaterial
- {
- get
- {
- if (_renderMaterial == null)
- {
- _renderMaterial = new Material(RenderShader)
- {
- name = "Outline - SimpleRender",
- hideFlags = HideFlags.HideAndDontSave
- };
- }
-
- return _renderMaterial;
- }
- }
-
- ///
- /// Gets a -based material.
- ///
- public Material HPassMaterial
- {
- get
- {
- if (_hPassMaterial == null)
- {
- _hPassMaterial = new Material(HPassShader)
- {
- name = "Outline - HPassRender",
- hideFlags = HideFlags.HideAndDontSave
- };
- }
-
- return _hPassMaterial;
- }
- }
-
- ///
- /// Gets a -based material.
- ///
- public Material VPassBlendMaterial
- {
- get
- {
- if (_vPassMaterial == null)
- {
- _vPassMaterial = new Material(VPassBlendShader)
- {
- name = "Outline - VPassBlendRender",
- hideFlags = HideFlags.HideAndDontSave
- };
- }
-
- return _vPassMaterial;
- }
- }
-
- ///
- /// Gets a for .
- ///
- public MaterialPropertyBlock HPassProperties
- {
- get
- {
- if (_hPassProperties == null)
- {
- _hPassProperties = new MaterialPropertyBlock();
- }
-
- return _hPassProperties;
- }
- }
-
- ///
- /// Gets a for .
- ///
- public MaterialPropertyBlock VPassBlendProperties
- {
- get
- {
- if (_vPassProperties == null)
- {
- _vPassProperties = new MaterialPropertyBlock();
- }
-
- return _vPassProperties;
- }
- }
-
- ///
- /// Gets or sets a fullscreen triangle mesh.
- ///
- public Mesh FullscreenTriangleMesh
- {
- get
- {
- if (_fullscreenTriangleMesh == null)
- {
- _fullscreenTriangleMesh = new Mesh()
- {
- name = "Outline - FullscreenTriangle",
- hideFlags = HideFlags.HideAndDontSave,
- vertices = new Vector3[] { new Vector3(-1f, -1f, 0f), new Vector3(-1f, 3f, 0f), new Vector3( 3f, -1f, 0f) },
- triangles = new int[] {0, 1, 2 }
- };
-
- _fullscreenTriangleMesh.UploadMeshData(true);
- }
-
- return _fullscreenTriangleMesh;
- }
- set
- {
- _fullscreenTriangleMesh = value;
- }
- }
-
- ///
- /// Gets a value indicating whether the instance is in valid state.
- ///
- public bool IsValid
- {
- get
- {
- return RenderShader && HPassShader && VPassBlendShader;
- }
- }
-
- ///
- /// Gets cached gauss samples for the specified outline .
- ///
- public float[] GetGaussSamples(int width)
- {
- var index = Mathf.Clamp(width, 1, OutlineRenderer.MaxWidth) - 1;
-
- if (_gaussSamples == null)
- {
- _gaussSamples = new float[OutlineRenderer.MaxWidth][];
- }
-
- if (_gaussSamples[index] == null)
- {
- _gaussSamples[index] = OutlineRenderer.GetGaussSamples(width, null);
- }
-
- return _gaussSamples[index];
- }
-
- ///
- /// Resets the resources to defaults.
- ///
- public void ResetToDefaults()
- {
- RenderShader = Shader.Find("UnityFx/Outline/RenderColor");
- HPassShader = Shader.Find("UnityFx/Outline/HPass");
- VPassBlendShader = Shader.Find("UnityFx/Outline/VPassBlend");
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta
deleted file mode 100644
index 0f1aca3..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineResources.cs.meta
+++ /dev/null
@@ -1,14 +0,0 @@
-fileFormatVersion: 2
-guid: b503341e0a514e3489c4851727e68257
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences:
- - RenderShader: {fileID: 4800000, guid: ac20fbf75bafe454aba5ef3c098349df, type: 3}
- - HPassShader: {fileID: 4800000, guid: 41c9acbf41c8245498ac9beab378de12, type: 3}
- - VPassBlendShader: {fileID: 4800000, guid: 1df0cb1700e142f4ca3b28297d3957da, type: 3}
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
deleted file mode 100644
index 2535031..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- ///
- /// Outline settings.
- ///
- [CreateAssetMenu(fileName = "OutlineSettings", menuName = "UnityFx/Outline/Outline Settings")]
- public sealed class OutlineSettings : ScriptableObject, IOutlineSettings
- {
- #region data
-
- // NOTE: There is a custom editor for OutlineSettings, so no need to show these in default inspector.
- [SerializeField, HideInInspector]
- private Color _outlineColor = Color.red;
- [SerializeField, HideInInspector]
- private int _outlineWidth = 4;
- [SerializeField, HideInInspector]
- private float _outlineIntensity = 2;
- [SerializeField, HideInInspector]
- private OutlineRenderFlags _outlineMode;
-
- #endregion
-
- #region interface
-
- public static bool Equals(IOutlineSettings lhs, IOutlineSettings rhs)
- {
- if (lhs == null || rhs == null)
- {
- return false;
- }
-
- return lhs.OutlineColor == rhs.OutlineColor &&
- lhs.OutlineWidth == rhs.OutlineWidth &&
- lhs.OutlineRenderMode == rhs.OutlineRenderMode &&
- Mathf.Approximately(lhs.OutlineIntensity, rhs.OutlineIntensity);
- }
-
- #endregion
-
- #region IOutlineSettings
-
- ///
- public Color OutlineColor
- {
- get
- {
- return _outlineColor;
- }
- set
- {
- _outlineColor = value;
- }
- }
-
- ///
- public int OutlineWidth
- {
- get
- {
- return _outlineWidth;
- }
- set
- {
- _outlineWidth = Mathf.Clamp(value, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
- }
- }
-
- ///
- public float OutlineIntensity
- {
- get
- {
- return _outlineIntensity;
- }
- set
- {
- _outlineIntensity = Mathf.Clamp(value, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
- }
- }
-
- ///
- public OutlineRenderFlags OutlineRenderMode
- {
- get
- {
- return _outlineMode;
- }
- set
- {
- _outlineMode = value;
- }
- }
-
- #endregion
-
- #region IEquatable
-
- ///
- public bool Equals(IOutlineSettings other)
- {
- return Equals(this, other);
- }
-
- #endregion
-
- #region Object
-
- ///
- public override bool Equals(object other)
- {
- return Equals(this, other as IOutlineSettings);
- }
-
- ///
- public override int GetHashCode()
- {
- return base.GetHashCode();
- }
-
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta
deleted file mode 100644
index c6de014..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettings.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: b579424fd3338724cba3155ee4d53475
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
deleted file mode 100644
index a39ef7e..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using UnityEngine;
-
-namespace UnityFx.Outline
-{
- [Serializable]
- internal class OutlineSettingsInstance : IOutlineSettingsEx
- {
- #region data
-
-#pragma warning disable 0649
-
- // NOTE: There are custom editors for public components, so no need to show these in default inspector.
- [SerializeField, HideInInspector]
- private OutlineSettings _outlineSettings;
- [SerializeField, HideInInspector]
- private Color _outlineColor = Color.red;
- [SerializeField, HideInInspector]
- private int _outlineWidth = 4;
- [SerializeField, HideInInspector]
- private float _outlineIntensity = 2;
- [SerializeField, HideInInspector]
- private OutlineRenderFlags _outlineMode;
-
-#pragma warning restore 0649
-
- private OutlineResources _resources;
-
- #endregion
-
- #region interface
-
- public OutlineResources OutlineResources
- {
- get
- {
- return _resources;
- }
- set
- {
- _resources = value;
- }
- }
-
- public bool RequiresCameraDepth
- {
- get
- {
- var renderMode = _outlineMode;
-
- if (!ReferenceEquals(_outlineSettings, null))
- {
- renderMode = _outlineSettings.OutlineRenderMode;
- }
-
- return (renderMode & OutlineRenderFlags.EnableDepthTesting) != 0;
- }
- }
-
- internal OutlineSettingsInstance()
- {
- }
-
- internal OutlineSettingsInstance(OutlineResources resources)
- {
- _resources = resources;
- }
-
- #endregion
-
- #region IOutlineSettingsEx
-
- public OutlineSettings OutlineSettings
- {
- get
- {
- return _outlineSettings;
- }
- set
- {
- _outlineSettings = value;
- }
- }
-
- #endregion
-
- #region IOutlineSettings
-
- ///
- public Color OutlineColor
- {
- get
- {
- if (!ReferenceEquals(_outlineSettings, null))
- {
- return _outlineSettings.OutlineColor;
- }
-
- return _outlineColor;
- }
- set
- {
- _outlineColor = value;
- }
- }
-
- ///
- public int OutlineWidth
- {
- get
- {
- if (!ReferenceEquals(_outlineSettings, null))
- {
- return _outlineSettings.OutlineWidth;
- }
-
- return _outlineWidth;
- }
- set
- {
- _outlineWidth = Mathf.Clamp(value, OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
- }
- }
-
- ///
- public float OutlineIntensity
- {
- get
- {
- if (!ReferenceEquals(_outlineSettings, null))
- {
- return _outlineSettings.OutlineIntensity;
- }
-
- return _outlineIntensity;
- }
- set
- {
- _outlineIntensity = Mathf.Clamp(value, OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
- }
- }
-
- ///
- public OutlineRenderFlags OutlineRenderMode
- {
- get
- {
- if (!ReferenceEquals(_outlineSettings, null))
- {
- return _outlineSettings.OutlineRenderMode;
- }
-
- return _outlineMode;
- }
- set
- {
- _outlineMode = value;
- }
- }
-
- #endregion
-
- #region IEquatable
-
- public bool Equals(IOutlineSettings other)
- {
- return OutlineSettings.Equals(this, other);
- }
-
- #endregion
-
- #region implementation
- #endregion
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta b/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta
deleted file mode 100644
index 177c3cb..0000000
--- a/Packages/UnityFx.Outline/Runtime/Scripts/OutlineSettingsInstance.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8ea4c60e473b8ef4790934bb274993cc
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders.meta b/Packages/UnityFx.Outline/Runtime/Shaders.meta
deleted file mode 100644
index bf1ab62..0000000
--- a/Packages/UnityFx.Outline/Runtime/Shaders.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: e4ede0e617beaeb4a8781136599aa84e
-folderAsset: yes
-timeCreated: 1566126961
-licenseType: Free
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
deleted file mode 100644
index 2febb62..0000000
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-// Renders outline based on a texture produces by 'UnityF/Outline/RenderColor' output.
-// Modified version of 'Custom/Post Outline' shader taken from https://willweissman.wordpress.com/tutorials/shaders/unity-shaderlab-object-outlines/.
-Shader "UnityFx/Outline/HPass"
-{
- Properties
- {
- _Width("Outline thickness (in pixels)", Range(1, 32)) = 5
- }
-
- SubShader
- {
- Cull Off
- ZWrite Off
- ZTest Always
- Lighting Off
-
- Pass
- {
- HLSLPROGRAM
-
- #pragma vertex Vert
- #pragma fragment Frag
- #include "UnityCG.cginc"
-
- CBUFFER_START(UnityPerMaterial)
- int _Width;
- CBUFFER_END
-
- UNITY_DECLARE_TEX2D(_MaskTex);
- float2 _MaskTex_TexelSize;
- float _GaussSamples[32];
-
- struct v2f
- {
- float4 pos : POSITION;
- float2 uvs : TEXCOORD0;
- };
-
- v2f Vert(appdata_base v)
- {
- v2f o;
-
- o.pos = float4(v.vertex.xy, 0.0, 1.0);
- o.uvs = ComputeScreenPos(o.pos);
-
- return o;
- }
-
- float Frag(v2f i) : COLOR
- {
- float TX_x = _MaskTex_TexelSize.x;
- float intensity;
- int n = _Width;
-
- for (int k = -n; k <= n; k += 1)
- {
- intensity += UNITY_SAMPLE_TEX2D(_MaskTex, i.uvs.xy + float2(k * TX_x, 0)).r * _GaussSamples[abs(k)];
- }
-
- return intensity;
- }
-
- ENDHLSL
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta
deleted file mode 100644
index bb55354..0000000
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass1.shader.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 41c9acbf41c8245498ac9beab378de12
-timeCreated: 1566126977
-licenseType: Free
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
deleted file mode 100644
index dbf1a18..0000000
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-// Renders outline based on a texture produces by 'UnityF/Outline/RenderColor' output.
-// Modified version of 'Custom/Post Outline' shader taken from https://willweissman.wordpress.com/tutorials/shaders/unity-shaderlab-object-outlines/.
-Shader "UnityFx/Outline/VPassBlend"
-{
- Properties
- {
- _Width("Outline thickness (in pixels)", Range(1, 32)) = 5
- _Intensity("Outline intensity", Range(0.1, 100)) = 2
- _Color("Outline color", Color) = (1, 0, 0, 1)
- }
-
- SubShader
- {
- Cull Off
- ZWrite Off
- ZTest Always
- Lighting Off
-
- Blend SrcAlpha OneMinusSrcAlpha
-
- Pass
- {
- HLSLPROGRAM
-
- #pragma vertex Vert
- #pragma fragment Frag
- #include "UnityCG.cginc"
-
- CBUFFER_START(UnityPerMaterial)
- float _Intensity;
- int _Width;
- float4 _Color;
- CBUFFER_END
-
- UNITY_DECLARE_TEX2D(_MaskTex);
- float2 _MaskTex_TexelSize;
- UNITY_DECLARE_TEX2D(_HPassTex);
- float2 _HPassTex_TexelSize;
- float _GaussSamples[32];
-
- struct v2f
- {
- float4 pos : POSITION;
- float2 uvs : TEXCOORD0;
- };
-
- v2f Vert(appdata_base v)
- {
- v2f o;
-
- o.pos = float4(v.vertex.xy, 0.0, 1.0);
- o.uvs = ComputeScreenPos(o.pos);
-
- return o;
- }
-
- float4 Frag(v2f i) : COLOR
- {
- if (UNITY_SAMPLE_TEX2D(_MaskTex, i.uvs.xy).r > 0)
- {
- discard;
- }
-
- float TX_y = _MaskTex_TexelSize.y;
- float intensity;
- int n = _Width;
-
- for (int k = -n; k <= _Width; k += 1)
- {
- intensity += UNITY_SAMPLE_TEX2D(_HPassTex, i.uvs.xy + float2(0, k * TX_y)).r * _GaussSamples[abs(k)];
- }
-
- intensity = _Intensity > 99 ? step(0.01, intensity) : intensity * _Intensity;
- return float4(_Color.rgb, saturate(_Color.a * intensity));
- }
-
- ENDHLSL
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta b/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta
deleted file mode 100644
index 5852e4b..0000000
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlinePass2.shader.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 1df0cb1700e142f4ca3b28297d3957da
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader b/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
deleted file mode 100644
index bf53276..0000000
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-// Renders everything with while color.
-// Modified version of 'Custom/DrawSimple' shader taken from https://willweissman.wordpress.com/tutorials/shaders/unity-shaderlab-object-outlines/.
-Shader "UnityFx/Outline/RenderColor"
-{
- SubShader
- {
- Cull Off
- ZWrite Off
- ZTest LEqual
- Lighting Off
-
- Pass
- {
- HLSLPROGRAM
-
- #pragma vertex Vert
- #pragma fragment Frag
- #include "UnityCG.cginc"
-
- struct v2f
- {
- float4 pos: POSITION;
- };
-
- v2f Vert(v2f i)
- {
- v2f o;
- o.pos = UnityObjectToClipPos(i.pos);
- return o;
- }
-
- half4 Frag(): COLOR0
- {
- return half4(1, 1, 1, 1);
- }
-
- ENDHLSL
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta b/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta
deleted file mode 100644
index 66aa3a2..0000000
--- a/Packages/UnityFx.Outline/Runtime/Shaders/OutlineRenderColor.shader.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: ac20fbf75bafe454aba5ef3c098349df
-timeCreated: 1566126977
-licenseType: Free
-ShaderImporter:
- externalObjects: {}
- defaultTextures: []
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef b/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef
deleted file mode 100644
index af0702d..0000000
--- a/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "name": "UnityFx.Outline"
-}
diff --git a/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta b/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta
deleted file mode 100644
index 6a74c49..0000000
--- a/Packages/UnityFx.Outline/Runtime/UnityFx.Outline.asmdef.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: de7ed7f8e7092c144bd17cbabf282ba3
-timeCreated: 1566126961
-licenseType: Free
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests.meta b/Packages/UnityFx.Outline/Tests.meta
deleted file mode 100644
index ac6bd9e..0000000
--- a/Packages/UnityFx.Outline/Tests.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 9c2f662256b33974c94b1b56640a7397
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor.meta b/Packages/UnityFx.Outline/Tests/Editor.meta
deleted file mode 100644
index f2ff48e..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: f2ad07e44abb5204aa73321dbeb58ddd
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts.meta
deleted file mode 100644
index f055344..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 0678297c303e4104896b2beec616a514
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers.meta
deleted file mode 100644
index 75cfe48..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: ecd2c4203d2dee74389ff168d633fe3a
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
deleted file mode 100644
index af05396..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.ComponentModel;
-using UnityEngine;
-using UnityEngine.TestTools;
-using NUnit.Framework;
-
-namespace UnityFx.Outline
-{
- public abstract class IOutlineSettingsExTests : IOutlineSettingsTests
- {
- private IOutlineSettingsEx _settings;
- private IChangeTracking _changeTracking;
-
- protected void Init(IOutlineSettingsEx settings)
- {
- _settings = settings;
- _changeTracking = settings as IChangeTracking;
- base.Init(settings);
- }
-
- [Test]
- public void OutlineSettings_SetsValue()
- {
- var settings = ScriptableObject.CreateInstance();
-
- try
- {
- _settings.OutlineSettings = settings;
-
- Assert.AreEqual(settings, _settings.OutlineSettings);
-
- _settings.OutlineSettings = null;
-
- Assert.IsNull(_settings.OutlineSettings);
- }
- finally
- {
- UnityEngine.Object.DestroyImmediate(settings);
- }
- }
-
- [Test]
- public void OutlineSettings_SetsChanged()
- {
- if (_changeTracking != null)
- {
- var settings = ScriptableObject.CreateInstance();
-
- try
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineSettings = settings;
-
- Assert.IsTrue(_changeTracking.IsChanged);
- }
- finally
- {
- UnityEngine.Object.DestroyImmediate(settings);
- }
- }
- }
-
- [Test]
- public void OutlineSettings_DoesNotSetsChangedOnSameValue()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineSettings = _settings.OutlineSettings;
-
- Assert.IsFalse(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineSettings_MakesOtherSettersThrow()
- {
- var settings = ScriptableObject.CreateInstance();
-
- try
- {
- _settings.OutlineSettings = settings;
-
- Assert.Throws(() => _settings.OutlineColor = Color.blue);
- Assert.Throws(() => _settings.OutlineWidth = 12);
- Assert.Throws(() => _settings.OutlineRenderMode = OutlineRenderFlags.Blurred);
- Assert.Throws(() => _settings.OutlineIntensity = 17);
- }
- finally
- {
- UnityEngine.Object.DestroyImmediate(settings);
- }
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta
deleted file mode 100644
index eacde42..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsExTests.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: c7d2cd56d59228e40917059e616e5ee9
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
deleted file mode 100644
index 55a2687..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.ComponentModel;
-using UnityEngine;
-using UnityEngine.TestTools;
-using NUnit.Framework;
-
-namespace UnityFx.Outline
-{
- public abstract class IOutlineSettingsTests
- {
- private IOutlineSettings _settings;
- private IChangeTracking _changeTracking;
-
- protected void Init(IOutlineSettings settings)
- {
- _settings = settings;
- _changeTracking = settings as IChangeTracking;
- }
-
- [Test]
- public void OutlineColor_SetsValue()
- {
- var color = Color.blue;
- _settings.OutlineColor = color;
-
- Assert.AreEqual(color, _settings.OutlineColor);
- }
-
- [Test]
- public void OutlineColor_SetsChanged()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineColor = Color.blue;
-
- Assert.IsTrue(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineColor_DoesNotSetsChangedOnSameValue()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineColor = _settings.OutlineColor;
-
- Assert.IsFalse(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineWidth_DefaultValueIsValid()
- {
- Assert.LessOrEqual(OutlineRenderer.MinWidth, _settings.OutlineWidth);
- Assert.GreaterOrEqual(OutlineRenderer.MaxWidth, _settings.OutlineWidth);
- }
-
- [Test]
- public void OutlineWidth_SetsValue()
- {
- var width = UnityEngine.Random.Range(OutlineRenderer.MinWidth, OutlineRenderer.MaxWidth);
- _settings.OutlineWidth = width;
-
- Assert.AreEqual(width, _settings.OutlineWidth);
- }
-
- [Test]
- public void OutlineWidth_ClampsValue()
- {
- _settings.OutlineWidth = 1000;
-
- Assert.AreEqual(OutlineRenderer.MaxWidth, _settings.OutlineWidth);
-
- _settings.OutlineWidth = -1000;
-
- Assert.AreEqual(OutlineRenderer.MinWidth, _settings.OutlineWidth);
- }
-
- [Test]
- public void OutlineWidth_SetsChanged()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineWidth = 10;
-
- Assert.IsTrue(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineWidth_DoesNotSetsChangedOnSameValue()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineWidth = _settings.OutlineWidth;
-
- Assert.IsFalse(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineMode_SetsValue()
- {
- _settings.OutlineRenderMode = OutlineRenderFlags.Blurred;
- Assert.AreEqual(OutlineRenderFlags.Blurred, _settings.OutlineRenderMode);
-
- _settings.OutlineRenderMode = OutlineRenderFlags.Solid;
- Assert.AreEqual(OutlineRenderFlags.Solid, _settings.OutlineRenderMode);
- }
-
- [Test]
- public void OutlineMode_SetsChanged()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineRenderMode = OutlineRenderFlags.Blurred;
-
- Assert.IsTrue(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineMode_DoesNotSetsChangedOnSameValue()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineRenderMode = _settings.OutlineRenderMode;
-
- Assert.IsFalse(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineIntensity_DefaultValueIsValid()
- {
- Assert.LessOrEqual(OutlineRenderer.MinIntensity, _settings.OutlineIntensity);
- Assert.GreaterOrEqual(OutlineRenderer.MaxIntensity, _settings.OutlineIntensity);
- }
-
- [Test]
- public void OutlineIntensity_SetsValue()
- {
- var intensity = UnityEngine.Random.Range(OutlineRenderer.MinIntensity, OutlineRenderer.MaxIntensity);
-
- _settings.OutlineIntensity = intensity;
-
- Assert.AreEqual(intensity, _settings.OutlineIntensity);
- }
-
- [Test]
- public void OutlineIntensity_ClampsValue()
- {
- _settings.OutlineIntensity = 1000;
-
- Assert.AreEqual(OutlineRenderer.MaxIntensity, _settings.OutlineIntensity);
-
- _settings.OutlineIntensity = -1000;
-
- Assert.AreEqual(OutlineRenderer.MinIntensity, _settings.OutlineIntensity);
- }
-
- [Test]
- public void OutlineIntensity_SetsChanged()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineIntensity = 21;
-
- Assert.IsTrue(_changeTracking.IsChanged);
- }
- }
-
- [Test]
- public void OutlineIntensity_DoesNotSetsChangedOnSameValue()
- {
- if (_changeTracking != null)
- {
- _changeTracking.AcceptChanges();
- _settings.OutlineIntensity = _settings.OutlineIntensity;
-
- Assert.IsFalse(_changeTracking.IsChanged);
- }
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta
deleted file mode 100644
index 57016ed..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/Helpers/IOutlineSettingsTests.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 504f7cf5606c25a4a8eeea06598d8cd0
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs
deleted file mode 100644
index 02c4202..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.TestTools;
-using NUnit.Framework;
-
-namespace UnityFx.Outline
-{
- [Category("OutlineBehaviour"), TestOf(typeof(OutlineBehaviour))]
- public class OutlineBehaviourTests : IOutlineSettingsExTests, IDisposable
- {
- private GameObject _go;
- private OutlineBehaviour _outlineEffect;
-
- [SetUp]
- public void Init()
- {
- _go = new GameObject();
- _outlineEffect = _go.AddComponent();
- Init(_outlineEffect);
- }
-
- [TearDown]
- public void Dispose()
- {
- UnityEngine.Object.DestroyImmediate(_go);
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta
deleted file mode 100644
index 34a74f0..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineBehaviourTests.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f7ff33caf6306d649ab2176f29f193d6
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
deleted file mode 100644
index fc19adb..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.TestTools;
-using NUnit.Framework;
-
-namespace UnityFx.Outline
-{
- [Category("OutlineLayerCollection"), TestOf(typeof(OutlineLayerCollection))]
- public class OutlineLayerCollectionTests : IDisposable
- {
- private OutlineLayerCollection _layerCollection;
-
- [SetUp]
- public void Init()
- {
- _layerCollection = ScriptableObject.CreateInstance();
- }
-
- [TearDown]
- public void Dispose()
- {
- UnityEngine.Object.DestroyImmediate(_layerCollection);
- }
-
- [Test]
- public void DefaultStateIsValid()
- {
- Assert.IsFalse(_layerCollection.IsReadOnly);
- Assert.IsEmpty(_layerCollection);
- Assert.Zero(_layerCollection.Count);
- }
-
- [Test]
- public void Add_ThrowsIfArgumentIsNull()
- {
- Assert.Throws(() => _layerCollection.Add(null));
- }
-
- [Test]
- public void Add_ThrowsIfLayerBelongsToAnotherCollection()
- {
- var anotherLayerCollection = ScriptableObject.CreateInstance();
- var layer = new OutlineLayer();
-
- try
- {
- anotherLayerCollection.Add(layer);
- Assert.Throws(() => _layerCollection.Add(layer));
- }
- finally
- {
- UnityEngine.Object.DestroyImmediate(anotherLayerCollection);
- }
- }
-
- [Test]
- public void Add_SetsCount()
- {
- _layerCollection.Add(new OutlineLayer());
-
- Assert.AreEqual(1, _layerCollection.Count);
- }
-
- [Test]
- public void Insert_ThrowsIfArgumentIsNull()
- {
- Assert.Throws(() => _layerCollection.Insert(0, null));
- }
-
- [Test]
- public void Insert_ThrowsIfLayerBelongsToAnotherCollection()
- {
- var anotherLayerCollection = ScriptableObject.CreateInstance();
- var layer = new OutlineLayer();
-
- try
- {
- anotherLayerCollection.Add(layer);
- Assert.Throws(() => _layerCollection.Insert(0, layer));
- }
- finally
- {
- UnityEngine.Object.DestroyImmediate(anotherLayerCollection);
- }
- }
-
- [Test]
- public void Insert_SetsCount()
- {
- _layerCollection.Insert(0, new OutlineLayer());
-
- Assert.AreEqual(1, _layerCollection.Count);
- }
-
- [Test]
- public void Remove_DoesNotThrowOnNullArgument()
- {
- Assert.DoesNotThrow(() => _layerCollection.Remove(null));
- }
-
- [Test]
- public void Remove_SetsCount()
- {
- var layer = new OutlineLayer();
-
- _layerCollection.Add(layer);
- _layerCollection.Remove(layer);
-
- Assert.Zero(_layerCollection.Count);
- }
-
- [Test]
- public void Clear_ResetsCount()
- {
- _layerCollection.Add(new OutlineLayer());
- _layerCollection.Clear();
-
- Assert.Zero(_layerCollection.Count);
- }
-
- [Test]
- public void Contains_DoesNotThrowIfArgumentIsNull()
- {
- _layerCollection.Contains(null);
- }
-
- [Test]
- public void Contains_SearchesArgument()
- {
- var layer = new OutlineLayer();
-
- Assert.IsFalse(_layerCollection.Contains(layer));
-
- _layerCollection.Add(layer);
-
- Assert.IsTrue(_layerCollection.Contains(layer));
- }
-
- [Test]
- public void SortedLayers_IsSortedByPriority()
- {
- var layer1 = new OutlineLayer()
- {
- Priority = 2
- };
-
- var layer2 = new OutlineLayer();
- var layer3 = new OutlineLayer();
-
- _layerCollection.Add(layer1);
- _layerCollection.Add(layer2);
- _layerCollection.Add(layer3);
-
- Assert.AreEqual(layer2, _layerCollection.SortedLayers[0]);
- Assert.AreEqual(layer3, _layerCollection.SortedLayers[1]);
- Assert.AreEqual(layer1, _layerCollection.SortedLayers[2]);
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta
deleted file mode 100644
index d67e736..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerCollectionTests.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 4a6e8c8f29227c2469990a6168c53b3f
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs
deleted file mode 100644
index df639c6..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.TestTools;
-using NUnit.Framework;
-
-namespace UnityFx.Outline
-{
- [Category("OutlineLayer"), TestOf(typeof(OutlineLayer))]
- public class OutlineLayerTests : IOutlineSettingsExTests, IDisposable
- {
- private OutlineLayer _layer;
-
- [SetUp]
- public void Init()
- {
- _layer = new OutlineLayer("TestLayer");
- Init(_layer);
- }
-
- [TearDown]
- public void Dispose()
- {
- }
-
- [Test]
- public void DefaultStateIsValid()
- {
- Assert.IsFalse(_layer.IsReadOnly);
- Assert.IsEmpty(_layer);
- Assert.Zero(_layer.Count);
- Assert.AreEqual("TestLayer", _layer.Name);
- Assert.AreEqual(-1, _layer.Index);
- }
-
- [Test]
- public void Add_ThrowsIfArgumentIsNull()
- {
- Assert.Throws(() => _layer.Add(null));
- }
-
- [Test]
- public void Add_SetsCount()
- {
- _layer.Add(new GameObject());
-
- Assert.AreEqual(1, _layer.Count);
- }
-
- [Test]
- public void Add_FiltersRenderesByLayer()
- {
- var go = new GameObject("r1", typeof(MeshRenderer));
- var go2 = new GameObject("r2", typeof(MeshRenderer));
-
- go2.layer = LayerMask.NameToLayer("TransparentFX");
- go2.transform.SetParent(go.transform, false);
-
- ICollection r;
-
- _layer.Add(go, "TransparentFX");
- _layer.TryGetRenderers(go, out r);
-
- Assert.AreEqual(1, r.Count);
- Assert.IsTrue(r.Contains(go.GetComponent()));
- Assert.IsFalse(r.Contains(go2.GetComponent()));
- }
-
- [Test]
- public void Remove_DoesNotThrowOnNullArgument()
- {
- Assert.DoesNotThrow(() => _layer.Remove(null));
- }
-
- [Test]
- public void Remove_SetsCount()
- {
- var go = new GameObject();
-
- _layer.Add(go);
- _layer.Remove(go);
-
- Assert.Zero(_layer.Count);
- }
-
- [Test]
- public void Clear_ResetsCount()
- {
- _layer.Add(new GameObject());
- _layer.Clear();
-
- Assert.Zero(_layer.Count);
- }
-
- [Test]
- public void Contains_DoesNotThrowIfArgumentIsNull()
- {
- _layer.Contains(null);
- }
-
- [Test]
- public void Contains_SearchesArgument()
- {
- var go = new GameObject();
-
- Assert.IsFalse(_layer.Contains(go));
-
- _layer.Add(go);
-
- Assert.IsTrue(_layer.Contains(go));
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs.meta
deleted file mode 100644
index 5f35914..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineLayerTests.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 6372b061875e8a54bb7ca0dbf1bb3e4b
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs
deleted file mode 100644
index e4c83b0..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Rendering;
-using UnityEngine.TestTools;
-using NUnit.Framework;
-
-namespace UnityFx.Outline
-{
- [Category("OutlineRenderer"), TestOf(typeof(OutlineRenderer))]
- public class OutlineRendererTests : IDisposable
- {
- private CommandBuffer _commandBuffer;
- private OutlineRenderer _renderer;
-
- [SetUp]
- public void Init()
- {
- _commandBuffer = new CommandBuffer();
- _renderer = new OutlineRenderer(_commandBuffer, BuiltinRenderTextureType.CameraTarget);
- }
-
- [TearDown]
- public void Dispose()
- {
- _commandBuffer.Dispose();
- }
-
- [Test]
- public void Dispose_CanBeCalledMultipleTimes()
- {
- _renderer.Dispose();
- _renderer.Dispose();
- }
-
- [Test]
- public void RenderSingleObject_ThrowsIfNullArguments()
- {
- Assert.Throws(() => _renderer.Render(default(IList), null, null));
- Assert.Throws(() => _renderer.Render(default(Renderer), null, null));
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs.meta
deleted file mode 100644
index dce56a7..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineRendererTests.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 0c4dcc61e824b6f4f8805dbe543d2997
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs
deleted file mode 100644
index e47efbe..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (C) 2019-2020 Alexander Bogarsukov. All rights reserved.
-// See the LICENSE.md file in the project root for more information.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEditor;
-using UnityEngine;
-using UnityEngine.TestTools;
-using NUnit.Framework;
-
-namespace UnityFx.Outline
-{
- [Category("OutlineSettings"), TestOf(typeof(OutlineSettings))]
- public class OutlineSettingsTests : IOutlineSettingsTests, IDisposable
- {
- private OutlineSettings _settings;
-
- [SetUp]
- public void Init()
- {
- _settings = ScriptableObject.CreateInstance();
- Init(_settings);
- }
-
- [TearDown]
- public void Dispose()
- {
- UnityEngine.Object.DestroyImmediate(_settings);
- }
- }
-}
diff --git a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta b/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta
deleted file mode 100644
index 297e458..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/Scripts/OutlineSettingsTests.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ee681c20e65b7a34085cd5f07a0c03a5
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef b/Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef
deleted file mode 100644
index f715ffe..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "UnityFx.Outline.Editor.Tests",
- "references": [
- "UnityFx.Outline",
- "UnityFx.Outline.Editor"
- ],
- "optionalUnityReferences": [
- "TestAssemblies"
- ],
- "includePlatforms": [
- "Editor"
- ],
- "excludePlatforms": [],
- "allowUnsafeCode": false,
- "overrideReferences": false,
- "precompiledReferences": [],
- "autoReferenced": true,
- "defineConstraints": []
-}
\ No newline at end of file
diff --git a/Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef.meta b/Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef.meta
deleted file mode 100644
index 5b4009a..0000000
--- a/Packages/UnityFx.Outline/Tests/Editor/UnityFx.Outline.Editor.Tests.asmdef.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 10ef01f813866564b87fc5ff13123c77
-AssemblyDefinitionImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Packages/UnityFx.Outline/package.json b/Packages/UnityFx.Outline/package.json
deleted file mode 100644
index 0dfd31d..0000000
--- a/Packages/UnityFx.Outline/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "com.unityfx.outline",
- "version": "0.8.0",
- "displayName": "Screen-space outline",
- "description": "Configurable per-object and per-camera outlines. Both solid and blurred outline modes are supported (Gauss blur). The outlines can be easily customized either through scripts or with Unity editor (both in edit-time or runtime).",
- "unity": "2017.2",
- "keywords": [
- "UnityFx",
- "UnityFx.Outline",
- "outline",
- "post-effect"
- ],
- "category": "UnityFx",
- "author": {
- "name": "Arvtesh",
- "email": "arvtesh@gmail.com"
- },
- "license": "MIT",
- "homepage": "https://github.com/Arvtesh/UnityFx.Outline",
- "repository": {
- "type": "git",
- "url": "https://github.com/Arvtesh/UnityFx.Outline.git"
- },
- "bugs": {
- "url": "https://github.com/Arvtesh/UnityFx.Outline/issues"
- }
-}
diff --git a/Packages/UnityFx.Outline/package.json.meta b/Packages/UnityFx.Outline/package.json.meta
deleted file mode 100644
index d824967..0000000
--- a/Packages/UnityFx.Outline/package.json.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 411b5b9873de2d244ac737335a5117d6
-timeCreated: 1566126977
-licenseType: Free
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
From 24bf7b73415aba9562943f4dc348f36edde0b1db Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Thu, 2 Apr 2020 15:42:47 +0300
Subject: [PATCH 33/39] Updated publish scripts
---
.github/workflows/npmpublish.yml | 6 +++---
NpmPublish.bat | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml
index b31fac2..a5a13f5 100644
--- a/.github/workflows/npmpublish.yml
+++ b/.github/workflows/npmpublish.yml
@@ -15,8 +15,8 @@ jobs:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: |
- npm publish Packages/UnityFx.Outline
- npm publish Packages/UnityFx.Outline.PostProcessing
- npm publish Packages/UnityFx.Outline.HDRP
+ npm publish Outline.Core/Packages/UnityFx.Outline
+ npm publish Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing
+ npm publish Outline.HDRP/Packages/UnityFx.Outline.HDRP
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
diff --git a/NpmPublish.bat b/NpmPublish.bat
index 5ac393f..0fd89a5 100644
--- a/NpmPublish.bat
+++ b/NpmPublish.bat
@@ -1,2 +1,3 @@
-npm publish Packages\UnityFx.Outline
-npm publish Packages\UnityFx.Outline.PostProcessing
+npm publish Outline.Core\Packages\UnityFx.Outline
+npm publish Outline.PostProcessing\Packages\UnityFx.Outline.PostProcessing
+npm publish Outline.HDRP\Packages\UnityFx.Outline.HDRP
From caa3ef67c4b8894bc1101b3ac91f99cd75f5ee4a Mon Sep 17 00:00:00 2001
From: Alexander Bogarsukov
Date: Fri, 3 Apr 2020 12:23:43 +0300
Subject: [PATCH 34/39] Removed ProjectSettings folder from .gitignore
---
.gitignore | 3 -
.../ProjectSettings/AudioManager.asset | 19 +
.../ProjectSettings/ClusterInputManager.asset | 6 +
.../ProjectSettings/DynamicsManager.asset | 33 +
.../ProjectSettings/EditorBuildSettings.asset | 8 +
.../ProjectSettings/EditorSettings.asset | 23 +
.../ProjectSettings/GraphicsSettings.asset | 63 ++
.../ProjectSettings/InputManager.asset | 295 +++++++++
.../ProjectSettings/NavMeshAreas.asset | 91 +++
.../ProjectSettings/Physics2DSettings.asset | 56 ++
.../ProjectSettings/PresetManager.asset | 6 +
.../ProjectSettings/ProjectSettings.asset | 598 +++++++++++++++++
.../ProjectSettings/ProjectVersion.txt | 1 +
.../ProjectSettings/QualitySettings.asset | 229 +++++++
Outline.Core/ProjectSettings/TagManager.asset | 43 ++
.../ProjectSettings/TimeManager.asset | 9 +
.../UnityConnectSettings.asset | 34 +
Outline.Core/ProjectSettings/VFXManager.asset | 11 +
.../ProjectSettings/AudioManager.asset | 19 +
.../ProjectSettings/ClusterInputManager.asset | 6 +
.../ProjectSettings/DynamicsManager.asset | 36 ++
.../ProjectSettings/EditorBuildSettings.asset | 8 +
.../ProjectSettings/EditorSettings.asset | 35 +
.../ProjectSettings/GraphicsSettings.asset | 64 ++
.../ProjectSettings/HDRPProjectSettings.asset | 21 +
.../ProjectSettings/InputManager.asset | 487 ++++++++++++++
.../ProjectSettings/NavMeshAreas.asset | 91 +++
.../ProjectSettings/Physics2DSettings.asset | 56 ++
.../ProjectSettings/PresetManager.asset | 7 +
.../ProjectSettings/ProjectSettings.asset | 610 ++++++++++++++++++
.../ProjectSettings/ProjectVersion.txt | 2 +
.../ProjectSettings/QualitySettings.asset | 236 +++++++
Outline.HDRP/ProjectSettings/TagManager.asset | 43 ++
.../ProjectSettings/TimeManager.asset | 9 +
.../UnityConnectSettings.asset | 34 +
Outline.HDRP/ProjectSettings/VFXManager.asset | 12 +
Outline.HDRP/ProjectSettings/XRSettings.asset | 10 +
.../ProjectSettings/AudioManager.asset | Bin 0 -> 4148 bytes
.../ProjectSettings/ClusterInputManager.asset | Bin 0 -> 4104 bytes
.../ProjectSettings/DynamicsManager.asset | Bin 0 -> 4338 bytes
.../ProjectSettings/EditorBuildSettings.asset | Bin 0 -> 4108 bytes
.../ProjectSettings/EditorSettings.asset | Bin 0 -> 4228 bytes
.../ProjectSettings/InputManager.asset | Bin 0 -> 5520 bytes
.../ProjectSettings/NavMeshAreas.asset | Bin 0 -> 4464 bytes
.../ProjectSettings/Physics2DSettings.asset | Bin 0 -> 4448 bytes
.../ProjectSettings/PresetManager.asset | Bin 0 -> 4104 bytes
.../ProjectSettings/ProjectSettings.asset | 607 +++++++++++++++++
.../ProjectSettings/ProjectVersion.txt | 1 +
.../ProjectSettings/QualitySettings.asset | Bin 0 -> 5100 bytes
.../ProjectSettings/TagManager.asset | Bin 0 -> 4308 bytes
.../ProjectSettings/TimeManager.asset | Bin 0 -> 4116 bytes
.../UnityConnectSettings.asset | Bin 0 -> 4328 bytes
.../ProjectSettings/VFXManager.asset | Bin 0 -> 4148 bytes
.../ProjectSettings/graphicssettings.asset | Bin 0 -> 4467 bytes
54 files changed, 3919 insertions(+), 3 deletions(-)
create mode 100644 Outline.Core/ProjectSettings/AudioManager.asset
create mode 100644 Outline.Core/ProjectSettings/ClusterInputManager.asset
create mode 100644 Outline.Core/ProjectSettings/DynamicsManager.asset
create mode 100644 Outline.Core/ProjectSettings/EditorBuildSettings.asset
create mode 100644 Outline.Core/ProjectSettings/EditorSettings.asset
create mode 100644 Outline.Core/ProjectSettings/GraphicsSettings.asset
create mode 100644 Outline.Core/ProjectSettings/InputManager.asset
create mode 100644 Outline.Core/ProjectSettings/NavMeshAreas.asset
create mode 100644 Outline.Core/ProjectSettings/Physics2DSettings.asset
create mode 100644 Outline.Core/ProjectSettings/PresetManager.asset
create mode 100644 Outline.Core/ProjectSettings/ProjectSettings.asset
create mode 100644 Outline.Core/ProjectSettings/ProjectVersion.txt
create mode 100644 Outline.Core/ProjectSettings/QualitySettings.asset
create mode 100644 Outline.Core/ProjectSettings/TagManager.asset
create mode 100644 Outline.Core/ProjectSettings/TimeManager.asset
create mode 100644 Outline.Core/ProjectSettings/UnityConnectSettings.asset
create mode 100644 Outline.Core/ProjectSettings/VFXManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/AudioManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/ClusterInputManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/DynamicsManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/EditorBuildSettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/EditorSettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/GraphicsSettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/HDRPProjectSettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/InputManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/NavMeshAreas.asset
create mode 100644 Outline.HDRP/ProjectSettings/Physics2DSettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/PresetManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/ProjectSettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/ProjectVersion.txt
create mode 100644 Outline.HDRP/ProjectSettings/QualitySettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/TagManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/TimeManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/UnityConnectSettings.asset
create mode 100644 Outline.HDRP/ProjectSettings/VFXManager.asset
create mode 100644 Outline.HDRP/ProjectSettings/XRSettings.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/AudioManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/ClusterInputManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/DynamicsManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/EditorBuildSettings.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/EditorSettings.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/InputManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/NavMeshAreas.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/Physics2DSettings.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/PresetManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/ProjectSettings.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/ProjectVersion.txt
create mode 100644 Outline.PostProcessing/ProjectSettings/QualitySettings.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/TagManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/TimeManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/UnityConnectSettings.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/VFXManager.asset
create mode 100644 Outline.PostProcessing/ProjectSettings/graphicssettings.asset
diff --git a/.gitignore b/.gitignore
index 60d4cea..b55632c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,9 +3,6 @@
[Oo]bj/
[Bb]uild/
[Bb]uilds/
-[Pp]roject[Ss]ettings/
-
-Assets/AssetStoreTools*
# Visual Studio cache directory
.vs/
diff --git a/Outline.Core/ProjectSettings/AudioManager.asset b/Outline.Core/ProjectSettings/AudioManager.asset
new file mode 100644
index 0000000..27287fe
--- /dev/null
+++ b/Outline.Core/ProjectSettings/AudioManager.asset
@@ -0,0 +1,19 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!11 &1
+AudioManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Volume: 1
+ Rolloff Scale: 1
+ Doppler Factor: 1
+ Default Speaker Mode: 2
+ m_SampleRate: 0
+ m_DSPBufferSize: 1024
+ m_VirtualVoiceCount: 512
+ m_RealVoiceCount: 32
+ m_SpatializerPlugin:
+ m_AmbisonicDecoderPlugin:
+ m_DisableAudio: 0
+ m_VirtualizeEffects: 1
+ m_RequestedDSPBufferSize: 0
diff --git a/Outline.Core/ProjectSettings/ClusterInputManager.asset b/Outline.Core/ProjectSettings/ClusterInputManager.asset
new file mode 100644
index 0000000..e7886b2
--- /dev/null
+++ b/Outline.Core/ProjectSettings/ClusterInputManager.asset
@@ -0,0 +1,6 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!236 &1
+ClusterInputManager:
+ m_ObjectHideFlags: 0
+ m_Inputs: []
diff --git a/Outline.Core/ProjectSettings/DynamicsManager.asset b/Outline.Core/ProjectSettings/DynamicsManager.asset
new file mode 100644
index 0000000..8db40ea
--- /dev/null
+++ b/Outline.Core/ProjectSettings/DynamicsManager.asset
@@ -0,0 +1,33 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!55 &1
+PhysicsManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 10
+ m_Gravity: {x: 0, y: -9.81, z: 0}
+ m_DefaultMaterial: {fileID: 0}
+ m_BounceThreshold: 2
+ m_SleepThreshold: 0.005
+ m_DefaultContactOffset: 0.01
+ m_DefaultSolverIterations: 6
+ m_DefaultSolverVelocityIterations: 1
+ m_QueriesHitBackfaces: 0
+ m_QueriesHitTriggers: 1
+ m_EnableAdaptiveForce: 0
+ m_ClothInterCollisionDistance: 0
+ m_ClothInterCollisionStiffness: 0
+ m_ContactsGeneration: 1
+ m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ m_AutoSimulation: 1
+ m_AutoSyncTransforms: 0
+ m_ReuseCollisionCallbacks: 0
+ m_ClothInterCollisionSettingsToggle: 0
+ m_ContactPairsMode: 0
+ m_BroadphaseType: 0
+ m_WorldBounds:
+ m_Center: {x: 0, y: 0, z: 0}
+ m_Extent: {x: 250, y: 250, z: 250}
+ m_WorldSubdivisions: 8
+ m_FrictionType: 0
+ m_EnableEnhancedDeterminism: 0
+ m_EnableUnifiedHeightmaps: 1
diff --git a/Outline.Core/ProjectSettings/EditorBuildSettings.asset b/Outline.Core/ProjectSettings/EditorBuildSettings.asset
new file mode 100644
index 0000000..0147887
--- /dev/null
+++ b/Outline.Core/ProjectSettings/EditorBuildSettings.asset
@@ -0,0 +1,8 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1045 &1
+EditorBuildSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Scenes: []
+ m_configObjects: {}
diff --git a/Outline.Core/ProjectSettings/EditorSettings.asset b/Outline.Core/ProjectSettings/EditorSettings.asset
new file mode 100644
index 0000000..fb66ccf
--- /dev/null
+++ b/Outline.Core/ProjectSettings/EditorSettings.asset
@@ -0,0 +1,23 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!159 &1
+EditorSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 7
+ m_ExternalVersionControlSupport: Hidden Meta Files
+ m_SerializationMode: 2
+ m_LineEndingsForNewScripts: 2
+ m_DefaultBehaviorMode: 0
+ m_PrefabRegularEnvironment: {fileID: 0}
+ m_PrefabUIEnvironment: {fileID: 0}
+ m_SpritePackerMode: 0
+ m_SpritePackerPaddingPower: 1
+ m_EtcTextureCompressorBehavior: 1
+ m_EtcTextureFastCompressor: 1
+ m_EtcTextureNormalCompressor: 2
+ m_EtcTextureBestCompressor: 4
+ m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp
+ m_ProjectGenerationRootNamespace:
+ m_CollabEditorSettings:
+ inProgressEnabled: 1
+ m_EnableTextureStreamingInPlayMode: 1
diff --git a/Outline.Core/ProjectSettings/GraphicsSettings.asset b/Outline.Core/ProjectSettings/GraphicsSettings.asset
new file mode 100644
index 0000000..b23b253
--- /dev/null
+++ b/Outline.Core/ProjectSettings/GraphicsSettings.asset
@@ -0,0 +1,63 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!30 &1
+GraphicsSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 12
+ m_Deferred:
+ m_Mode: 1
+ m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
+ m_DeferredReflections:
+ m_Mode: 1
+ m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
+ m_ScreenSpaceShadows:
+ m_Mode: 1
+ m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
+ m_LegacyDeferred:
+ m_Mode: 1
+ m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
+ m_DepthNormals:
+ m_Mode: 1
+ m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
+ m_MotionVectors:
+ m_Mode: 1
+ m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
+ m_LightHalo:
+ m_Mode: 1
+ m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
+ m_LensFlare:
+ m_Mode: 1
+ m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
+ m_AlwaysIncludedShaders:
+ - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
+ m_PreloadedShaders: []
+ m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
+ type: 0}
+ m_CustomRenderPipeline: {fileID: 0}
+ m_TransparencySortMode: 0
+ m_TransparencySortAxis: {x: 0, y: 0, z: 1}
+ m_DefaultRenderingPath: 1
+ m_DefaultMobileRenderingPath: 1
+ m_TierSettings: []
+ m_LightmapStripping: 0
+ m_FogStripping: 0
+ m_InstancingStripping: 0
+ m_LightmapKeepPlain: 1
+ m_LightmapKeepDirCombined: 1
+ m_LightmapKeepDynamicPlain: 1
+ m_LightmapKeepDynamicDirCombined: 1
+ m_LightmapKeepShadowMask: 1
+ m_LightmapKeepSubtractive: 1
+ m_FogKeepLinear: 1
+ m_FogKeepExp: 1
+ m_FogKeepExp2: 1
+ m_AlbedoSwatchInfos: []
+ m_LightsUseLinearIntensity: 0
+ m_LightsUseColorTemperature: 0
+ m_LogWhenShaderIsCompiled: 0
diff --git a/Outline.Core/ProjectSettings/InputManager.asset b/Outline.Core/ProjectSettings/InputManager.asset
new file mode 100644
index 0000000..17c8f53
--- /dev/null
+++ b/Outline.Core/ProjectSettings/InputManager.asset
@@ -0,0 +1,295 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!13 &1
+InputManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Axes:
+ - serializedVersion: 3
+ m_Name: Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: left
+ positiveButton: right
+ altNegativeButton: a
+ altPositiveButton: d
+ gravity: 3
+ dead: 0.001
+ sensitivity: 3
+ snap: 1
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: down
+ positiveButton: up
+ altNegativeButton: s
+ altPositiveButton: w
+ gravity: 3
+ dead: 0.001
+ sensitivity: 3
+ snap: 1
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left ctrl
+ altNegativeButton:
+ altPositiveButton: mouse 0
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left alt
+ altNegativeButton:
+ altPositiveButton: mouse 1
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire3
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left shift
+ altNegativeButton:
+ altPositiveButton: mouse 2
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Jump
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: space
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse X
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse Y
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 1
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse ScrollWheel
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 2
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0.19
+ sensitivity: 1
+ snap: 0
+ invert: 0
+ type: 2
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0.19
+ sensitivity: 1
+ snap: 0
+ invert: 1
+ type: 2
+ axis: 1
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 0
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 1
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire3
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 2
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Jump
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 3
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Submit
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: return
+ altNegativeButton:
+ altPositiveButton: joystick button 0
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Submit
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: enter
+ altNegativeButton:
+ altPositiveButton: space
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Cancel
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: escape
+ altNegativeButton:
+ altPositiveButton: joystick button 1
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
diff --git a/Outline.Core/ProjectSettings/NavMeshAreas.asset b/Outline.Core/ProjectSettings/NavMeshAreas.asset
new file mode 100644
index 0000000..3b0b7c3
--- /dev/null
+++ b/Outline.Core/ProjectSettings/NavMeshAreas.asset
@@ -0,0 +1,91 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!126 &1
+NavMeshProjectSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ areas:
+ - name: Walkable
+ cost: 1
+ - name: Not Walkable
+ cost: 1
+ - name: Jump
+ cost: 2
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ m_LastAgentTypeID: -887442657
+ m_Settings:
+ - serializedVersion: 2
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.75
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ debug:
+ m_Flags: 0
+ m_SettingNames:
+ - Humanoid
diff --git a/Outline.Core/ProjectSettings/Physics2DSettings.asset b/Outline.Core/ProjectSettings/Physics2DSettings.asset
new file mode 100644
index 0000000..6c5cf8a
--- /dev/null
+++ b/Outline.Core/ProjectSettings/Physics2DSettings.asset
@@ -0,0 +1,56 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!19 &1
+Physics2DSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 4
+ m_Gravity: {x: 0, y: -9.81}
+ m_DefaultMaterial: {fileID: 0}
+ m_VelocityIterations: 8
+ m_PositionIterations: 3
+ m_VelocityThreshold: 1
+ m_MaxLinearCorrection: 0.2
+ m_MaxAngularCorrection: 8
+ m_MaxTranslationSpeed: 100
+ m_MaxRotationSpeed: 360
+ m_BaumgarteScale: 0.2
+ m_BaumgarteTimeOfImpactScale: 0.75
+ m_TimeToSleep: 0.5
+ m_LinearSleepTolerance: 0.01
+ m_AngularSleepTolerance: 2
+ m_DefaultContactOffset: 0.01
+ m_JobOptions:
+ serializedVersion: 2
+ useMultithreading: 0
+ useConsistencySorting: 0
+ m_InterpolationPosesPerJob: 100
+ m_NewContactsPerJob: 30
+ m_CollideContactsPerJob: 100
+ m_ClearFlagsPerJob: 200
+ m_ClearBodyForcesPerJob: 200
+ m_SyncDiscreteFixturesPerJob: 50
+ m_SyncContinuousFixturesPerJob: 50
+ m_FindNearestContactsPerJob: 100
+ m_UpdateTriggerContactsPerJob: 100
+ m_IslandSolverCostThreshold: 100
+ m_IslandSolverBodyCostScale: 1
+ m_IslandSolverContactCostScale: 10
+ m_IslandSolverJointCostScale: 10
+ m_IslandSolverBodiesPerJob: 50
+ m_IslandSolverContactsPerJob: 50
+ m_AutoSimulation: 1
+ m_QueriesHitTriggers: 1
+ m_QueriesStartInColliders: 1
+ m_CallbacksOnDisable: 1
+ m_ReuseCollisionCallbacks: 0
+ m_AutoSyncTransforms: 0
+ m_AlwaysShowColliders: 0
+ m_ShowColliderSleep: 1
+ m_ShowColliderContacts: 0
+ m_ShowColliderAABB: 0
+ m_ContactArrowScale: 0.2
+ m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
+ m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
+ m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
+ m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
+ m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
diff --git a/Outline.Core/ProjectSettings/PresetManager.asset b/Outline.Core/ProjectSettings/PresetManager.asset
new file mode 100644
index 0000000..636a595
--- /dev/null
+++ b/Outline.Core/ProjectSettings/PresetManager.asset
@@ -0,0 +1,6 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1386491679 &1
+PresetManager:
+ m_ObjectHideFlags: 0
+ m_DefaultList: []
diff --git a/Outline.Core/ProjectSettings/ProjectSettings.asset b/Outline.Core/ProjectSettings/ProjectSettings.asset
new file mode 100644
index 0000000..f23af1f
--- /dev/null
+++ b/Outline.Core/ProjectSettings/ProjectSettings.asset
@@ -0,0 +1,598 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!129 &1
+PlayerSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 18
+ productGUID: b364a1e52fff61f4dba1069ff72e90f9
+ AndroidProfiler: 0
+ AndroidFilterTouchesWhenObscured: 0
+ AndroidEnableSustainedPerformanceMode: 0
+ defaultScreenOrientation: 4
+ targetDevice: 2
+ useOnDemandResources: 0
+ accelerometerFrequency: 60
+ companyName: DefaultCompany
+ productName: Outline.Core
+ defaultCursor: {fileID: 0}
+ cursorHotspot: {x: 0, y: 0}
+ m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
+ m_ShowUnitySplashScreen: 1
+ m_ShowUnitySplashLogo: 1
+ m_SplashScreenOverlayOpacity: 1
+ m_SplashScreenAnimation: 1
+ m_SplashScreenLogoStyle: 1
+ m_SplashScreenDrawMode: 0
+ m_SplashScreenBackgroundAnimationZoom: 1
+ m_SplashScreenLogoAnimationZoom: 1
+ m_SplashScreenBackgroundLandscapeAspect: 1
+ m_SplashScreenBackgroundPortraitAspect: 1
+ m_SplashScreenBackgroundLandscapeUvs:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ m_SplashScreenBackgroundPortraitUvs:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ m_SplashScreenLogos: []
+ m_VirtualRealitySplashScreen: {fileID: 0}
+ m_HolographicTrackingLossScreen: {fileID: 0}
+ defaultScreenWidth: 1024
+ defaultScreenHeight: 768
+ defaultScreenWidthWeb: 960
+ defaultScreenHeightWeb: 600
+ m_StereoRenderingPath: 0
+ m_ActiveColorSpace: 0
+ m_MTRendering: 1
+ m_StackTraceTypes: 010000000100000001000000010000000100000001000000
+ iosShowActivityIndicatorOnLoading: -1
+ androidShowActivityIndicatorOnLoading: -1
+ displayResolutionDialog: 1
+ iosUseCustomAppBackgroundBehavior: 0
+ iosAllowHTTPDownload: 1
+ allowedAutorotateToPortrait: 1
+ allowedAutorotateToPortraitUpsideDown: 1
+ allowedAutorotateToLandscapeRight: 1
+ allowedAutorotateToLandscapeLeft: 1
+ useOSAutorotation: 1
+ use32BitDisplayBuffer: 1
+ preserveFramebufferAlpha: 0
+ disableDepthAndStencilBuffers: 0
+ androidStartInFullscreen: 1
+ androidRenderOutsideSafeArea: 0
+ androidBlitType: 0
+ defaultIsNativeResolution: 1
+ macRetinaSupport: 1
+ runInBackground: 0
+ captureSingleScreen: 0
+ muteOtherAudioSources: 0
+ Prepare IOS For Recording: 0
+ Force IOS Speakers When Recording: 0
+ deferSystemGesturesMode: 0
+ hideHomeButton: 0
+ submitAnalytics: 1
+ usePlayerLog: 1
+ bakeCollisionMeshes: 0
+ forceSingleInstance: 0
+ resizableWindow: 0
+ useMacAppStoreValidation: 0
+ macAppStoreCategory: public.app-category.games
+ gpuSkinning: 0
+ graphicsJobs: 0
+ xboxPIXTextureCapture: 0
+ xboxEnableAvatar: 0
+ xboxEnableKinect: 0
+ xboxEnableKinectAutoTracking: 0
+ xboxEnableFitness: 0
+ visibleInBackground: 1
+ allowFullscreenSwitch: 1
+ graphicsJobMode: 0
+ fullscreenMode: 1
+ xboxSpeechDB: 0
+ xboxEnableHeadOrientation: 0
+ xboxEnableGuest: 0
+ xboxEnablePIXSampling: 0
+ metalFramebufferOnly: 0
+ xboxOneResolution: 0
+ xboxOneSResolution: 0
+ xboxOneXResolution: 3
+ xboxOneMonoLoggingLevel: 0
+ xboxOneLoggingLevel: 1
+ xboxOneDisableEsram: 0
+ xboxOnePresentImmediateThreshold: 0
+ switchQueueCommandMemory: 1048576
+ switchQueueControlMemory: 16384
+ switchQueueComputeMemory: 262144
+ switchNVNShaderPoolsGranularity: 33554432
+ switchNVNDefaultPoolsGranularity: 16777216
+ switchNVNOtherPoolsGranularity: 16777216
+ vulkanEnableSetSRGBWrite: 0
+ m_SupportedAspectRatios:
+ 4:3: 1
+ 5:4: 1
+ 16:10: 1
+ 16:9: 1
+ Others: 1
+ bundleVersion: 1.0
+ preloadedAssets: []
+ metroInputSource: 0
+ wsaTransparentSwapchain: 0
+ m_HolographicPauseOnTrackingLoss: 1
+ xboxOneDisableKinectGpuReservation: 0
+ xboxOneEnable7thCore: 1
+ isWsaHolographicRemotingEnabled: 0
+ vrSettings:
+ cardboard:
+ depthFormat: 0
+ enableTransitionView: 0
+ daydream:
+ depthFormat: 0
+ useSustainedPerformanceMode: 0
+ enableVideoLayer: 0
+ useProtectedVideoMemory: 0
+ minimumSupportedHeadTracking: 0
+ maximumSupportedHeadTracking: 1
+ hololens:
+ depthFormat: 1
+ depthBufferSharingEnabled: 1
+ oculus:
+ sharedDepthBuffer: 1
+ dashSupport: 1
+ lowOverheadMode: 0
+ protectedContext: 0
+ v2Signing: 0
+ enable360StereoCapture: 0
+ protectGraphicsMemory: 0
+ enableFrameTimingStats: 0
+ useHDRDisplay: 0
+ m_ColorGamuts: 00000000
+ targetPixelDensity: 30
+ resolutionScalingMode: 0
+ androidSupportedAspectRatio: 1
+ androidMaxAspectRatio: 2.1
+ applicationIdentifier: {}
+ buildNumber: {}
+ AndroidBundleVersionCode: 1
+ AndroidMinSdkVersion: 16
+ AndroidTargetSdkVersion: 0
+ AndroidPreferredInstallLocation: 1
+ aotOptions:
+ stripEngineCode: 1
+ iPhoneStrippingLevel: 0
+ iPhoneScriptCallOptimization: 0
+ ForceInternetPermission: 0
+ ForceSDCardPermission: 0
+ CreateWallpaper: 0
+ APKExpansionFiles: 0
+ keepLoadedShadersAlive: 0
+ StripUnusedMeshComponents: 0
+ VertexChannelCompressionMask: 4054
+ iPhoneSdkVersion: 988
+ iOSTargetOSVersionString: 9.0
+ tvOSSdkVersion: 0
+ tvOSRequireExtendedGameController: 0
+ tvOSTargetOSVersionString: 9.0
+ uIPrerenderedIcon: 0
+ uIRequiresPersistentWiFi: 0
+ uIRequiresFullScreen: 1
+ uIStatusBarHidden: 1
+ uIExitOnSuspend: 0
+ uIStatusBarStyle: 0
+ iPhoneSplashScreen: {fileID: 0}
+ iPhoneHighResSplashScreen: {fileID: 0}
+ iPhoneTallHighResSplashScreen: {fileID: 0}
+ iPhone47inSplashScreen: {fileID: 0}
+ iPhone55inPortraitSplashScreen: {fileID: 0}
+ iPhone55inLandscapeSplashScreen: {fileID: 0}
+ iPhone58inPortraitSplashScreen: {fileID: 0}
+ iPhone58inLandscapeSplashScreen: {fileID: 0}
+ iPadPortraitSplashScreen: {fileID: 0}
+ iPadHighResPortraitSplashScreen: {fileID: 0}
+ iPadLandscapeSplashScreen: {fileID: 0}
+ iPadHighResLandscapeSplashScreen: {fileID: 0}
+ appleTVSplashScreen: {fileID: 0}
+ appleTVSplashScreen2x: {fileID: 0}
+ tvOSSmallIconLayers: []
+ tvOSSmallIconLayers2x: []
+ tvOSLargeIconLayers: []
+ tvOSLargeIconLayers2x: []
+ tvOSTopShelfImageLayers: []
+ tvOSTopShelfImageLayers2x: []
+ tvOSTopShelfImageWideLayers: []
+ tvOSTopShelfImageWideLayers2x: []
+ iOSLaunchScreenType: 0
+ iOSLaunchScreenPortrait: {fileID: 0}
+ iOSLaunchScreenLandscape: {fileID: 0}
+ iOSLaunchScreenBackgroundColor:
+ serializedVersion: 2
+ rgba: 0
+ iOSLaunchScreenFillPct: 100
+ iOSLaunchScreenSize: 100
+ iOSLaunchScreenCustomXibPath:
+ iOSLaunchScreeniPadType: 0
+ iOSLaunchScreeniPadImage: {fileID: 0}
+ iOSLaunchScreeniPadBackgroundColor:
+ serializedVersion: 2
+ rgba: 0
+ iOSLaunchScreeniPadFillPct: 100
+ iOSLaunchScreeniPadSize: 100
+ iOSLaunchScreeniPadCustomXibPath:
+ iOSUseLaunchScreenStoryboard: 0
+ iOSLaunchScreenCustomStoryboardPath:
+ iOSDeviceRequirements: []
+ iOSURLSchemes: []
+ iOSBackgroundModes: 0
+ iOSMetalForceHardShadows: 0
+ metalEditorSupport: 1
+ metalAPIValidation: 1
+ iOSRenderExtraFrameOnPause: 0
+ appleDeveloperTeamID:
+ iOSManualSigningProvisioningProfileID:
+ tvOSManualSigningProvisioningProfileID:
+ iOSManualSigningProvisioningProfileType: 0
+ tvOSManualSigningProvisioningProfileType: 0
+ appleEnableAutomaticSigning: 0
+ iOSRequireARKit: 0
+ iOSAutomaticallyDetectAndAddCapabilities: 1
+ appleEnableProMotion: 0
+ clonedFromGUID: 00000000000000000000000000000000
+ templatePackageId:
+ templateDefaultScene:
+ AndroidTargetArchitectures: 1
+ AndroidSplashScreenScale: 0
+ androidSplashScreen: {fileID: 0}
+ AndroidKeystoreName:
+ AndroidKeyaliasName:
+ AndroidBuildApkPerCpuArchitecture: 0
+ AndroidTVCompatibility: 0
+ AndroidIsGame: 1
+ AndroidEnableTango: 0
+ androidEnableBanner: 1
+ androidUseLowAccuracyLocation: 0
+ m_AndroidBanners:
+ - width: 320
+ height: 180
+ banner: {fileID: 0}
+ androidGamepadSupportLevel: 0
+ resolutionDialogBanner: {fileID: 0}
+ m_BuildTargetIcons: []
+ m_BuildTargetPlatformIcons: []
+ m_BuildTargetBatching: []
+ m_BuildTargetGraphicsAPIs: []
+ m_BuildTargetVRSettings: []
+ m_BuildTargetEnableVuforiaSettings: []
+ openGLRequireES31: 0
+ openGLRequireES31AEP: 0
+ m_TemplateCustomTags: {}
+ mobileMTRendering:
+ Android: 1
+ iPhone: 1
+ tvOS: 1
+ m_BuildTargetGroupLightmapEncodingQuality: []
+ m_BuildTargetGroupLightmapSettings: []
+ playModeTestRunnerEnabled: 0
+ runPlayModeTestAsEditModeTest: 0
+ actionOnDotNetUnhandledException: 1
+ enableInternalProfiler: 0
+ logObjCUncaughtExceptions: 1
+ enableCrashReportAPI: 0
+ cameraUsageDescription:
+ locationUsageDescription:
+ microphoneUsageDescription:
+ switchNetLibKey:
+ switchSocketMemoryPoolSize: 6144
+ switchSocketAllocatorPoolSize: 128
+ switchSocketConcurrencyLimit: 14
+ switchScreenResolutionBehavior: 2
+ switchUseCPUProfiler: 0
+ switchApplicationID: 0x01004b9000490000
+ switchNSODependencies:
+ switchTitleNames_0:
+ switchTitleNames_1:
+ switchTitleNames_2:
+ switchTitleNames_3:
+ switchTitleNames_4:
+ switchTitleNames_5:
+ switchTitleNames_6:
+ switchTitleNames_7:
+ switchTitleNames_8:
+ switchTitleNames_9:
+ switchTitleNames_10:
+ switchTitleNames_11:
+ switchTitleNames_12:
+ switchTitleNames_13:
+ switchTitleNames_14:
+ switchPublisherNames_0:
+ switchPublisherNames_1:
+ switchPublisherNames_2:
+ switchPublisherNames_3:
+ switchPublisherNames_4:
+ switchPublisherNames_5:
+ switchPublisherNames_6:
+ switchPublisherNames_7:
+ switchPublisherNames_8:
+ switchPublisherNames_9:
+ switchPublisherNames_10:
+ switchPublisherNames_11:
+ switchPublisherNames_12:
+ switchPublisherNames_13:
+ switchPublisherNames_14:
+ switchIcons_0: {fileID: 0}
+ switchIcons_1: {fileID: 0}
+ switchIcons_2: {fileID: 0}
+ switchIcons_3: {fileID: 0}
+ switchIcons_4: {fileID: 0}
+ switchIcons_5: {fileID: 0}
+ switchIcons_6: {fileID: 0}
+ switchIcons_7: {fileID: 0}
+ switchIcons_8: {fileID: 0}
+ switchIcons_9: {fileID: 0}
+ switchIcons_10: {fileID: 0}
+ switchIcons_11: {fileID: 0}
+ switchIcons_12: {fileID: 0}
+ switchIcons_13: {fileID: 0}
+ switchIcons_14: {fileID: 0}
+ switchSmallIcons_0: {fileID: 0}
+ switchSmallIcons_1: {fileID: 0}
+ switchSmallIcons_2: {fileID: 0}
+ switchSmallIcons_3: {fileID: 0}
+ switchSmallIcons_4: {fileID: 0}
+ switchSmallIcons_5: {fileID: 0}
+ switchSmallIcons_6: {fileID: 0}
+ switchSmallIcons_7: {fileID: 0}
+ switchSmallIcons_8: {fileID: 0}
+ switchSmallIcons_9: {fileID: 0}
+ switchSmallIcons_10: {fileID: 0}
+ switchSmallIcons_11: {fileID: 0}
+ switchSmallIcons_12: {fileID: 0}
+ switchSmallIcons_13: {fileID: 0}
+ switchSmallIcons_14: {fileID: 0}
+ switchManualHTML:
+ switchAccessibleURLs:
+ switchLegalInformation:
+ switchMainThreadStackSize: 1048576
+ switchPresenceGroupId:
+ switchLogoHandling: 0
+ switchReleaseVersion: 0
+ switchDisplayVersion: 1.0.0
+ switchStartupUserAccount: 0
+ switchTouchScreenUsage: 0
+ switchSupportedLanguagesMask: 0
+ switchLogoType: 0
+ switchApplicationErrorCodeCategory:
+ switchUserAccountSaveDataSize: 0
+ switchUserAccountSaveDataJournalSize: 0
+ switchApplicationAttribute: 0
+ switchCardSpecSize: -1
+ switchCardSpecClock: -1
+ switchRatingsMask: 0
+ switchRatingsInt_0: 0
+ switchRatingsInt_1: 0
+ switchRatingsInt_2: 0
+ switchRatingsInt_3: 0
+ switchRatingsInt_4: 0
+ switchRatingsInt_5: 0
+ switchRatingsInt_6: 0
+ switchRatingsInt_7: 0
+ switchRatingsInt_8: 0
+ switchRatingsInt_9: 0
+ switchRatingsInt_10: 0
+ switchRatingsInt_11: 0
+ switchLocalCommunicationIds_0:
+ switchLocalCommunicationIds_1:
+ switchLocalCommunicationIds_2:
+ switchLocalCommunicationIds_3:
+ switchLocalCommunicationIds_4:
+ switchLocalCommunicationIds_5:
+ switchLocalCommunicationIds_6:
+ switchLocalCommunicationIds_7:
+ switchParentalControl: 0
+ switchAllowsScreenshot: 1
+ switchAllowsVideoCapturing: 1
+ switchAllowsRuntimeAddOnContentInstall: 0
+ switchDataLossConfirmation: 0
+ switchUserAccountLockEnabled: 0
+ switchSystemResourceMemory: 16777216
+ switchSupportedNpadStyles: 6
+ switchNativeFsCacheSize: 32
+ switchIsHoldTypeHorizontal: 0
+ switchSupportedNpadCount: 8
+ switchSocketConfigEnabled: 0
+ switchTcpInitialSendBufferSize: 32
+ switchTcpInitialReceiveBufferSize: 64
+ switchTcpAutoSendBufferSizeMax: 256
+ switchTcpAutoReceiveBufferSizeMax: 256
+ switchUdpSendBufferSize: 9
+ switchUdpReceiveBufferSize: 42
+ switchSocketBufferEfficiency: 4
+ switchSocketInitializeEnabled: 1
+ switchNetworkInterfaceManagerInitializeEnabled: 1
+ switchPlayerConnectionEnabled: 1
+ ps4NPAgeRating: 12
+ ps4NPTitleSecret:
+ ps4NPTrophyPackPath:
+ ps4ParentalLevel: 11
+ ps4ContentID: ED1633-NPXX51362_00-0000000000000000
+ ps4Category: 0
+ ps4MasterVersion: 01.00
+ ps4AppVersion: 01.00
+ ps4AppType: 0
+ ps4ParamSfxPath:
+ ps4VideoOutPixelFormat: 0
+ ps4VideoOutInitialWidth: 1920
+ ps4VideoOutBaseModeInitialWidth: 1920
+ ps4VideoOutReprojectionRate: 60
+ ps4PronunciationXMLPath:
+ ps4PronunciationSIGPath:
+ ps4BackgroundImagePath:
+ ps4StartupImagePath:
+ ps4StartupImagesFolder:
+ ps4IconImagesFolder:
+ ps4SaveDataImagePath:
+ ps4SdkOverride:
+ ps4BGMPath:
+ ps4ShareFilePath:
+ ps4ShareOverlayImagePath:
+ ps4PrivacyGuardImagePath:
+ ps4NPtitleDatPath:
+ ps4RemotePlayKeyAssignment: -1
+ ps4RemotePlayKeyMappingDir:
+ ps4PlayTogetherPlayerCount: 0
+ ps4EnterButtonAssignment: 2
+ ps4ApplicationParam1: 0
+ ps4ApplicationParam2: 0
+ ps4ApplicationParam3: 0
+ ps4ApplicationParam4: 0
+ ps4DownloadDataSize: 0
+ ps4GarlicHeapSize: 2048
+ ps4ProGarlicHeapSize: 2560
+ ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
+ ps4pnSessions: 1
+ ps4pnPresence: 1
+ ps4pnFriends: 1
+ ps4pnGameCustomData: 1
+ playerPrefsSupport: 0
+ enableApplicationExit: 0
+ resetTempFolder: 1
+ restrictedAudioUsageRights: 0
+ ps4UseResolutionFallback: 0
+ ps4ReprojectionSupport: 0
+ ps4UseAudio3dBackend: 0
+ ps4SocialScreenEnabled: 0
+ ps4ScriptOptimizationLevel: 2
+ ps4Audio3dVirtualSpeakerCount: 14
+ ps4attribCpuUsage: 0
+ ps4PatchPkgPath:
+ ps4PatchLatestPkgPath:
+ ps4PatchChangeinfoPath:
+ ps4PatchDayOne: 0
+ ps4attribUserManagement: 0
+ ps4attribMoveSupport: 0
+ ps4attrib3DSupport: 0
+ ps4attribShareSupport: 0
+ ps4attribExclusiveVR: 0
+ ps4disableAutoHideSplash: 0
+ ps4videoRecordingFeaturesUsed: 0
+ ps4contentSearchFeaturesUsed: 0
+ ps4attribEyeToEyeDistanceSettingVR: 0
+ ps4IncludedModules: []
+ monoEnv:
+ splashScreenBackgroundSourceLandscape: {fileID: 0}
+ splashScreenBackgroundSourcePortrait: {fileID: 0}
+ spritePackerPolicy:
+ webGLMemorySize: 256
+ webGLExceptionSupport: 1
+ webGLNameFilesAsHashes: 0
+ webGLDataCaching: 1
+ webGLDebugSymbols: 0
+ webGLEmscriptenArgs:
+ webGLModulesDirectory:
+ webGLTemplate: APPLICATION:Default
+ webGLAnalyzeBuildSize: 0
+ webGLUseEmbeddedResources: 0
+ webGLCompressionFormat: 1
+ webGLLinkerTarget: 1
+ webGLThreadsSupport: 0
+ scriptingDefineSymbols: {}
+ platformArchitecture: {}
+ scriptingBackend: {}
+ il2cppCompilerConfiguration: {}
+ managedStrippingLevel: {}
+ incrementalIl2cppBuild: {}
+ allowUnsafeCode: 0
+ additionalIl2CppArgs:
+ scriptingRuntimeVersion: 1
+ apiCompatibilityLevelPerPlatform: {}
+ m_RenderingPath: 1
+ m_MobileRenderingPath: 1
+ metroPackageName: Outline.Core
+ metroPackageVersion:
+ metroCertificatePath:
+ metroCertificatePassword:
+ metroCertificateSubject:
+ metroCertificateIssuer:
+ metroCertificateNotAfter: 0000000000000000
+ metroApplicationDescription: Outline.Core
+ wsaImages: {}
+ metroTileShortName:
+ metroTileShowName: 0
+ metroMediumTileShowName: 0
+ metroLargeTileShowName: 0
+ metroWideTileShowName: 0
+ metroSupportStreamingInstall: 0
+ metroLastRequiredScene: 0
+ metroDefaultTileSize: 1
+ metroTileForegroundText: 2
+ metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
+ metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
+ a: 1}
+ metroSplashScreenUseBackgroundColor: 0
+ platformCapabilities: {}
+ metroTargetDeviceFamilies: {}
+ metroFTAName:
+ metroFTAFileTypes: []
+ metroProtocolName:
+ metroCompilationOverrides: 1
+ XboxOneProductId:
+ XboxOneUpdateKey:
+ XboxOneSandboxId:
+ XboxOneContentId:
+ XboxOneTitleId:
+ XboxOneSCId:
+ XboxOneGameOsOverridePath:
+ XboxOnePackagingOverridePath:
+ XboxOneAppManifestOverridePath:
+ XboxOneVersion: 1.0.0.0
+ XboxOnePackageEncryption: 0
+ XboxOnePackageUpdateGranularity: 2
+ XboxOneDescription:
+ XboxOneLanguage:
+ - enus
+ XboxOneCapability: []
+ XboxOneGameRating: {}
+ XboxOneIsContentPackage: 0
+ XboxOneEnableGPUVariability: 1
+ XboxOneSockets: {}
+ XboxOneSplashScreen: {fileID: 0}
+ XboxOneAllowedProductIds: []
+ XboxOnePersistentLocalStorageSize: 0
+ XboxOneXTitleMemory: 8
+ xboxOneScriptCompiler: 0
+ XboxOneOverrideIdentityName:
+ vrEditorSettings:
+ daydream:
+ daydreamIconForeground: {fileID: 0}
+ daydreamIconBackground: {fileID: 0}
+ cloudServicesEnabled: {}
+ luminIcon:
+ m_Name:
+ m_ModelFolderPath:
+ m_PortalFolderPath:
+ luminCert:
+ m_CertPath:
+ m_PrivateKeyPath:
+ luminIsChannelApp: 0
+ luminVersion:
+ m_VersionCode: 1
+ m_VersionName:
+ facebookSdkVersion:
+ facebookAppId:
+ facebookCookies: 1
+ facebookLogging: 1
+ facebookStatus: 1
+ facebookXfbml: 0
+ facebookFrictionlessRequests: 1
+ apiCompatibilityLevel: 6
+ cloudProjectId:
+ framebufferDepthMemorylessMode: 0
+ projectName:
+ organizationId:
+ cloudEnabled: 0
+ enableNativePlatformBackendsForNewInputSystem: 0
+ disableOldInputManagerSupport: 0
+ legacyClampBlendShapeWeights: 0
diff --git a/Outline.Core/ProjectSettings/ProjectVersion.txt b/Outline.Core/ProjectSettings/ProjectVersion.txt
new file mode 100644
index 0000000..31a1862
--- /dev/null
+++ b/Outline.Core/ProjectSettings/ProjectVersion.txt
@@ -0,0 +1 @@
+m_EditorVersion: 2018.4.11f1
diff --git a/Outline.Core/ProjectSettings/QualitySettings.asset b/Outline.Core/ProjectSettings/QualitySettings.asset
new file mode 100644
index 0000000..92c2a3c
--- /dev/null
+++ b/Outline.Core/ProjectSettings/QualitySettings.asset
@@ -0,0 +1,229 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!47 &1
+QualitySettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 5
+ m_CurrentQuality: 5
+ m_QualitySettings:
+ - serializedVersion: 2
+ name: Very Low
+ pixelLightCount: 0
+ shadows: 0
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 15
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ blendWeights: 1
+ textureQuality: 1
+ anisotropicTextures: 0
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 0
+ lodBias: 0.3
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 4
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Low
+ pixelLightCount: 0
+ shadows: 0
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 20
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ blendWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 0
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 0
+ lodBias: 0.4
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 16
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Medium
+ pixelLightCount: 1
+ shadows: 1
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 20
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ blendWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 1
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 1
+ lodBias: 0.7
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 64
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: High
+ pixelLightCount: 2
+ shadows: 2
+ shadowResolution: 1
+ shadowProjection: 1
+ shadowCascades: 2
+ shadowDistance: 40
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ blendWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 1
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 1
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 256
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Very High
+ pixelLightCount: 3
+ shadows: 2
+ shadowResolution: 2
+ shadowProjection: 1
+ shadowCascades: 2
+ shadowDistance: 70
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ blendWeights: 4
+ textureQuality: 0
+ anisotropicTextures: 2
+ antiAliasing: 2
+ softParticles: 1
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 1.5
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 1024
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Ultra
+ pixelLightCount: 4
+ shadows: 2
+ shadowResolution: 2
+ shadowProjection: 1
+ shadowCascades: 4
+ shadowDistance: 150
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ blendWeights: 4
+ textureQuality: 0
+ anisotropicTextures: 2
+ antiAliasing: 2
+ softParticles: 1
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 2
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 4096
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ excludedTargetPlatforms: []
+ m_PerPlatformDefaultQuality:
+ Android: 2
+ Lumin: 5
+ Nintendo Switch: 5
+ PS4: 5
+ Standalone: 5
+ WebGL: 3
+ Windows Store Apps: 5
+ XboxOne: 5
+ iPhone: 2
+ tvOS: 2
diff --git a/Outline.Core/ProjectSettings/TagManager.asset b/Outline.Core/ProjectSettings/TagManager.asset
new file mode 100644
index 0000000..1c92a78
--- /dev/null
+++ b/Outline.Core/ProjectSettings/TagManager.asset
@@ -0,0 +1,43 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!78 &1
+TagManager:
+ serializedVersion: 2
+ tags: []
+ layers:
+ - Default
+ - TransparentFX
+ - Ignore Raycast
+ -
+ - Water
+ - UI
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ m_SortingLayers:
+ - name: Default
+ uniqueID: 0
+ locked: 0
diff --git a/Outline.Core/ProjectSettings/TimeManager.asset b/Outline.Core/ProjectSettings/TimeManager.asset
new file mode 100644
index 0000000..558a017
--- /dev/null
+++ b/Outline.Core/ProjectSettings/TimeManager.asset
@@ -0,0 +1,9 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!5 &1
+TimeManager:
+ m_ObjectHideFlags: 0
+ Fixed Timestep: 0.02
+ Maximum Allowed Timestep: 0.33333334
+ m_TimeScale: 1
+ Maximum Particle Timestep: 0.03
diff --git a/Outline.Core/ProjectSettings/UnityConnectSettings.asset b/Outline.Core/ProjectSettings/UnityConnectSettings.asset
new file mode 100644
index 0000000..fa0b146
--- /dev/null
+++ b/Outline.Core/ProjectSettings/UnityConnectSettings.asset
@@ -0,0 +1,34 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!310 &1
+UnityConnectSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 1
+ m_Enabled: 0
+ m_TestMode: 0
+ m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
+ m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
+ m_ConfigUrl: https://config.uca.cloud.unity3d.com
+ m_TestInitMode: 0
+ CrashReportingSettings:
+ m_EventUrl: https://perf-events.cloud.unity3d.com
+ m_Enabled: 0
+ m_LogBufferSize: 10
+ m_CaptureEditorExceptions: 1
+ UnityPurchasingSettings:
+ m_Enabled: 0
+ m_TestMode: 0
+ UnityAnalyticsSettings:
+ m_Enabled: 0
+ m_TestMode: 0
+ m_InitializeOnStartup: 1
+ UnityAdsSettings:
+ m_Enabled: 0
+ m_InitializeOnStartup: 1
+ m_TestMode: 0
+ m_IosGameId:
+ m_AndroidGameId:
+ m_GameIds: {}
+ m_GameId:
+ PerformanceReportingSettings:
+ m_Enabled: 0
diff --git a/Outline.Core/ProjectSettings/VFXManager.asset b/Outline.Core/ProjectSettings/VFXManager.asset
new file mode 100644
index 0000000..6e0eaca
--- /dev/null
+++ b/Outline.Core/ProjectSettings/VFXManager.asset
@@ -0,0 +1,11 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!937362698 &1
+VFXManager:
+ m_ObjectHideFlags: 0
+ m_IndirectShader: {fileID: 0}
+ m_CopyBufferShader: {fileID: 0}
+ m_SortShader: {fileID: 0}
+ m_RenderPipeSettingsPath:
+ m_FixedTimeStep: 0.016666668
+ m_MaxDeltaTime: 0.05
diff --git a/Outline.HDRP/ProjectSettings/AudioManager.asset b/Outline.HDRP/ProjectSettings/AudioManager.asset
new file mode 100644
index 0000000..27287fe
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/AudioManager.asset
@@ -0,0 +1,19 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!11 &1
+AudioManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Volume: 1
+ Rolloff Scale: 1
+ Doppler Factor: 1
+ Default Speaker Mode: 2
+ m_SampleRate: 0
+ m_DSPBufferSize: 1024
+ m_VirtualVoiceCount: 512
+ m_RealVoiceCount: 32
+ m_SpatializerPlugin:
+ m_AmbisonicDecoderPlugin:
+ m_DisableAudio: 0
+ m_VirtualizeEffects: 1
+ m_RequestedDSPBufferSize: 0
diff --git a/Outline.HDRP/ProjectSettings/ClusterInputManager.asset b/Outline.HDRP/ProjectSettings/ClusterInputManager.asset
new file mode 100644
index 0000000..e7886b2
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/ClusterInputManager.asset
@@ -0,0 +1,6 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!236 &1
+ClusterInputManager:
+ m_ObjectHideFlags: 0
+ m_Inputs: []
diff --git a/Outline.HDRP/ProjectSettings/DynamicsManager.asset b/Outline.HDRP/ProjectSettings/DynamicsManager.asset
new file mode 100644
index 0000000..1596c42
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/DynamicsManager.asset
@@ -0,0 +1,36 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!55 &1
+PhysicsManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 13
+ m_Gravity: {x: 0, y: -9.81, z: 0}
+ m_DefaultMaterial: {fileID: 0}
+ m_BounceThreshold: 2
+ m_SleepThreshold: 0.005
+ m_DefaultContactOffset: 0.01
+ m_DefaultSolverIterations: 6
+ m_DefaultSolverVelocityIterations: 1
+ m_QueriesHitBackfaces: 0
+ m_QueriesHitTriggers: 1
+ m_EnableAdaptiveForce: 0
+ m_ClothInterCollisionDistance: 0.1
+ m_ClothInterCollisionStiffness: 0.2
+ m_ContactsGeneration: 1
+ m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ m_AutoSimulation: 1
+ m_AutoSyncTransforms: 0
+ m_ReuseCollisionCallbacks: 0
+ m_ClothInterCollisionSettingsToggle: 0
+ m_ClothGravity: {x: 0, y: -9.81, z: 0}
+ m_ContactPairsMode: 0
+ m_BroadphaseType: 0
+ m_WorldBounds:
+ m_Center: {x: 0, y: 0, z: 0}
+ m_Extent: {x: 250, y: 250, z: 250}
+ m_WorldSubdivisions: 8
+ m_FrictionType: 0
+ m_EnableEnhancedDeterminism: 0
+ m_EnableUnifiedHeightmaps: 1
+ m_SolverType: 0
+ m_DefaultMaxAngularSpeed: 50
diff --git a/Outline.HDRP/ProjectSettings/EditorBuildSettings.asset b/Outline.HDRP/ProjectSettings/EditorBuildSettings.asset
new file mode 100644
index 0000000..0147887
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/EditorBuildSettings.asset
@@ -0,0 +1,8 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1045 &1
+EditorBuildSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Scenes: []
+ m_configObjects: {}
diff --git a/Outline.HDRP/ProjectSettings/EditorSettings.asset b/Outline.HDRP/ProjectSettings/EditorSettings.asset
new file mode 100644
index 0000000..c8da44e
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/EditorSettings.asset
@@ -0,0 +1,35 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!159 &1
+EditorSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 9
+ m_ExternalVersionControlSupport: Visible Meta Files
+ m_SerializationMode: 2
+ m_LineEndingsForNewScripts: 2
+ m_DefaultBehaviorMode: 0
+ m_PrefabRegularEnvironment: {fileID: 0}
+ m_PrefabUIEnvironment: {fileID: 0}
+ m_SpritePackerMode: 0
+ m_SpritePackerPaddingPower: 1
+ m_EtcTextureCompressorBehavior: 1
+ m_EtcTextureFastCompressor: 1
+ m_EtcTextureNormalCompressor: 2
+ m_EtcTextureBestCompressor: 4
+ m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp
+ m_ProjectGenerationRootNamespace:
+ m_CollabEditorSettings:
+ inProgressEnabled: 1
+ m_EnableTextureStreamingInEditMode: 1
+ m_EnableTextureStreamingInPlayMode: 1
+ m_AsyncShaderCompilation: 1
+ m_EnterPlayModeOptionsEnabled: 0
+ m_EnterPlayModeOptions: 3
+ m_ShowLightmapResolutionOverlay: 1
+ m_UseLegacyProbeSampleCount: 0
+ m_AssetPipelineMode: 1
+ m_CacheServerMode: 0
+ m_CacheServerEndpoint:
+ m_CacheServerNamespacePrefix: default
+ m_CacheServerEnableDownload: 1
+ m_CacheServerEnableUpload: 1
diff --git a/Outline.HDRP/ProjectSettings/GraphicsSettings.asset b/Outline.HDRP/ProjectSettings/GraphicsSettings.asset
new file mode 100644
index 0000000..35a0fa7
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/GraphicsSettings.asset
@@ -0,0 +1,64 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!30 &1
+GraphicsSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 13
+ m_Deferred:
+ m_Mode: 1
+ m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
+ m_DeferredReflections:
+ m_Mode: 1
+ m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
+ m_ScreenSpaceShadows:
+ m_Mode: 1
+ m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
+ m_LegacyDeferred:
+ m_Mode: 1
+ m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
+ m_DepthNormals:
+ m_Mode: 1
+ m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
+ m_MotionVectors:
+ m_Mode: 1
+ m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
+ m_LightHalo:
+ m_Mode: 1
+ m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
+ m_LensFlare:
+ m_Mode: 1
+ m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
+ m_AlwaysIncludedShaders:
+ - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
+ - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
+ m_PreloadedShaders: []
+ m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
+ type: 0}
+ m_CustomRenderPipeline: {fileID: 0}
+ m_TransparencySortMode: 0
+ m_TransparencySortAxis: {x: 0, y: 0, z: 1}
+ m_DefaultRenderingPath: 1
+ m_DefaultMobileRenderingPath: 1
+ m_TierSettings: []
+ m_LightmapStripping: 0
+ m_FogStripping: 0
+ m_InstancingStripping: 0
+ m_LightmapKeepPlain: 1
+ m_LightmapKeepDirCombined: 1
+ m_LightmapKeepDynamicPlain: 1
+ m_LightmapKeepDynamicDirCombined: 1
+ m_LightmapKeepShadowMask: 1
+ m_LightmapKeepSubtractive: 1
+ m_FogKeepLinear: 1
+ m_FogKeepExp: 1
+ m_FogKeepExp2: 1
+ m_AlbedoSwatchInfos: []
+ m_LightsUseLinearIntensity: 0
+ m_LightsUseColorTemperature: 0
+ m_LogWhenShaderIsCompiled: 0
+ m_AllowEnlightenSupportForUpgradedProject: 0
diff --git a/Outline.HDRP/ProjectSettings/HDRPProjectSettings.asset b/Outline.HDRP/ProjectSettings/HDRPProjectSettings.asset
new file mode 100644
index 0000000..dddb307
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/HDRPProjectSettings.asset
@@ -0,0 +1,21 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &1
+MonoBehaviour:
+ m_ObjectHideFlags: 61
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 63a2978a97e4fc04cb9d905947216f3d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ version: 1
+ m_DefaultScenePrefabSaved: {fileID: 0}
+ m_DefaultDXRScenePrefabSaved: {fileID: 0}
+ m_ProjectSettingFolderPath: HDRPDefaultResources
+ m_WizardPopupAtStart: 0
+ m_WizardActiveTab: 0
+ m_PackageVersionForMaterials: 7.1.8
diff --git a/Outline.HDRP/ProjectSettings/InputManager.asset b/Outline.HDRP/ProjectSettings/InputManager.asset
new file mode 100644
index 0000000..b16147e
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/InputManager.asset
@@ -0,0 +1,487 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!13 &1
+InputManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Axes:
+ - serializedVersion: 3
+ m_Name: Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: left
+ positiveButton: right
+ altNegativeButton: a
+ altPositiveButton: d
+ gravity: 3
+ dead: 0.001
+ sensitivity: 3
+ snap: 1
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: down
+ positiveButton: up
+ altNegativeButton: s
+ altPositiveButton: w
+ gravity: 3
+ dead: 0.001
+ sensitivity: 3
+ snap: 1
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left ctrl
+ altNegativeButton:
+ altPositiveButton: mouse 0
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left alt
+ altNegativeButton:
+ altPositiveButton: mouse 1
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire3
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left shift
+ altNegativeButton:
+ altPositiveButton: mouse 2
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Jump
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: space
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse X
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse Y
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 1
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Mouse ScrollWheel
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0
+ sensitivity: 0.1
+ snap: 0
+ invert: 0
+ type: 1
+ axis: 2
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0.19
+ sensitivity: 1
+ snap: 0
+ invert: 0
+ type: 2
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton:
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 0
+ dead: 0.19
+ sensitivity: 1
+ snap: 0
+ invert: 1
+ type: 2
+ axis: 1
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 0
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 1
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Fire3
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 2
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Jump
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: joystick button 3
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Submit
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: return
+ altNegativeButton:
+ altPositiveButton: joystick button 0
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Submit
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: enter
+ altNegativeButton:
+ altPositiveButton: space
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Cancel
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: escape
+ altNegativeButton:
+ altPositiveButton: joystick button 1
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Enable Debug Button 1
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left ctrl
+ altNegativeButton:
+ altPositiveButton: joystick button 8
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Enable Debug Button 2
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: backspace
+ altNegativeButton:
+ altPositiveButton: joystick button 9
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Reset
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left alt
+ altNegativeButton:
+ altPositiveButton: joystick button 1
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Next
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: page down
+ altNegativeButton:
+ altPositiveButton: joystick button 5
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Previous
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: page up
+ altNegativeButton:
+ altPositiveButton: joystick button 4
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Validate
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: return
+ altNegativeButton:
+ altPositiveButton: joystick button 0
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Persistent
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: right shift
+ altNegativeButton:
+ altPositiveButton: joystick button 2
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Multiplier
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton:
+ positiveButton: left shift
+ altNegativeButton:
+ altPositiveButton: joystick button 3
+ gravity: 0
+ dead: 0
+ sensitivity: 0
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: left
+ positiveButton: right
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: down
+ positiveButton: up
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 0
+ axis: 0
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Vertical
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: down
+ positiveButton: up
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 2
+ axis: 6
+ joyNum: 0
+ - serializedVersion: 3
+ m_Name: Debug Horizontal
+ descriptiveName:
+ descriptiveNegativeName:
+ negativeButton: left
+ positiveButton: right
+ altNegativeButton:
+ altPositiveButton:
+ gravity: 1000
+ dead: 0.001
+ sensitivity: 1000
+ snap: 0
+ invert: 0
+ type: 2
+ axis: 5
+ joyNum: 0
diff --git a/Outline.HDRP/ProjectSettings/NavMeshAreas.asset b/Outline.HDRP/ProjectSettings/NavMeshAreas.asset
new file mode 100644
index 0000000..3b0b7c3
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/NavMeshAreas.asset
@@ -0,0 +1,91 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!126 &1
+NavMeshProjectSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ areas:
+ - name: Walkable
+ cost: 1
+ - name: Not Walkable
+ cost: 1
+ - name: Jump
+ cost: 2
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ - name:
+ cost: 1
+ m_LastAgentTypeID: -887442657
+ m_Settings:
+ - serializedVersion: 2
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.75
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ debug:
+ m_Flags: 0
+ m_SettingNames:
+ - Humanoid
diff --git a/Outline.HDRP/ProjectSettings/Physics2DSettings.asset b/Outline.HDRP/ProjectSettings/Physics2DSettings.asset
new file mode 100644
index 0000000..6c5cf8a
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/Physics2DSettings.asset
@@ -0,0 +1,56 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!19 &1
+Physics2DSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 4
+ m_Gravity: {x: 0, y: -9.81}
+ m_DefaultMaterial: {fileID: 0}
+ m_VelocityIterations: 8
+ m_PositionIterations: 3
+ m_VelocityThreshold: 1
+ m_MaxLinearCorrection: 0.2
+ m_MaxAngularCorrection: 8
+ m_MaxTranslationSpeed: 100
+ m_MaxRotationSpeed: 360
+ m_BaumgarteScale: 0.2
+ m_BaumgarteTimeOfImpactScale: 0.75
+ m_TimeToSleep: 0.5
+ m_LinearSleepTolerance: 0.01
+ m_AngularSleepTolerance: 2
+ m_DefaultContactOffset: 0.01
+ m_JobOptions:
+ serializedVersion: 2
+ useMultithreading: 0
+ useConsistencySorting: 0
+ m_InterpolationPosesPerJob: 100
+ m_NewContactsPerJob: 30
+ m_CollideContactsPerJob: 100
+ m_ClearFlagsPerJob: 200
+ m_ClearBodyForcesPerJob: 200
+ m_SyncDiscreteFixturesPerJob: 50
+ m_SyncContinuousFixturesPerJob: 50
+ m_FindNearestContactsPerJob: 100
+ m_UpdateTriggerContactsPerJob: 100
+ m_IslandSolverCostThreshold: 100
+ m_IslandSolverBodyCostScale: 1
+ m_IslandSolverContactCostScale: 10
+ m_IslandSolverJointCostScale: 10
+ m_IslandSolverBodiesPerJob: 50
+ m_IslandSolverContactsPerJob: 50
+ m_AutoSimulation: 1
+ m_QueriesHitTriggers: 1
+ m_QueriesStartInColliders: 1
+ m_CallbacksOnDisable: 1
+ m_ReuseCollisionCallbacks: 0
+ m_AutoSyncTransforms: 0
+ m_AlwaysShowColliders: 0
+ m_ShowColliderSleep: 1
+ m_ShowColliderContacts: 0
+ m_ShowColliderAABB: 0
+ m_ContactArrowScale: 0.2
+ m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
+ m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
+ m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
+ m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
+ m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
diff --git a/Outline.HDRP/ProjectSettings/PresetManager.asset b/Outline.HDRP/ProjectSettings/PresetManager.asset
new file mode 100644
index 0000000..67a94da
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/PresetManager.asset
@@ -0,0 +1,7 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1386491679 &1
+PresetManager:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_DefaultPresets: {}
diff --git a/Outline.HDRP/ProjectSettings/ProjectSettings.asset b/Outline.HDRP/ProjectSettings/ProjectSettings.asset
new file mode 100644
index 0000000..d8171fb
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/ProjectSettings.asset
@@ -0,0 +1,610 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!129 &1
+PlayerSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 20
+ productGUID: 7510e5ff91f1dd44e98faa701473f4c5
+ AndroidProfiler: 0
+ AndroidFilterTouchesWhenObscured: 0
+ AndroidEnableSustainedPerformanceMode: 0
+ defaultScreenOrientation: 4
+ targetDevice: 2
+ useOnDemandResources: 0
+ accelerometerFrequency: 60
+ companyName: DefaultCompany
+ productName: Outline.HDRP
+ defaultCursor: {fileID: 0}
+ cursorHotspot: {x: 0, y: 0}
+ m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
+ m_ShowUnitySplashScreen: 1
+ m_ShowUnitySplashLogo: 1
+ m_SplashScreenOverlayOpacity: 1
+ m_SplashScreenAnimation: 1
+ m_SplashScreenLogoStyle: 1
+ m_SplashScreenDrawMode: 0
+ m_SplashScreenBackgroundAnimationZoom: 1
+ m_SplashScreenLogoAnimationZoom: 1
+ m_SplashScreenBackgroundLandscapeAspect: 1
+ m_SplashScreenBackgroundPortraitAspect: 1
+ m_SplashScreenBackgroundLandscapeUvs:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ m_SplashScreenBackgroundPortraitUvs:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ m_SplashScreenLogos: []
+ m_VirtualRealitySplashScreen: {fileID: 0}
+ m_HolographicTrackingLossScreen: {fileID: 0}
+ defaultScreenWidth: 1024
+ defaultScreenHeight: 768
+ defaultScreenWidthWeb: 960
+ defaultScreenHeightWeb: 600
+ m_StereoRenderingPath: 0
+ m_ActiveColorSpace: 0
+ m_MTRendering: 1
+ m_StackTraceTypes: 010000000100000001000000010000000100000001000000
+ iosShowActivityIndicatorOnLoading: -1
+ androidShowActivityIndicatorOnLoading: -1
+ iosUseCustomAppBackgroundBehavior: 0
+ iosAllowHTTPDownload: 1
+ allowedAutorotateToPortrait: 1
+ allowedAutorotateToPortraitUpsideDown: 1
+ allowedAutorotateToLandscapeRight: 1
+ allowedAutorotateToLandscapeLeft: 1
+ useOSAutorotation: 1
+ use32BitDisplayBuffer: 1
+ preserveFramebufferAlpha: 0
+ disableDepthAndStencilBuffers: 0
+ androidStartInFullscreen: 1
+ androidRenderOutsideSafeArea: 1
+ androidUseSwappy: 0
+ androidBlitType: 0
+ defaultIsNativeResolution: 1
+ macRetinaSupport: 1
+ runInBackground: 0
+ captureSingleScreen: 0
+ muteOtherAudioSources: 0
+ Prepare IOS For Recording: 0
+ Force IOS Speakers When Recording: 0
+ deferSystemGesturesMode: 0
+ hideHomeButton: 0
+ submitAnalytics: 1
+ usePlayerLog: 1
+ bakeCollisionMeshes: 0
+ forceSingleInstance: 0
+ useFlipModelSwapchain: 1
+ resizableWindow: 0
+ useMacAppStoreValidation: 0
+ macAppStoreCategory: public.app-category.games
+ gpuSkinning: 0
+ xboxPIXTextureCapture: 0
+ xboxEnableAvatar: 0
+ xboxEnableKinect: 0
+ xboxEnableKinectAutoTracking: 0
+ xboxEnableFitness: 0
+ visibleInBackground: 1
+ allowFullscreenSwitch: 1
+ fullscreenMode: 1
+ xboxSpeechDB: 0
+ xboxEnableHeadOrientation: 0
+ xboxEnableGuest: 0
+ xboxEnablePIXSampling: 0
+ metalFramebufferOnly: 0
+ xboxOneResolution: 0
+ xboxOneSResolution: 0
+ xboxOneXResolution: 3
+ xboxOneMonoLoggingLevel: 0
+ xboxOneLoggingLevel: 1
+ xboxOneDisableEsram: 0
+ xboxOnePresentImmediateThreshold: 0
+ switchQueueCommandMemory: 1048576
+ switchQueueControlMemory: 16384
+ switchQueueComputeMemory: 262144
+ switchNVNShaderPoolsGranularity: 33554432
+ switchNVNDefaultPoolsGranularity: 16777216
+ switchNVNOtherPoolsGranularity: 16777216
+ vulkanNumSwapchainBuffers: 3
+ vulkanEnableSetSRGBWrite: 0
+ m_SupportedAspectRatios:
+ 4:3: 1
+ 5:4: 1
+ 16:10: 1
+ 16:9: 1
+ Others: 1
+ bundleVersion: 1.0
+ preloadedAssets: []
+ metroInputSource: 0
+ wsaTransparentSwapchain: 0
+ m_HolographicPauseOnTrackingLoss: 1
+ xboxOneDisableKinectGpuReservation: 1
+ xboxOneEnable7thCore: 1
+ vrSettings:
+ cardboard:
+ depthFormat: 0
+ enableTransitionView: 0
+ daydream:
+ depthFormat: 0
+ useSustainedPerformanceMode: 0
+ enableVideoLayer: 0
+ useProtectedVideoMemory: 0
+ minimumSupportedHeadTracking: 0
+ maximumSupportedHeadTracking: 1
+ hololens:
+ depthFormat: 1
+ depthBufferSharingEnabled: 1
+ lumin:
+ depthFormat: 0
+ frameTiming: 2
+ enableGLCache: 0
+ glCacheMaxBlobSize: 524288
+ glCacheMaxFileSize: 8388608
+ oculus:
+ sharedDepthBuffer: 1
+ dashSupport: 1
+ lowOverheadMode: 0
+ protectedContext: 0
+ v2Signing: 1
+ enable360StereoCapture: 0
+ isWsaHolographicRemotingEnabled: 0
+ enableFrameTimingStats: 0
+ useHDRDisplay: 0
+ D3DHDRBitDepth: 0
+ m_ColorGamuts: 00000000
+ targetPixelDensity: 0
+ resolutionScalingMode: 0
+ androidSupportedAspectRatio: 1
+ androidMaxAspectRatio: 2.1
+ applicationIdentifier: {}
+ buildNumber: {}
+ AndroidBundleVersionCode: 1
+ AndroidMinSdkVersion: 19
+ AndroidTargetSdkVersion: 0
+ AndroidPreferredInstallLocation: 1
+ aotOptions:
+ stripEngineCode: 1
+ iPhoneStrippingLevel: 0
+ iPhoneScriptCallOptimization: 0
+ ForceInternetPermission: 0
+ ForceSDCardPermission: 0
+ CreateWallpaper: 0
+ APKExpansionFiles: 0
+ keepLoadedShadersAlive: 0
+ StripUnusedMeshComponents: 0
+ VertexChannelCompressionMask: 4054
+ iPhoneSdkVersion: 988
+ iOSTargetOSVersionString:
+ tvOSSdkVersion: 0
+ tvOSRequireExtendedGameController: 0
+ tvOSTargetOSVersionString:
+ uIPrerenderedIcon: 0
+ uIRequiresPersistentWiFi: 0
+ uIRequiresFullScreen: 1
+ uIStatusBarHidden: 1
+ uIExitOnSuspend: 0
+ uIStatusBarStyle: 0
+ iPhoneSplashScreen: {fileID: 0}
+ iPhoneHighResSplashScreen: {fileID: 0}
+ iPhoneTallHighResSplashScreen: {fileID: 0}
+ iPhone47inSplashScreen: {fileID: 0}
+ iPhone55inPortraitSplashScreen: {fileID: 0}
+ iPhone55inLandscapeSplashScreen: {fileID: 0}
+ iPhone58inPortraitSplashScreen: {fileID: 0}
+ iPhone58inLandscapeSplashScreen: {fileID: 0}
+ iPadPortraitSplashScreen: {fileID: 0}
+ iPadHighResPortraitSplashScreen: {fileID: 0}
+ iPadLandscapeSplashScreen: {fileID: 0}
+ iPadHighResLandscapeSplashScreen: {fileID: 0}
+ iPhone65inPortraitSplashScreen: {fileID: 0}
+ iPhone65inLandscapeSplashScreen: {fileID: 0}
+ iPhone61inPortraitSplashScreen: {fileID: 0}
+ iPhone61inLandscapeSplashScreen: {fileID: 0}
+ appleTVSplashScreen: {fileID: 0}
+ appleTVSplashScreen2x: {fileID: 0}
+ tvOSSmallIconLayers: []
+ tvOSSmallIconLayers2x: []
+ tvOSLargeIconLayers: []
+ tvOSLargeIconLayers2x: []
+ tvOSTopShelfImageLayers: []
+ tvOSTopShelfImageLayers2x: []
+ tvOSTopShelfImageWideLayers: []
+ tvOSTopShelfImageWideLayers2x: []
+ iOSLaunchScreenType: 0
+ iOSLaunchScreenPortrait: {fileID: 0}
+ iOSLaunchScreenLandscape: {fileID: 0}
+ iOSLaunchScreenBackgroundColor:
+ serializedVersion: 2
+ rgba: 0
+ iOSLaunchScreenFillPct: 100
+ iOSLaunchScreenSize: 100
+ iOSLaunchScreenCustomXibPath:
+ iOSLaunchScreeniPadType: 0
+ iOSLaunchScreeniPadImage: {fileID: 0}
+ iOSLaunchScreeniPadBackgroundColor:
+ serializedVersion: 2
+ rgba: 0
+ iOSLaunchScreeniPadFillPct: 100
+ iOSLaunchScreeniPadSize: 100
+ iOSLaunchScreeniPadCustomXibPath:
+ iOSUseLaunchScreenStoryboard: 0
+ iOSLaunchScreenCustomStoryboardPath:
+ iOSDeviceRequirements: []
+ iOSURLSchemes: []
+ iOSBackgroundModes: 0
+ iOSMetalForceHardShadows: 0
+ metalEditorSupport: 1
+ metalAPIValidation: 1
+ iOSRenderExtraFrameOnPause: 0
+ appleDeveloperTeamID:
+ iOSManualSigningProvisioningProfileID:
+ tvOSManualSigningProvisioningProfileID:
+ iOSManualSigningProvisioningProfileType: 0
+ tvOSManualSigningProvisioningProfileType: 0
+ appleEnableAutomaticSigning: 0
+ iOSRequireARKit: 0
+ iOSAutomaticallyDetectAndAddCapabilities: 1
+ appleEnableProMotion: 0
+ clonedFromGUID: 00000000000000000000000000000000
+ templatePackageId:
+ templateDefaultScene:
+ AndroidTargetArchitectures: 1
+ AndroidSplashScreenScale: 0
+ androidSplashScreen: {fileID: 0}
+ AndroidKeystoreName:
+ AndroidKeyaliasName:
+ AndroidBuildApkPerCpuArchitecture: 0
+ AndroidTVCompatibility: 0
+ AndroidIsGame: 1
+ AndroidEnableTango: 0
+ androidEnableBanner: 1
+ androidUseLowAccuracyLocation: 0
+ androidUseCustomKeystore: 0
+ m_AndroidBanners:
+ - width: 320
+ height: 180
+ banner: {fileID: 0}
+ androidGamepadSupportLevel: 0
+ AndroidValidateAppBundleSize: 1
+ AndroidAppBundleSizeToValidate: 150
+ m_BuildTargetIcons: []
+ m_BuildTargetPlatformIcons: []
+ m_BuildTargetBatching: []
+ m_BuildTargetGraphicsJobs: []
+ m_BuildTargetGraphicsJobMode: []
+ m_BuildTargetGraphicsAPIs: []
+ m_BuildTargetVRSettings: []
+ openGLRequireES31: 0
+ openGLRequireES31AEP: 0
+ openGLRequireES32: 0
+ m_TemplateCustomTags: {}
+ mobileMTRendering:
+ Android: 1
+ iPhone: 1
+ tvOS: 1
+ m_BuildTargetGroupLightmapEncodingQuality: []
+ m_BuildTargetGroupLightmapSettings: []
+ playModeTestRunnerEnabled: 0
+ runPlayModeTestAsEditModeTest: 0
+ actionOnDotNetUnhandledException: 1
+ enableInternalProfiler: 0
+ logObjCUncaughtExceptions: 1
+ enableCrashReportAPI: 0
+ cameraUsageDescription:
+ locationUsageDescription:
+ microphoneUsageDescription:
+ switchNetLibKey:
+ switchSocketMemoryPoolSize: 6144
+ switchSocketAllocatorPoolSize: 128
+ switchSocketConcurrencyLimit: 14
+ switchScreenResolutionBehavior: 2
+ switchUseCPUProfiler: 0
+ switchApplicationID: 0x01004b9000490000
+ switchNSODependencies:
+ switchTitleNames_0:
+ switchTitleNames_1:
+ switchTitleNames_2:
+ switchTitleNames_3:
+ switchTitleNames_4:
+ switchTitleNames_5:
+ switchTitleNames_6:
+ switchTitleNames_7:
+ switchTitleNames_8:
+ switchTitleNames_9:
+ switchTitleNames_10:
+ switchTitleNames_11:
+ switchTitleNames_12:
+ switchTitleNames_13:
+ switchTitleNames_14:
+ switchPublisherNames_0:
+ switchPublisherNames_1:
+ switchPublisherNames_2:
+ switchPublisherNames_3:
+ switchPublisherNames_4:
+ switchPublisherNames_5:
+ switchPublisherNames_6:
+ switchPublisherNames_7:
+ switchPublisherNames_8:
+ switchPublisherNames_9:
+ switchPublisherNames_10:
+ switchPublisherNames_11:
+ switchPublisherNames_12:
+ switchPublisherNames_13:
+ switchPublisherNames_14:
+ switchIcons_0: {fileID: 0}
+ switchIcons_1: {fileID: 0}
+ switchIcons_2: {fileID: 0}
+ switchIcons_3: {fileID: 0}
+ switchIcons_4: {fileID: 0}
+ switchIcons_5: {fileID: 0}
+ switchIcons_6: {fileID: 0}
+ switchIcons_7: {fileID: 0}
+ switchIcons_8: {fileID: 0}
+ switchIcons_9: {fileID: 0}
+ switchIcons_10: {fileID: 0}
+ switchIcons_11: {fileID: 0}
+ switchIcons_12: {fileID: 0}
+ switchIcons_13: {fileID: 0}
+ switchIcons_14: {fileID: 0}
+ switchSmallIcons_0: {fileID: 0}
+ switchSmallIcons_1: {fileID: 0}
+ switchSmallIcons_2: {fileID: 0}
+ switchSmallIcons_3: {fileID: 0}
+ switchSmallIcons_4: {fileID: 0}
+ switchSmallIcons_5: {fileID: 0}
+ switchSmallIcons_6: {fileID: 0}
+ switchSmallIcons_7: {fileID: 0}
+ switchSmallIcons_8: {fileID: 0}
+ switchSmallIcons_9: {fileID: 0}
+ switchSmallIcons_10: {fileID: 0}
+ switchSmallIcons_11: {fileID: 0}
+ switchSmallIcons_12: {fileID: 0}
+ switchSmallIcons_13: {fileID: 0}
+ switchSmallIcons_14: {fileID: 0}
+ switchManualHTML:
+ switchAccessibleURLs:
+ switchLegalInformation:
+ switchMainThreadStackSize: 1048576
+ switchPresenceGroupId:
+ switchLogoHandling: 0
+ switchReleaseVersion: 0
+ switchDisplayVersion: 1.0.0
+ switchStartupUserAccount: 0
+ switchTouchScreenUsage: 0
+ switchSupportedLanguagesMask: 0
+ switchLogoType: 0
+ switchApplicationErrorCodeCategory:
+ switchUserAccountSaveDataSize: 0
+ switchUserAccountSaveDataJournalSize: 0
+ switchApplicationAttribute: 0
+ switchCardSpecSize: -1
+ switchCardSpecClock: -1
+ switchRatingsMask: 0
+ switchRatingsInt_0: 0
+ switchRatingsInt_1: 0
+ switchRatingsInt_2: 0
+ switchRatingsInt_3: 0
+ switchRatingsInt_4: 0
+ switchRatingsInt_5: 0
+ switchRatingsInt_6: 0
+ switchRatingsInt_7: 0
+ switchRatingsInt_8: 0
+ switchRatingsInt_9: 0
+ switchRatingsInt_10: 0
+ switchRatingsInt_11: 0
+ switchRatingsInt_12: 0
+ switchLocalCommunicationIds_0:
+ switchLocalCommunicationIds_1:
+ switchLocalCommunicationIds_2:
+ switchLocalCommunicationIds_3:
+ switchLocalCommunicationIds_4:
+ switchLocalCommunicationIds_5:
+ switchLocalCommunicationIds_6:
+ switchLocalCommunicationIds_7:
+ switchParentalControl: 0
+ switchAllowsScreenshot: 1
+ switchAllowsVideoCapturing: 1
+ switchAllowsRuntimeAddOnContentInstall: 0
+ switchDataLossConfirmation: 0
+ switchUserAccountLockEnabled: 0
+ switchSystemResourceMemory: 16777216
+ switchSupportedNpadStyles: 22
+ switchNativeFsCacheSize: 32
+ switchIsHoldTypeHorizontal: 0
+ switchSupportedNpadCount: 8
+ switchSocketConfigEnabled: 0
+ switchTcpInitialSendBufferSize: 32
+ switchTcpInitialReceiveBufferSize: 64
+ switchTcpAutoSendBufferSizeMax: 256
+ switchTcpAutoReceiveBufferSizeMax: 256
+ switchUdpSendBufferSize: 9
+ switchUdpReceiveBufferSize: 42
+ switchSocketBufferEfficiency: 4
+ switchSocketInitializeEnabled: 1
+ switchNetworkInterfaceManagerInitializeEnabled: 1
+ switchPlayerConnectionEnabled: 1
+ ps4NPAgeRating: 12
+ ps4NPTitleSecret:
+ ps4NPTrophyPackPath:
+ ps4ParentalLevel: 11
+ ps4ContentID: ED1633-NPXX51362_00-0000000000000000
+ ps4Category: 0
+ ps4MasterVersion: 01.00
+ ps4AppVersion: 01.00
+ ps4AppType: 0
+ ps4ParamSfxPath:
+ ps4VideoOutPixelFormat: 0
+ ps4VideoOutInitialWidth: 1920
+ ps4VideoOutBaseModeInitialWidth: 1920
+ ps4VideoOutReprojectionRate: 60
+ ps4PronunciationXMLPath:
+ ps4PronunciationSIGPath:
+ ps4BackgroundImagePath:
+ ps4StartupImagePath:
+ ps4StartupImagesFolder:
+ ps4IconImagesFolder:
+ ps4SaveDataImagePath:
+ ps4SdkOverride:
+ ps4BGMPath:
+ ps4ShareFilePath:
+ ps4ShareOverlayImagePath:
+ ps4PrivacyGuardImagePath:
+ ps4NPtitleDatPath:
+ ps4RemotePlayKeyAssignment: -1
+ ps4RemotePlayKeyMappingDir:
+ ps4PlayTogetherPlayerCount: 0
+ ps4EnterButtonAssignment: 2
+ ps4ApplicationParam1: 0
+ ps4ApplicationParam2: 0
+ ps4ApplicationParam3: 0
+ ps4ApplicationParam4: 0
+ ps4DownloadDataSize: 0
+ ps4GarlicHeapSize: 2048
+ ps4ProGarlicHeapSize: 2560
+ playerPrefsMaxSize: 32768
+ ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
+ ps4pnSessions: 1
+ ps4pnPresence: 1
+ ps4pnFriends: 1
+ ps4pnGameCustomData: 1
+ playerPrefsSupport: 0
+ enableApplicationExit: 0
+ resetTempFolder: 1
+ restrictedAudioUsageRights: 0
+ ps4UseResolutionFallback: 0
+ ps4ReprojectionSupport: 0
+ ps4UseAudio3dBackend: 0
+ ps4SocialScreenEnabled: 0
+ ps4ScriptOptimizationLevel: 2
+ ps4Audio3dVirtualSpeakerCount: 14
+ ps4attribCpuUsage: 0
+ ps4PatchPkgPath:
+ ps4PatchLatestPkgPath:
+ ps4PatchChangeinfoPath:
+ ps4PatchDayOne: 0
+ ps4attribUserManagement: 0
+ ps4attribMoveSupport: 0
+ ps4attrib3DSupport: 0
+ ps4attribShareSupport: 0
+ ps4attribExclusiveVR: 0
+ ps4disableAutoHideSplash: 0
+ ps4videoRecordingFeaturesUsed: 0
+ ps4contentSearchFeaturesUsed: 0
+ ps4attribEyeToEyeDistanceSettingVR: 0
+ ps4IncludedModules: []
+ ps4attribVROutputEnabled: 0
+ monoEnv:
+ splashScreenBackgroundSourceLandscape: {fileID: 0}
+ splashScreenBackgroundSourcePortrait: {fileID: 0}
+ blurSplashScreenBackground: 1
+ spritePackerPolicy:
+ webGLMemorySize: 32
+ webGLExceptionSupport: 1
+ webGLNameFilesAsHashes: 0
+ webGLDataCaching: 1
+ webGLDebugSymbols: 0
+ webGLEmscriptenArgs:
+ webGLModulesDirectory:
+ webGLTemplate: APPLICATION:Default
+ webGLAnalyzeBuildSize: 0
+ webGLUseEmbeddedResources: 0
+ webGLCompressionFormat: 0
+ webGLLinkerTarget: 1
+ webGLThreadsSupport: 0
+ webGLWasmStreaming: 0
+ scriptingDefineSymbols: {}
+ platformArchitecture: {}
+ scriptingBackend: {}
+ il2cppCompilerConfiguration: {}
+ managedStrippingLevel: {}
+ incrementalIl2cppBuild: {}
+ allowUnsafeCode: 0
+ additionalIl2CppArgs:
+ scriptingRuntimeVersion: 1
+ gcIncremental: 0
+ gcWBarrierValidation: 0
+ apiCompatibilityLevelPerPlatform: {}
+ m_RenderingPath: 1
+ m_MobileRenderingPath: 1
+ metroPackageName: Outline.HDRP
+ metroPackageVersion:
+ metroCertificatePath:
+ metroCertificatePassword:
+ metroCertificateSubject:
+ metroCertificateIssuer:
+ metroCertificateNotAfter: 0000000000000000
+ metroApplicationDescription: Outline.HDRP
+ wsaImages: {}
+ metroTileShortName:
+ metroTileShowName: 0
+ metroMediumTileShowName: 0
+ metroLargeTileShowName: 0
+ metroWideTileShowName: 0
+ metroSupportStreamingInstall: 0
+ metroLastRequiredScene: 0
+ metroDefaultTileSize: 1
+ metroTileForegroundText: 2
+ metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
+ metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
+ a: 1}
+ metroSplashScreenUseBackgroundColor: 0
+ platformCapabilities: {}
+ metroTargetDeviceFamilies: {}
+ metroFTAName:
+ metroFTAFileTypes: []
+ metroProtocolName:
+ XboxOneProductId:
+ XboxOneUpdateKey:
+ XboxOneSandboxId:
+ XboxOneContentId:
+ XboxOneTitleId:
+ XboxOneSCId:
+ XboxOneGameOsOverridePath:
+ XboxOnePackagingOverridePath:
+ XboxOneAppManifestOverridePath:
+ XboxOneVersion: 1.0.0.0
+ XboxOnePackageEncryption: 0
+ XboxOnePackageUpdateGranularity: 2
+ XboxOneDescription:
+ XboxOneLanguage:
+ - enus
+ XboxOneCapability: []
+ XboxOneGameRating: {}
+ XboxOneIsContentPackage: 0
+ XboxOneEnableGPUVariability: 1
+ XboxOneSockets: {}
+ XboxOneSplashScreen: {fileID: 0}
+ XboxOneAllowedProductIds: []
+ XboxOnePersistentLocalStorageSize: 0
+ XboxOneXTitleMemory: 8
+ XboxOneOverrideIdentityName:
+ vrEditorSettings:
+ daydream:
+ daydreamIconForeground: {fileID: 0}
+ daydreamIconBackground: {fileID: 0}
+ cloudServicesEnabled: {}
+ luminIcon:
+ m_Name:
+ m_ModelFolderPath:
+ m_PortalFolderPath:
+ luminCert:
+ m_CertPath:
+ m_SignPackage: 1
+ luminIsChannelApp: 0
+ luminVersion:
+ m_VersionCode: 1
+ m_VersionName:
+ apiCompatibilityLevel: 6
+ cloudProjectId:
+ framebufferDepthMemorylessMode: 0
+ projectName:
+ organizationId:
+ cloudEnabled: 0
+ enableNativePlatformBackendsForNewInputSystem: 0
+ disableOldInputManagerSupport: 0
+ legacyClampBlendShapeWeights: 0
diff --git a/Outline.HDRP/ProjectSettings/ProjectVersion.txt b/Outline.HDRP/ProjectSettings/ProjectVersion.txt
new file mode 100644
index 0000000..e1506f9
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/ProjectVersion.txt
@@ -0,0 +1,2 @@
+m_EditorVersion: 2019.3.1f1
+m_EditorVersionWithRevision: 2019.3.1f1 (89d6087839c2)
diff --git a/Outline.HDRP/ProjectSettings/QualitySettings.asset b/Outline.HDRP/ProjectSettings/QualitySettings.asset
new file mode 100644
index 0000000..d24eb10
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/QualitySettings.asset
@@ -0,0 +1,236 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!47 &1
+QualitySettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 5
+ m_CurrentQuality: 5
+ m_QualitySettings:
+ - serializedVersion: 2
+ name: Very Low
+ pixelLightCount: 0
+ shadows: 0
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 15
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ skinWeights: 1
+ textureQuality: 1
+ anisotropicTextures: 0
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 0
+ lodBias: 0.3
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 4
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Low
+ pixelLightCount: 0
+ shadows: 0
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 20
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ skinWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 0
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 0
+ lodBias: 0.4
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 16
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Medium
+ pixelLightCount: 1
+ shadows: 1
+ shadowResolution: 0
+ shadowProjection: 1
+ shadowCascades: 1
+ shadowDistance: 20
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 0
+ skinWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 1
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 0
+ realtimeReflectionProbes: 0
+ billboardsFaceCameraPosition: 0
+ vSyncCount: 1
+ lodBias: 0.7
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 64
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: High
+ pixelLightCount: 2
+ shadows: 2
+ shadowResolution: 1
+ shadowProjection: 1
+ shadowCascades: 2
+ shadowDistance: 40
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ skinWeights: 2
+ textureQuality: 0
+ anisotropicTextures: 1
+ antiAliasing: 0
+ softParticles: 0
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 1
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 256
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Very High
+ pixelLightCount: 3
+ shadows: 2
+ shadowResolution: 2
+ shadowProjection: 1
+ shadowCascades: 2
+ shadowDistance: 70
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ skinWeights: 4
+ textureQuality: 0
+ anisotropicTextures: 2
+ antiAliasing: 2
+ softParticles: 1
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 1.5
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 1024
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ - serializedVersion: 2
+ name: Ultra
+ pixelLightCount: 4
+ shadows: 2
+ shadowResolution: 2
+ shadowProjection: 1
+ shadowCascades: 4
+ shadowDistance: 150
+ shadowNearPlaneOffset: 3
+ shadowCascade2Split: 0.33333334
+ shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
+ shadowmaskMode: 1
+ skinWeights: 255
+ textureQuality: 0
+ anisotropicTextures: 2
+ antiAliasing: 2
+ softParticles: 1
+ softVegetation: 1
+ realtimeReflectionProbes: 1
+ billboardsFaceCameraPosition: 1
+ vSyncCount: 1
+ lodBias: 2
+ maximumLODLevel: 0
+ streamingMipmapsActive: 0
+ streamingMipmapsAddAllCameras: 1
+ streamingMipmapsMemoryBudget: 512
+ streamingMipmapsRenderersPerFrame: 512
+ streamingMipmapsMaxLevelReduction: 2
+ streamingMipmapsMaxFileIORequests: 1024
+ particleRaycastBudget: 4096
+ asyncUploadTimeSlice: 2
+ asyncUploadBufferSize: 16
+ asyncUploadPersistentBuffer: 1
+ resolutionScalingFixedDPIFactor: 1
+ customRenderPipeline: {fileID: 0}
+ excludedTargetPlatforms: []
+ m_PerPlatformDefaultQuality:
+ Android: 2
+ Lumin: 5
+ Nintendo Switch: 5
+ PS4: 5
+ Stadia: 5
+ Standalone: 5
+ WebGL: 3
+ Windows Store Apps: 5
+ XboxOne: 5
+ iPhone: 2
+ tvOS: 2
diff --git a/Outline.HDRP/ProjectSettings/TagManager.asset b/Outline.HDRP/ProjectSettings/TagManager.asset
new file mode 100644
index 0000000..1c92a78
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/TagManager.asset
@@ -0,0 +1,43 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!78 &1
+TagManager:
+ serializedVersion: 2
+ tags: []
+ layers:
+ - Default
+ - TransparentFX
+ - Ignore Raycast
+ -
+ - Water
+ - UI
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ m_SortingLayers:
+ - name: Default
+ uniqueID: 0
+ locked: 0
diff --git a/Outline.HDRP/ProjectSettings/TimeManager.asset b/Outline.HDRP/ProjectSettings/TimeManager.asset
new file mode 100644
index 0000000..558a017
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/TimeManager.asset
@@ -0,0 +1,9 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!5 &1
+TimeManager:
+ m_ObjectHideFlags: 0
+ Fixed Timestep: 0.02
+ Maximum Allowed Timestep: 0.33333334
+ m_TimeScale: 1
+ Maximum Particle Timestep: 0.03
diff --git a/Outline.HDRP/ProjectSettings/UnityConnectSettings.asset b/Outline.HDRP/ProjectSettings/UnityConnectSettings.asset
new file mode 100644
index 0000000..fa0b146
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/UnityConnectSettings.asset
@@ -0,0 +1,34 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!310 &1
+UnityConnectSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 1
+ m_Enabled: 0
+ m_TestMode: 0
+ m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
+ m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
+ m_ConfigUrl: https://config.uca.cloud.unity3d.com
+ m_TestInitMode: 0
+ CrashReportingSettings:
+ m_EventUrl: https://perf-events.cloud.unity3d.com
+ m_Enabled: 0
+ m_LogBufferSize: 10
+ m_CaptureEditorExceptions: 1
+ UnityPurchasingSettings:
+ m_Enabled: 0
+ m_TestMode: 0
+ UnityAnalyticsSettings:
+ m_Enabled: 0
+ m_TestMode: 0
+ m_InitializeOnStartup: 1
+ UnityAdsSettings:
+ m_Enabled: 0
+ m_InitializeOnStartup: 1
+ m_TestMode: 0
+ m_IosGameId:
+ m_AndroidGameId:
+ m_GameIds: {}
+ m_GameId:
+ PerformanceReportingSettings:
+ m_Enabled: 0
diff --git a/Outline.HDRP/ProjectSettings/VFXManager.asset b/Outline.HDRP/ProjectSettings/VFXManager.asset
new file mode 100644
index 0000000..3a95c98
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/VFXManager.asset
@@ -0,0 +1,12 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!937362698 &1
+VFXManager:
+ m_ObjectHideFlags: 0
+ m_IndirectShader: {fileID: 0}
+ m_CopyBufferShader: {fileID: 0}
+ m_SortShader: {fileID: 0}
+ m_StripUpdateShader: {fileID: 0}
+ m_RenderPipeSettingsPath:
+ m_FixedTimeStep: 0.016666668
+ m_MaxDeltaTime: 0.05
diff --git a/Outline.HDRP/ProjectSettings/XRSettings.asset b/Outline.HDRP/ProjectSettings/XRSettings.asset
new file mode 100644
index 0000000..482590c
--- /dev/null
+++ b/Outline.HDRP/ProjectSettings/XRSettings.asset
@@ -0,0 +1,10 @@
+{
+ "m_SettingKeys": [
+ "VR Device Disabled",
+ "VR Device User Alert"
+ ],
+ "m_SettingValues": [
+ "False",
+ "False"
+ ]
+}
\ No newline at end of file
diff --git a/Outline.PostProcessing/ProjectSettings/AudioManager.asset b/Outline.PostProcessing/ProjectSettings/AudioManager.asset
new file mode 100644
index 0000000000000000000000000000000000000000..5c938375a642d9716bc3c5e35af7fdea906a824e
GIT binary patch
literal 4148
zcmeH~yN=U96o!x2++n#xgFr4Qs8$$Of{p|X+JZ<+EYhNhGhTU_WP)QCP`Rey4M3uR
z2cX$E;2|ie>8Tg<|C2S#WnTbkPINTqd~@c^%x|R_k+3gvc3niyVZt=j+ZGA0{
z^H_egZ5srDCppu$-#%P>ySgL0gEv=i>_&s}CD8Bi6;8wMh%{Kzx}*^a@cS4_^C^(#
z5FlGEJ&^aPT}4jbt!F*?o{V%F1XJ=d4k$)
zICJW;W`27tN&wk+}X>|W2Et3DO=CcH#?I1XmQb3&cVZ1rf27AfqTrkj(|GvS8~oSlZax+2sLj
zQ`qYmZY{i1Cx{a=FC6IHzMA>$ozzeETE!@Y^(=6<;`*sTm|wQ$FVVh
zU)+h~erfmp>1S}*>wcU+es8@kgH|!w!m%w9;Yge;B61_ozC^D^q8uRm+%z%(=Xv&f
zs1k9{GXcJFlKbR+a$i2dR&a(noE+q_pXkt~iZDj33MXLpmpt{I(46g-65?&_J+p6;Q$
zX4#3CxrpTIA0UVz2%bE76|a(;1R;2eUIT#~yf}Wp)z!1TmC#=&xZ-jYlvLn&k_K=L*)3x{-6w
z#`7^4{U5`iF)zmXDdyxw{ssTs@yGF`k@MWIFsDCbq80oH%*mf1gpseq|CXH#alq0Y
ze%Eo5qZRhSLmvYWH4|=&iF4-FW$%p*KEGW@EPWHgxrpr?FZD&@}pCp=erFj`aO$5EAqPOIQxQD@UI3xpEGM{vv47aN2f%rU>@gwg;I&