Skip to content

Commit a1e6cb6

Browse files
committed
Release candidate of UniversalToon 2.5.0
1 parent 7169cde commit a1e6cb6

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Changelog
22
**Universal Toon Shader [a.k.a. Unity-Chan Toon Shader]**
3+
## [2.5.0] - 2022/02/17
4+
### Added.
5+
- Versions later than URP 10.0.x require the DepthNormals pass.
6+
37
## [2.4.0] - 2022/01/20
4-
* URP:UTS materials don't receive shadows when using newer than Unity 2021.1.
5-
* AutoRenderQueue is canceled when material inspector is unfocused.
8+
- URP:UTS materials don't receive shadows when using newer than Unity 2021.1.
9+
- AutoRenderQueue is canceled when material inspector is unfocused.
610

711
## [2.3.0] - 2021/10/18
812
### Fixed

Editor/UniversalToonGUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace UnityEditor.Rendering.Universal.Toon.ShaderGUI
66
public class UniversalToonGUI : UnityEditor.ShaderGUI
77
{
88
protected const float kVersionX = 2.0f;
9-
protected const float kVersionY = 4.0f;
9+
protected const float kVersionY = 5.0f;
1010
protected const float kVersionZ = 0.0f;
1111

1212
const string ShaderDefineSHADINGGRADEMAP = "_SHADINGGRADEMAP";

Runtime/Shaders/UniversalToon.shader

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//UTS2/UniversalToon
2-
//v.2.3.0
2+
//v.2.5.0
33
//nobuyuki@unity3d.com
44
//toshiyuki@unity3d.com (Universal RP/HDRP)
55
//https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project
@@ -10,7 +10,7 @@ Shader "Universal Render Pipeline/Toon" {
1010
[HideInInspector] _simpleUI("SimpleUI", Int) = 0
1111
// Versioning of material to help for upgrading
1212
[HideInInspector] _utsVersionX("VersionX", Float) = 2
13-
[HideInInspector] _utsVersionY("VersionY", Float) = 4
13+
[HideInInspector] _utsVersionY("VersionY", Float) = 5
1414
[HideInInspector] _utsVersionZ("VersionZ", Float) = 0
1515

1616
[HideInInspector] _utsTechnique("Technique", int) = 0 //DWF
@@ -215,6 +215,7 @@ Shader "Universal Render Pipeline/Toon" {
215215
SubShader {
216216
Tags {
217217
"RenderType"="Opaque"
218+
"RenderPipeline" = "UniversalPipeline"
218219
}
219220
Pass {
220221
Name "Outline"
@@ -403,6 +404,42 @@ Shader "Universal Render Pipeline/Toon" {
403404
#include "Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl"
404405
ENDHLSL
405406
}
407+
// This pass is used when drawing to a _CameraNormalsTexture texture
408+
Pass
409+
{
410+
Name "DepthNormals"
411+
Tags{"LightMode" = "DepthNormals"}
412+
413+
ZWrite On
414+
Cull[_Cull]
415+
416+
HLSLPROGRAM
417+
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Version.hlsl"
418+
#if (VERSION_GREATER_EQUAL(10, 0))
419+
// Required to compile gles 2.0 with standard srp library
420+
#pragma prefer_hlslcc gles
421+
#pragma exclude_renderers d3d11_9x
422+
#pragma target 2.0
423+
424+
#pragma vertex DepthNormalsVertex
425+
#pragma fragment DepthNormalsFragment
426+
427+
// -------------------------------------
428+
// Material Keywords
429+
#pragma shader_feature_local _NORMALMAP
430+
#pragma shader_feature_local _PARALLAXMAP
431+
#pragma shader_feature _ALPHATEST_ON
432+
#pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
433+
434+
//--------------------------------------
435+
// GPU Instancing
436+
#pragma multi_compile_instancing
437+
438+
#include "UniversalToonInput.hlsl"
439+
#include "Packages/com.unity.render-pipelines.universal/Shaders/DepthNormalsPass.hlsl"
440+
#endif
441+
ENDHLSL
442+
}
406443

407444
//ToonCoreEnd
408445
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.unity.universaltoonshader.urp",
33
"displayName": "Universal Toon Shader for URP",
4-
"version": "2.4.0",
4+
"version": "2.5.0",
55
"unity": "2019.3",
66
"description": "Universal Toon Shader(a.k.a Unity-Chan Toon Shader) is a toon shader for images and video that is designed to meet the needs of creators working on cel-shaded 3DCG animations.\nUnlike other pre-render toon shaders, all features can be adjusted in real time on Unity, which is the greatest feature of UTS2.\n\nUTS2 has great power and makes a wide variety of character designs possible, from cel-shaded to light novel illustration styles.\n\nUTS2 has the 3 basic layers of Base Color, 1st Shade Color, and 2nd Shade Color, colors and textures can also accept a wide variety of customization options, such as High Color, Rim Light, MatCap (sphere mapping), and Emissive (light emission).The level of gradation (feather) between colors can also be adjusted in Unity in real-time.",
77
"repository": {

0 commit comments

Comments
 (0)