Skip to content

Commit

Permalink
Merge branch 'release/0.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvtesh committed May 30, 2020
2 parents f1f30e9 + 40cb408 commit 854d049
Show file tree
Hide file tree
Showing 110 changed files with 4,588 additions and 1,615 deletions.
1 change: 1 addition & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ jobs:
- run: |
npm publish Outline.Core/Packages/UnityFx.Outline
npm publish Outline.PostProcessing/Packages/UnityFx.Outline.PostProcessing
npm publish Outline.URP/Packages/UnityFx.Outline.URP
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@ 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] - 2020.05.30

[URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@8.1/manual/index.html) support, core refactoring and bugfixes.

### Added
- 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)).
- Use procedural geometry ([DrawProcedural](https://docs.unity3d.com/ScriptReference/Rendering.CommandBuffer.DrawProcedural.html)) on SM3.5+.
- Added support for both forward and deferred renderers (built-in RP).
- Added ignore layer mask settings to `OutlineLayerCollection` (previously the ignore layers were specified when adding game objects to layers).
- Added `OutlineBuilder` helper script for managinf `OutlineLayerCollection` content from editor ([#8](https://github.com/Arvtesh/UnityFx.Outline/issues/8)).

### Changed
- Changed `OutlineSettings` to display enum mask instead of checkboxes.
- Changed inspector look and feel for `OutlineLayerCollection` assets.
- Merged shaders for the 2 outline passes into one multi-pass shader.
- `OutlineLayerCollection` doe not depend on `OutlineRenderer` now.

### Fixed
- Fixed outline rendering on mobiles ([#7](https://github.com/Arvtesh/UnityFx.Outline/issues/7)).
- Fixed outline shader error on low-end devices.
- Fixed post-ptocessing implementation to require depth texture.

### Removed
- Dropped .NET 3.5 support, minimal Unity version is set to 2018.4.
- Removed `IOutlineSettingsEx` interface.

## [0.7.2] - 2020.04.08

Depth testing support and performance optimizations.
Expand Down
Binary file modified Docs/OutlineBehaviourInspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/OutlineLayerCollectionInspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/PpOutlineSettings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/UrpOutlineSettings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions Outline.Core/Assets/Common/FpsCounter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright (C) 2018-2020 Digimation. All rights reserved.
// See the LICENSE.md file in the project root for more information.

using System;
using UnityEngine;

/// <summary>
/// An FPS counter.
/// </summary>
/// <seealso href="https://wiki.unity3d.com/index.php/FramesPerSecond"/>
public class FpsCounter : MonoBehaviour
{
private const float _updateInterval = 0.5F;

private float _accum;
private int _frames;
private float _timeleft;
private float _fps;

public float Fps => _fps;

public static void RenderFps(float fps, string s, Rect rc)
{
var text = string.Format("{0}: {1:F2}", s, fps);

if (fps < 10)
{
GUI.color = Color.red;
}
else if (fps < 30)
{
GUI.color = Color.yellow;
}
else
{
GUI.color = Color.green;
}

GUI.Label(rc, text);
}

private void OnEnable()
{
_accum = 0;
_frames = 0;
_timeleft = 0;
_fps = 0;
}

private void Update()
{
_timeleft -= Time.deltaTime;
_accum += Time.timeScale / Time.deltaTime;

++_frames;

if (_timeleft <= 0.0)
{
_fps = _accum / _frames;
_timeleft = _updateInterval;
_accum = 0.0F;
_frames = 0;
}
}

private void OnGUI()
{
RenderFps(_fps, "FPS", new Rect(Screen.width - 80, 0, 80, 20));
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 34 additions & 17 deletions Outline.Core/Assets/Examples/SimplePerCamera/Outline.unity
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,46 @@ GameObject:
m_Component:
- component: {fileID: 692811816}
- component: {fileID: 692811815}
- component: {fileID: 692811813}
- component: {fileID: 692811818}
- component: {fileID: 692811817}
- component: {fileID: 692811814}
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: c9e1f138162751048bdb3432e85d7a73, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &692811814
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: e746e776b0ae00d4a9d458b9430b95d7, type: 3}
m_Name:
m_EditorClassIdentifier:
_outlineLayers: {fileID: 11400000, guid: 3a6c3b3c5f6e3ad4ab8e09fc219865bd, type: 2}
_content:
- Go: {fileID: 1579373802}
LayerIndex: 0
- Go: {fileID: 748173439}
LayerIndex: 1
--- !u!20 &692811815
Camera:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -259,21 +290,6 @@ Transform:
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
Expand Down Expand Up @@ -524,7 +540,8 @@ MonoBehaviour:
_outlineWidth: 15
_outlineIntensity: 2
_outlineMode: 1
_depthTestEnabled: 0
_layerMask: 0
_updateRenderers: 0
--- !u!23 &1789341923
MeshRenderer:
m_ObjectHideFlags: 0
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,22 @@ MonoBehaviour:
_outlineWidth: 5
_outlineIntensity: 2
_outlineMode: 0
_name:
_zOrder: 0
_name: My pretty layer
_enabled: 1
- _settings:
_outlineSettings: {fileID: 0}
_outlineColor: {r: 1, g: 1, b: 0, a: 1}
_outlineWidth: 15
_outlineIntensity: 2
_outlineMode: 1
_name:
_zOrder: 0
_name: The second layer
_enabled: 1
- _settings:
_outlineSettings: {fileID: 0}
_outlineColor: {r: 1, g: 0, b: 1, a: 1}
_outlineWidth: 4
_outlineIntensity: 2
_outlineMode: 0
_name:
_zOrder: 0
_name: The best layer
_enabled: 1
_layerMask: 2
Loading

0 comments on commit 854d049

Please sign in to comment.