Skip to content

Commit c8747fd

Browse files
authored
fix: remove duplicate or unused properties in Toon and Toon(Tessellation) shaders (#561)
Duplicates: * _CullMode * _Color Unused: * _DisplacementMode * _TransmissionEnable * _DisplacementLockObjectScale * _DisplacementLockTilingScale * _DepthOffsetEnable * _DisplacementLockObjectScale
1 parent 11d9c44 commit c8747fd

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

com.unity.toonshader/Runtime/Integrated/Shaders/UnityToon.shader

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
//Unity Toon Shader
2-
//nobuyuki@unity3d.com
3-
//toshiyuki@unity3d.com (Intengrated)
42

53
Shader "Toon" {
64
Properties {
@@ -42,14 +40,6 @@ Shader "Toon" {
4240
_Tweak_transparency("Tweak_transparency", Range(-1, 1)) = 0
4341
// ClippingMask paramaters to Here.
4442

45-
46-
[Enum(OFF,0,FRONT,1,BACK,2)] _CullMode("Cull Mode", int) = 2 //OFF/FRONT/BACK
47-
48-
49-
50-
51-
52-
5343
_MainTex ("BaseMap", 2D) = "white" {}
5444
_BaseMap ("BaseMap", 2D) = "white" {}
5545
_BaseColor ("BaseColor", Color) = (1,1,1,1)
@@ -401,7 +391,6 @@ Shader "Toon" {
401391
[HideInInspector] _AlphaDstBlend("__alphaDst", Float) = 0.0
402392
[HideInInspector][ToggleUI] _ZWrite("__zw", Float) = 1.0
403393
[HideInInspector][ToggleUI] _TransparentZWrite("_TransparentZWrite", Float) = 0.0
404-
[HideInInspector] _CullMode("__cullmode", Float) = 2.0
405394
[HideInInspector] _CullModeForward("__cullmodeForward", Float) = 2.0 // This mode is dedicated to Forward to correctly handle backface then front face rendering thin transparent
406395
[HideInInspector] _TransparentCullMode("_TransparentCullMode", Int) = 2 // Back culling by default
407396
[HideInInspector] _ZTestDepthEqualForOpaque("_ZTestDepthEqualForOpaque", Int) = 4 // Less equal
@@ -427,12 +416,6 @@ Shader "Toon" {
427416
// so we use this enum as "material ID" which can be interpreted as preset of bitfield of material feature
428417
// The only material feature flag that can be added in all cases is clear coat
429418
[Enum(Subsurface Scattering, 0, Standard, 1, Anisotropy, 2, Iridescence, 3, Specular Color, 4, Translucent, 5)] _MaterialID("MaterialId", Int) = 1 // MaterialId.Standard
430-
[ToggleUI] _TransmissionEnable("_TransmissionEnable", Float) = 1.0
431-
432-
[Enum(None, 0, Vertex displacement, 1, Pixel displacement, 2)] _DisplacementMode("DisplacementMode", Int) = 0
433-
[ToggleUI] _DisplacementLockObjectScale("displacement lock object scale", Float) = 1.0
434-
[ToggleUI] _DisplacementLockTilingScale("displacement lock tiling scale", Float) = 1.0
435-
[ToggleUI] _DepthOffsetEnable("Depth Offset View space", Float) = 0.0
436419

437420
[ToggleUI] _EnableGeometricSpecularAA("EnableGeometricSpecularAA", Float) = 0.0
438421
_SpecularAAScreenSpaceVariance("SpecularAAScreenSpaceVariance", Range(0.0, 1.0)) = 0.1
@@ -462,7 +445,6 @@ Shader "Toon" {
462445

463446
// HACK: GI Baking system relies on some properties existing in the shader ("_MainTex", "_Cutoff" and "_Color") for opacity handling, so we need to store our version of those parameters in the hard-coded name the GI baking system recognizes.
464447
//////////// _MainTex("BaseMap", 2D) = "white" {}
465-
_Color("Color", Color) = (1,1,1,1)
466448
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
467449

468450
[ToggleUI] _SupportDecals("Support Decals", Float) = 1.0

com.unity.toonshader/Runtime/Integrated/Shaders/UnityToonTessellation.shader

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
//Unity Toon Shader
2-
//nobuyuki@unity3d.com
3-
//toshiyuki@unity3d.com (Intengrated)
42

53
Shader "Toon(Tessellation)" {
64
Properties {
@@ -42,14 +40,6 @@ Shader "Toon(Tessellation)" {
4240
_Tweak_transparency("Tweak_transparency", Range(-1, 1)) = 0
4341
// ClippingMask paramaters to Here.
4442

45-
46-
[Enum(OFF,0,FRONT,1,BACK,2)] _CullMode("Cull Mode", int) = 2 //OFF/FRONT/BACK
47-
48-
49-
50-
51-
52-
5343
_MainTex ("BaseMap", 2D) = "white" {}
5444
_BaseMap ("BaseMap", 2D) = "white" {}
5545
_BaseColor ("BaseColor", Color) = (1,1,1,1)
@@ -402,7 +392,6 @@ Shader "Toon(Tessellation)" {
402392
[HideInInspector] _AlphaDstBlend("__alphaDst", Float) = 0.0
403393
[HideInInspector][ToggleUI] _ZWrite("__zw", Float) = 1.0
404394
[HideInInspector][ToggleUI] _TransparentZWrite("_TransparentZWrite", Float) = 0.0
405-
[HideInInspector] _CullMode("__cullmode", Float) = 2.0
406395
[HideInInspector] _CullModeForward("__cullmodeForward", Float) = 2.0 // This mode is dedicated to Forward to correctly handle backface then front face rendering thin transparent
407396
[HideInInspector] _TransparentCullMode("_TransparentCullMode", Int) = 2 // Back culling by default
408397
[HideInInspector] _ZTestDepthEqualForOpaque("_ZTestDepthEqualForOpaque", Int) = 4 // Less equal
@@ -428,12 +417,6 @@ Shader "Toon(Tessellation)" {
428417
// so we use this enum as "material ID" which can be interpreted as preset of bitfield of material feature
429418
// The only material feature flag that can be added in all cases is clear coat
430419
[Enum(Subsurface Scattering, 0, Standard, 1, Anisotropy, 2, Iridescence, 3, Specular Color, 4, Translucent, 5)] _MaterialID("MaterialId", Int) = 1 // MaterialId.Standard
431-
[ToggleUI] _TransmissionEnable("_TransmissionEnable", Float) = 1.0
432-
433-
[Enum(None, 0, Vertex displacement, 1, Pixel displacement, 2)] _DisplacementMode("DisplacementMode", Int) = 3
434-
[ToggleUI] _DisplacementLockObjectScale("displacement lock object scale", Float) = 1.0
435-
[ToggleUI] _DisplacementLockTilingScale("displacement lock tiling scale", Float) = 1.0
436-
[ToggleUI] _DepthOffsetEnable("Depth Offset View space", Float) = 0.0
437420

438421
[ToggleUI] _EnableGeometricSpecularAA("EnableGeometricSpecularAA", Float) = 0.0
439422
_SpecularAAScreenSpaceVariance("SpecularAAScreenSpaceVariance", Range(0.0, 1.0)) = 0.1
@@ -472,7 +455,6 @@ Shader "Toon(Tessellation)" {
472455
// TODO: Handle culling mode for backface culling
473456
// HACK: GI Baking system relies on some properties existing in the shader ("_MainTex", "_Cutoff" and "_Color") for opacity handling, so we need to store our version of those parameters in the hard-coded name the GI baking system recognizes.
474457
//////////// _MainTex("BaseMap", 2D) = "white" {}
475-
_Color("Color", Color) = (1,1,1,1)
476458
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
477459

478460
[ToggleUI] _SupportDecals("Support Decals", Float) = 1.0
@@ -482,19 +464,6 @@ Shader "Toon(Tessellation)" {
482464
//////////////////// End of HDRP material default values. ////////////////////
483465
//////////////////////////////////////////////////////////////////////////////
484466

485-
//////////////////////////////////////////////////////////////////////////////
486-
//////////////////// Start of HDRP material tessellation values. /////////////
487-
//////////////////////////////////////////////////////////////////////////////
488-
[ToggleUI] _TransmissionEnable("_TransmissionEnable", Float) = 1.0
489-
490-
[Enum(None, 0, Tessellation displacement, 3)] _DisplacementMode("DisplacementMode", Int) = 3
491-
[ToggleUI] _DisplacementLockObjectScale("displacement lock object scale", Float) = 1.0
492-
[ToggleUI] _DisplacementLockTilingScale("displacement lock tiling scale", Float) = 1.0
493-
[ToggleUI] _DepthOffsetEnable("Depth Offset View space", Float) = 0.0
494-
//////////////////////////////////////////////////////////////////////////////
495-
//////////////////// End of HDRP material tessellation values. /////////////
496-
//////////////////////////////////////////////////////////////////////////////
497-
498467
//////////////////////////////////////////////////////////////////////////////
499468
//////////////////// Start of Legacy material tessellation values. ///////////
500469
//////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)