Skip to content

Commit 854d049

Browse files
committed
Merge branch 'release/0.8.0'
2 parents f1f30e9 + 40cb408 commit 854d049

File tree

110 files changed

+4588
-1615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+4588
-1615
lines changed

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ jobs:
1717
- run: |
1818
npm publish Outline.Core/Packages/UnityFx.Outline
1919
npm publish Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing
20+
npm publish Outline.URP/Packages/UnityFx.Outline.URP
2021
env:
2122
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [0.8.0] - 2020.05.30
7+
8+
[URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@8.1/manual/index.html) support, core refactoring and bugfixes.
9+
10+
### Added
11+
- Added [URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@8.1/manual/index.html) support ([#5](https://github.com/Arvtesh/UnityFx.Outline/issues/5)).
12+
- Use procedural geometry ([DrawProcedural](https://docs.unity3d.com/ScriptReference/Rendering.CommandBuffer.DrawProcedural.html)) on SM3.5+.
13+
- Added support for both forward and deferred renderers (built-in RP).
14+
- Added ignore layer mask settings to `OutlineLayerCollection` (previously the ignore layers were specified when adding game objects to layers).
15+
- Added `OutlineBuilder` helper script for managinf `OutlineLayerCollection` content from editor ([#8](https://github.com/Arvtesh/UnityFx.Outline/issues/8)).
16+
17+
### Changed
18+
- Changed `OutlineSettings` to display enum mask instead of checkboxes.
19+
- Changed inspector look and feel for `OutlineLayerCollection` assets.
20+
- Merged shaders for the 2 outline passes into one multi-pass shader.
21+
- `OutlineLayerCollection` doe not depend on `OutlineRenderer` now.
22+
23+
### Fixed
24+
- Fixed outline rendering on mobiles ([#7](https://github.com/Arvtesh/UnityFx.Outline/issues/7)).
25+
- Fixed outline shader error on low-end devices.
26+
- Fixed post-ptocessing implementation to require depth texture.
27+
28+
### Removed
29+
- Dropped .NET 3.5 support, minimal Unity version is set to 2018.4.
30+
- Removed `IOutlineSettingsEx` interface.
31+
632
## [0.7.2] - 2020.04.08
733

834
Depth testing support and performance optimizations.

Docs/OutlineBehaviourInspector.png

2.58 KB
Loading
-377 Bytes
Loading

Docs/PpOutlineSettings.png

15.4 KB
Loading

Docs/UrpOutlineSettings.png

13.8 KB
Loading
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// Copyright (C) 2018-2020 Digimation. All rights reserved.
2+
// See the LICENSE.md file in the project root for more information.
3+
4+
using System;
5+
using UnityEngine;
6+
7+
/// <summary>
8+
/// An FPS counter.
9+
/// </summary>
10+
/// <seealso href="https://wiki.unity3d.com/index.php/FramesPerSecond"/>
11+
public class FpsCounter : MonoBehaviour
12+
{
13+
private const float _updateInterval = 0.5F;
14+
15+
private float _accum;
16+
private int _frames;
17+
private float _timeleft;
18+
private float _fps;
19+
20+
public float Fps => _fps;
21+
22+
public static void RenderFps(float fps, string s, Rect rc)
23+
{
24+
var text = string.Format("{0}: {1:F2}", s, fps);
25+
26+
if (fps < 10)
27+
{
28+
GUI.color = Color.red;
29+
}
30+
else if (fps < 30)
31+
{
32+
GUI.color = Color.yellow;
33+
}
34+
else
35+
{
36+
GUI.color = Color.green;
37+
}
38+
39+
GUI.Label(rc, text);
40+
}
41+
42+
private void OnEnable()
43+
{
44+
_accum = 0;
45+
_frames = 0;
46+
_timeleft = 0;
47+
_fps = 0;
48+
}
49+
50+
private void Update()
51+
{
52+
_timeleft -= Time.deltaTime;
53+
_accum += Time.timeScale / Time.deltaTime;
54+
55+
++_frames;
56+
57+
if (_timeleft <= 0.0)
58+
{
59+
_fps = _accum / _frames;
60+
_timeleft = _updateInterval;
61+
_accum = 0.0F;
62+
_frames = 0;
63+
}
64+
}
65+
66+
private void OnGUI()
67+
{
68+
RenderFps(_fps, "FPS", new Rect(Screen.width - 80, 0, 80, 20));
69+
}
70+
}

Outline.Core/Assets/Tests/Editor/Scripts/OutlineRendererTests.cs.meta renamed to Outline.Core/Assets/Common/FpsCounter.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,46 @@ GameObject:
191191
m_Component:
192192
- component: {fileID: 692811816}
193193
- component: {fileID: 692811815}
194+
- component: {fileID: 692811813}
194195
- component: {fileID: 692811818}
195-
- component: {fileID: 692811817}
196+
- component: {fileID: 692811814}
196197
m_Layer: 0
197198
m_Name: Main Camera
198199
m_TagString: MainCamera
199200
m_Icon: {fileID: 0}
200201
m_NavMeshLayer: 0
201202
m_StaticEditorFlags: 0
202203
m_IsActive: 1
204+
--- !u!114 &692811813
205+
MonoBehaviour:
206+
m_ObjectHideFlags: 0
207+
m_CorrespondingSourceObject: {fileID: 0}
208+
m_PrefabInstance: {fileID: 0}
209+
m_PrefabAsset: {fileID: 0}
210+
m_GameObject: {fileID: 692811812}
211+
m_Enabled: 1
212+
m_EditorHideFlags: 0
213+
m_Script: {fileID: 11500000, guid: c9e1f138162751048bdb3432e85d7a73, type: 3}
214+
m_Name:
215+
m_EditorClassIdentifier:
216+
--- !u!114 &692811814
217+
MonoBehaviour:
218+
m_ObjectHideFlags: 0
219+
m_CorrespondingSourceObject: {fileID: 0}
220+
m_PrefabInstance: {fileID: 0}
221+
m_PrefabAsset: {fileID: 0}
222+
m_GameObject: {fileID: 692811812}
223+
m_Enabled: 1
224+
m_EditorHideFlags: 0
225+
m_Script: {fileID: 11500000, guid: e746e776b0ae00d4a9d458b9430b95d7, type: 3}
226+
m_Name:
227+
m_EditorClassIdentifier:
228+
_outlineLayers: {fileID: 11400000, guid: 3a6c3b3c5f6e3ad4ab8e09fc219865bd, type: 2}
229+
_content:
230+
- Go: {fileID: 1579373802}
231+
LayerIndex: 0
232+
- Go: {fileID: 748173439}
233+
LayerIndex: 1
203234
--- !u!20 &692811815
204235
Camera:
205236
m_ObjectHideFlags: 0
@@ -259,21 +290,6 @@ Transform:
259290
m_Father: {fileID: 0}
260291
m_RootOrder: 0
261292
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
262-
--- !u!114 &692811817
263-
MonoBehaviour:
264-
m_ObjectHideFlags: 0
265-
m_CorrespondingSourceObject: {fileID: 0}
266-
m_PrefabInstance: {fileID: 0}
267-
m_PrefabAsset: {fileID: 0}
268-
m_GameObject: {fileID: 692811812}
269-
m_Enabled: 1
270-
m_EditorHideFlags: 0
271-
m_Script: {fileID: 11500000, guid: 5a318c96b1bc1614683eccf7abd717a1, type: 3}
272-
m_Name:
273-
m_EditorClassIdentifier:
274-
_outlineGos:
275-
- {fileID: 1579373802}
276-
- {fileID: 748173439}
277293
--- !u!114 &692811818
278294
MonoBehaviour:
279295
m_ObjectHideFlags: 0
@@ -524,7 +540,8 @@ MonoBehaviour:
524540
_outlineWidth: 15
525541
_outlineIntensity: 2
526542
_outlineMode: 1
527-
_depthTestEnabled: 0
543+
_layerMask: 0
544+
_updateRenderers: 0
528545
--- !u!23 &1789341923
529546
MeshRenderer:
530547
m_ObjectHideFlags: 0

Outline.Core/Assets/Examples/SimplePerCamera/OutlineEffectBuilder.cs

Lines changed: 0 additions & 88 deletions
This file was deleted.

Outline.Core/Assets/Examples/SimplePerCamera/TestOutlineLayers.asset

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,22 @@ MonoBehaviour:
2020
_outlineWidth: 5
2121
_outlineIntensity: 2
2222
_outlineMode: 0
23-
_name:
24-
_zOrder: 0
23+
_name: My pretty layer
2524
_enabled: 1
2625
- _settings:
2726
_outlineSettings: {fileID: 0}
2827
_outlineColor: {r: 1, g: 1, b: 0, a: 1}
2928
_outlineWidth: 15
3029
_outlineIntensity: 2
3130
_outlineMode: 1
32-
_name:
33-
_zOrder: 0
31+
_name: The second layer
3432
_enabled: 1
3533
- _settings:
3634
_outlineSettings: {fileID: 0}
3735
_outlineColor: {r: 1, g: 0, b: 1, a: 1}
3836
_outlineWidth: 4
3937
_outlineIntensity: 2
4038
_outlineMode: 0
41-
_name:
42-
_zOrder: 0
39+
_name: The best layer
4340
_enabled: 1
41+
_layerMask: 2

0 commit comments

Comments
 (0)