Skip to content

Commit 778585e

Browse files
Feature/improved blending of outline color (#109)
* Submitted the test shader and scene. * Improved blending of extended outline objects with environmental lighting in environments without real-time directional lighting. Updated the shader unitypackage and documents. * Removed the test scene and its assets that are no longer needed. * Updated for code compatibility with UTS3(Unity Toon Shader).
1 parent 05f1ab7 commit 778585e

File tree

12 files changed

+36
-19
lines changed

12 files changed

+36
-19
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ sysinfo.txt
3838
*.apk
3939

4040
# Unity 2019.4.x or later
41-
Packages/package-lock.json
41+
Packages/packages-lock.json

Assets/Sample Scenes/LightAndShadows/Grey_UTS2.mat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Material:
99
m_PrefabAsset: {fileID: 0}
1010
m_Name: Grey_UTS2
1111
m_Shader: {fileID: 4800000, guid: 9baf30ce95c751649b14d96da3a4b4d5, type: 3}
12-
m_ShaderKeywords: _EMISSIVE_SIMPLE _OUTLINE_NML
12+
m_ShaderKeywords: _ _EMISSIVE_SIMPLE _OUTLINE_NML
1313
m_LightmapFlags: 4
1414
m_EnableInstancingVariants: 0
1515
m_DoubleSidedGI: 0
@@ -159,6 +159,9 @@ Material:
159159
- _Set_SystemShadowsToBase: 1
160160
- _ShadeColor_Step: 0.5
161161
- _StepOffset: 0
162+
- _TessEdgeLength: 5
163+
- _TessExtrusionAmount: 0
164+
- _TessPhongStrength: 0.5
162165
- _TweakHighColorOnShadow: 0
163166
- _TweakMatCapOnShadow: 0
164167
- _Tweak_HighColorMaskLevel: 0

Assets/Toon/Shader/README.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ README.txt
66
ユニティちゃんトゥーンシェーダーVer.2.0では、従来の機能に加えて大幅な機能強化を行いました。
77
Ver.1.0でできる絵づくりをカバーしつつ、さらに高度なルックが実現できるようになっています。
88

9-
### 2022/05/23:2.0.9 Release:新規機能追加
9+
### 2022/06/14:2.0.9 Release:新規機能追加
1010
* リリース環境を、Unity 2019.4.31f1に変更。Unity 2020.3.x LTSでの動作確認。
1111
* シングルパスインスタンシング レンダリング(ステレオインスタンシングとも呼ばれます)に対応。サポートするプラットフォームは、[Unity マニュアル](https://docs.unity3d.com/ja/2019.4/Manual/SinglePassInstancing.html)を参照してください。
12-
* 本リリースより、おまけのUTS2イメージエフェクトUnityPackageはサポート外として削除しました。
12+
* 本リリースより、おまけのUTS2イメージエフェクトUnityPackageはサポート外として削除しました。
13+
* リアルタイムディレクショナルライトがない環境での、拡張アウトラインオブジェクトの環境ライティングへの馴染ませ具合を向上しました。
1314

1415
● **[日本語マニュアル(v.2.0.9版)](https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/blob/blob/release/legacy/2.0/Manual/UTS2_Manual_ja.md)が提供されています。合わせてご利用ください。**
1516

@@ -24,6 +25,7 @@ It still has the same rendering capabilities as Ver. 1.0, but now you can give y
2425
* Changed release environment to Unity 2019.4.31f1, tested with Unity 2020.3.x LTS.
2526
* Single Pass Instanced rendering (also known as Stereo Instancing), support. See [Unity Manual](https://docs.unity3d.com/2019.4/Documentation/Manual/SinglePassInstancing.html) for supported platforms.
2627
* Note that the UnityPackages for UTS2 extra image effects has been removed as unsupported from this release.
28+
* Improved blending of extended outline objects with environmental lighting in environments without real-time directional lighting.
2729

2830
● **[English manual for v.2.0.9](https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/blob/blob/release/legacy/2.0/Manual/UTS2_Manual_en.md) is available now.**
2931

@@ -72,6 +74,6 @@ https://unity-chan.com/contents/guideline_en/
7274

7375
-----
7476
Latest Version: 2.0.9 Release
75-
Update: 2022/05/23
77+
Update: 2022/06/14
7678
Category: 3D
7779
File format: zip/unitypackage

Assets/Toon/Shader/Tess/UCTS_Outline_Tess.cginc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,11 @@
125125
//v.2.0.5
126126
_Color = _BaseColor;
127127
float4 objPos = mul ( unity_ObjectToWorld, float4(0,0,0,1) );
128-
//v.2.0.7.5
129-
half3 ambientSkyColor = unity_AmbientSky.rgb>0.05 ? unity_AmbientSky.rgb*_Unlit_Intensity : half3(0.05,0.05,0.05)*_Unlit_Intensity;
128+
//v.2.0.9
129+
float3 envLightSource_GradientEquator = unity_AmbientEquator.rgb >0.05 ? unity_AmbientEquator.rgb : half3(0.05,0.05,0.05);
130+
float3 envLightSource_SkyboxIntensity = max(ShadeSH9(half4(0.0,0.0,0.0,1.0)),ShadeSH9(half4(0.0,-1.0,0.0,1.0))).rgb;
131+
float3 ambientSkyColor = envLightSource_SkyboxIntensity.rgb>0.0 ? envLightSource_SkyboxIntensity*_Unlit_Intensity : envLightSource_GradientEquator*_Unlit_Intensity;
132+
//
130133
float3 lightColor = _LightColor0.rgb >0.05 ? _LightColor0.rgb : ambientSkyColor.rgb;
131134
float lightColorIntensity = (0.299*lightColor.r + 0.587*lightColor.g + 0.114*lightColor.b);
132135
lightColor = lightColorIntensity<1 ? lightColor : lightColor/lightColorIntensity;

Assets/Toon/Shader/UCTS_Outline.cginc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,11 @@
108108
//v.2.0.5
109109
_Color = _BaseColor;
110110
float4 objPos = mul ( unity_ObjectToWorld, float4(0,0,0,1) );
111-
//v.2.0.7.5
112-
half3 ambientSkyColor = unity_AmbientSky.rgb>0.05 ? unity_AmbientSky.rgb*_Unlit_Intensity : half3(0.05,0.05,0.05)*_Unlit_Intensity;
111+
//v.2.0.9
112+
float3 envLightSource_GradientEquator = unity_AmbientEquator.rgb >0.05 ? unity_AmbientEquator.rgb : half3(0.05,0.05,0.05);
113+
float3 envLightSource_SkyboxIntensity = max(ShadeSH9(half4(0.0,0.0,0.0,1.0)),ShadeSH9(half4(0.0,-1.0,0.0,1.0))).rgb;
114+
float3 ambientSkyColor = envLightSource_SkyboxIntensity.rgb>0.0 ? envLightSource_SkyboxIntensity*_Unlit_Intensity : envLightSource_GradientEquator*_Unlit_Intensity;
115+
//
113116
float3 lightColor = _LightColor0.rgb >0.05 ? _LightColor0.rgb : ambientSkyColor.rgb;
114117
float lightColorIntensity = (0.299*lightColor.r + 0.587*lightColor.g + 0.114*lightColor.b);
115118
lightColor = lightColorIntensity<1 ? lightColor : lightColor/lightColorIntensity;

Manual/HISTORY_en.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Release History of UTS2
22
## Version
3-
### 2022/05/23: 2.0.9 Release: new features added.
3+
### 2022/06/14: 2.0.9 Release: new features added.
44
* Changed release environment to Unity 2019.4.31f1, tested with Unity 2020.3.x LTS, 2021.3.x LTS, and Unity 2022.1.1f1.
55
* Single Pass Instanced rendering (also known as Stereo Instancing), support. See [Unity Manual](https://docs.unity3d.com/2019.4/Documentation/Manual/SinglePassInstancing.html) for supported platforms.
66
* Note that the UnityPackages for UTS2 extra image effects has been removed as unsupported from this release.
7+
* Improved blending of extended outline objects with environmental lighting in environments without real-time directional lighting.
78

89
### 2021/09/08: 2.0.8 Release: Bug fix for outlines.
910
* Fixed a bug that caused the brightness of the outline to change unexpectedly in some VRChat worlds (Issue#82).

Manual/HISTORY_ja.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# UTS2リリース履歴
22
## Version
3-
### 2022/05/23:2.0.9 Release:新規機能追加
3+
### 2022/06/14:2.0.9 Release:新規機能追加
44
* リリース環境を、Unity 2019.4.31f1に変更。Unity 2020.3.x LTS、Unity 2021.3.x LTS、Unity 2022.1.1f1での動作確認。
55
* シングルパスインスタンシング レンダリング(ステレオインスタンシングとも呼ばれます)に対応。サポートするプラットフォームは、[Unity マニュアル](https://docs.unity3d.com/ja/2019.4/Manual/SinglePassInstancing.html)を参照してください。
66
* 本リリースより、おまけのUTS2イメージエフェクトUnityPackageはサポート外として削除しました。
7+
* リアルタイムディレクショナルライトがない環境での、拡張アウトラインオブジェクトの環境ライティングへの馴染ませ具合を向上しました。
78

89
### 2021/09/08:2.0.8 Release:アウトラインでの不具合修正版
910
* VRChatの一部のワールドで、アウトラインの明るさが急に変化する場合があるのに対応(Issue#82)。

Manual/UTS2_Manual_en.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
### 2022/05/23 Nobuyuki Kobayashi (Unity Technologies Japan)
33
***Read this document in other languages: [日本語版](./UTS2_Manual_ja.md)***
44

5-
## 2022/05/23: 2.0.9 Release: new features added.
5+
## 2022/06/14: 2.0.9 Release: new features added.
66
* Changed release environment to Unity 2019.4.31f1, tested with Unity 2020.3.x LTS, 2021.3.x LTS, and Unity 2022.1.1f1.
77
* Single Pass Instanced rendering (also known as Stereo Instancing), support. See [Unity Manual](https://docs.unity3d.com/2019.4/Documentation/Manual/SinglePassInstancing.html) for supported platforms.
88
* Note that the UnityPackages for UTS2 extra image effects has been removed as unsupported from this release.
9+
* Improved blending of extended outline objects with environmental lighting in environments without real-time directional lighting.
910

1011
# Index
1112
<!-- - [【Important】 Note on upgrading to version 2.0.9 directly](./UTS2_Manual_en.md#important-note-on-upgrading-to-version-209-directly) -->

Manual/UTS2_Manual_ja.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
### 2022/05/23 Nobuyuki Kobayashi (Unity Technologies Japan)
33
***Read this document in other languages: [English](./UTS2_Manual_en.md)***
44

5-
## 2022/05/23:2.0.9 Release:新規機能追加
5+
## 2022/06/14:2.0.9 Release:新規機能追加
66
* リリース環境を、Unity 2019.4.31f1に変更。Unity 2020.3.x LTS、Unity 2021.3.x LTS、Unity 2022.1.1f1での動作確認。
77
* シングルパスインスタンシング レンダリング(ステレオインスタンシングとも呼ばれます)に対応。サポートするプラットフォームは、[Unity マニュアル](https://docs.unity3d.com/ja/2019.4/Manual/SinglePassInstancing.html)を参照してください。
88
* 本リリースより、おまけのUTS2イメージエフェクトUnityPackageはサポート外として削除しました。
9+
* リアルタイムディレクショナルライトがない環境での、拡張アウトラインオブジェクトの環境ライティングへの馴染ませ具合を向上しました。
910

1011
# もくじ
1112
<!-- - [【重要】旧バージョンから、直接v.2.0.9へバージョンアップをする場合の注意](./UTS2_Manual_ja.md#%E9%87%8D%E8%A6%81%E6%97%A7%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%8B%E3%82%89%E7%9B%B4%E6%8E%A5v207%E3%81%B8%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%82%A2%E3%83%83%E3%83%97%E3%82%92%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AE%E6%B3%A8%E6%84%8F) -->

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
***Read this document in other languages: [日本語版](./README_ja.md)***
66

7-
## 2022/05/23: 2.0.9 Release: new features added.
7+
## 2022/06/14: 2.0.9 Release: new features added.
88
* Changed release environment to Unity 2019.4.31f1, tested with Unity 2020.3.x LTS.
99
* Single Pass Instanced rendering (also known as Stereo Instancing), support. See [Unity Manual](https://docs.unity3d.com/2019.4/Documentation/Manual/SinglePassInstancing.html) for supported platforms.
1010
* Note that the UnityPackages for UTS2 extra image effects has been removed as unsupported from this release.
11+
* Improved blending of extended outline objects with environmental lighting in environments without real-time directional lighting.
1112

1213
## 【Overview : What is UTS2?】
1314

@@ -114,10 +115,10 @@ The release history of UTS2 is [here.](Manual/HISTORY_en.md)
114115
-----
115116
## 【Information】
116117
Latest Version: 2.0.9 Release
117-
Update: 2022/05/23
118+
Update: 2022/06/14
118119
Category: 3D
119120
File format: zip/unitypackage
120121

121122
-----
122-
**README.md 2022/05/23**
123+
**README.md 2022/06/14**
123124

README_ja.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
***Read this document in other languages: [English](./README.md)***
66

7-
## 2022/05/23:2.0.9 Release:新規機能追加
7+
## 2022/06/14:2.0.9 Release:新規機能追加
88
* リリース環境を、Unity 2019.4.31f1に変更。Unity 2020.3.x LTSでの動作確認。
99
* シングルパスインスタンシング レンダリング(ステレオインスタンシングとも呼ばれます)に対応。サポートするプラットフォームは、[Unity マニュアル](https://docs.unity3d.com/ja/2019.4/Manual/SinglePassInstancing.html)を参照してください。
1010
* 本リリースより、おまけのUTS2イメージエフェクトUnityPackageはサポート外として削除しました。
11+
* リアルタイムディレクショナルライトがない環境での、拡張アウトラインオブジェクトの環境ライティングへの馴染ませ具合を向上しました。
1112

1213
## 【UTS2の概要】
1314

@@ -117,9 +118,9 @@ UTS2のリリース履歴は、[こちら](Manual/HISTORY_ja.md)。
117118
-----
118119
## 【インフォメーション】
119120
最新バージョン:2.0.9 Release
120-
最終リリース日:2022/05/23
121+
最終リリース日:2022/06/14
121122
カテゴリー:3D
122123
形式:zip/unitypackage
123124

124125
-----
125-
**README_ja.md 2022/05/23**
126+
**README_ja.md 2022/06/14**
492 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)