Skip to content

Commit

Permalink
version 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
izayoijiichan committed Jan 18, 2024
1 parent b5ace9c commit 789d5f6
Show file tree
Hide file tree
Showing 257 changed files with 2,755 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [1.7.0] - 2024-01-18

- Features
- lilToon version 1.7.0 is now supported.

## [1.6.0] - 2024-01-06

- Features
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ___
|1.5.1|37|
|1.5.2|38|
|1.6.0|39|
|1.7.0|40|
|1.7.1|41|
|1.7.2|42|

## Shaders

Expand Down Expand Up @@ -140,6 +143,7 @@ Used to specify a specific version.

|Scripting Define Symbols|description|
|:---|:---|
|LILTOON_1_7_0_OR_NEWER|Define when using lilToon version 1.7.0 or higher.|
|LILTOON_1_6_0_OR_NEWER|Define when using lilToon version 1.6.0 or higher.|
|LILTOON_1_5_0_OR_NEWER|Define when using lilToon version 1.5.0 or higher.|
|LILTOON_1_4_0_OR_NEWER|Define when using lilToon version 1.4.0 or higher.|
Expand Down Expand Up @@ -204,7 +208,7 @@ public void OneMethod()
[lilToon](https://lilxyzw.github.io/lilToon)

___
Last updated: 6 Jan, 2024
Last updated: 18 Jan, 2024
Editor: Izayoi Jiichan

*Copyright (C) 2022 Izayoi Jiichan. All Rights Reserved.*
49 changes: 46 additions & 3 deletions Runtime/Accessors/LilToonMaterialGetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// @Namespace : LilToonShader
// @Class : LilToonMaterialGetter
// ----------------------------------------------------------------------
#if !LILTOON_1_2_12_OR_OLDER && !LILTOON_1_3_0_OR_NEWER && !LILTOON_1_4_0_OR_NEWER && !LILTOON_1_5_0_OR_NEWER && !LILTOON_1_6_0_OR_NEWER
#define LILTOON_1_6_0_OR_NEWER
#if !LILTOON_1_2_12_OR_OLDER && !LILTOON_1_3_0_OR_NEWER && !LILTOON_1_4_0_OR_NEWER && !LILTOON_1_5_0_OR_NEWER && !LILTOON_1_6_0_OR_NEWER && !LILTOON_1_7_0_OR_NEWER
#define LILTOON_1_7_0_OR_NEWER
#endif
#nullable enable
namespace LilToonShader
Expand All @@ -12,7 +12,9 @@ namespace LilToonShader
using LilToonShader.Extensions;
using LilToonShader.Proxies;

#if LILTOON_1_6_0_OR_NEWER
#if LILTOON_1_7_0_OR_NEWER
using LilToonShader.v1_7_0;
#elif LILTOON_1_6_0_OR_NEWER
using LilToonShader.v1_6_0;
#elif LILTOON_1_5_0_OR_NEWER
using LilToonShader.v1_5_0;
Expand Down Expand Up @@ -179,6 +181,9 @@ public virtual LilToonNormalPropertyEntity GetLilToonNormalPropertyEntity(Materi
Dissolve = GetLilDissolvePropertyValues(material),
#if LILTOON_1_4_0_OR_NEWER
IDMask = GetLilIDMaskPropertyValues(material), // v1.4.0
#endif
#if LILTOON_1_7_0_OR_NEWER
UdimDiscard = GetLilUdimDiscardPropertyValues(material), // v1.7.0
#endif
Encryption = GetLilEncryptionPropertyValues(material),
Refraction = GetLilRefractionPropertyValues(material, propertyContainer.IsRefraction, propertyContainer.IsGem),
Expand Down Expand Up @@ -1347,6 +1352,44 @@ public virtual LilIDMask GetLilIDMaskPropertyValues(Material material)
#endif
#endregion

#region UDIM Discard

#if LILTOON_1_7_0_OR_NEWER
/// <summary>
/// Get the lilToon UDIM Discard property values from the material.
/// </summary>
/// <param name="material">A lilToon material.</param>
/// <returns></returns>
public virtual LilUdimDiscard GetLilUdimDiscardPropertyValues(Material material)
{
var materialProxy = new LilUdimDiscardMaterialProxy(material);

return new LilUdimDiscard
{
UDIMDiscardCompile = materialProxy.UDIMDiscardCompile, // v1.7.0
UDIMDiscardUV = materialProxy.UDIMDiscardUV, // v1.7.0
UDIMDiscardMode = materialProxy.UDIMDiscardMode, // v1.7.0
UDIMDiscardRow3_3 = materialProxy.UDIMDiscardRow3_3, // v1.7.0
UDIMDiscardRow3_2 = materialProxy.UDIMDiscardRow3_2, // v1.7.0
UDIMDiscardRow3_1 = materialProxy.UDIMDiscardRow3_1, // v1.7.0
UDIMDiscardRow3_0 = materialProxy.UDIMDiscardRow3_0, // v1.7.0
UDIMDiscardRow2_3 = materialProxy.UDIMDiscardRow2_3, // v1.7.0
UDIMDiscardRow2_2 = materialProxy.UDIMDiscardRow2_2, // v1.7.0
UDIMDiscardRow2_1 = materialProxy.UDIMDiscardRow2_1, // v1.7.0
UDIMDiscardRow2_0 = materialProxy.UDIMDiscardRow2_0, // v1.7.0
UDIMDiscardRow1_3 = materialProxy.UDIMDiscardRow1_3, // v1.7.0
UDIMDiscardRow1_2 = materialProxy.UDIMDiscardRow1_2, // v1.7.0
UDIMDiscardRow1_1 = materialProxy.UDIMDiscardRow1_1, // v1.7.0
UDIMDiscardRow1_0 = materialProxy.UDIMDiscardRow1_0, // v1.7.0
UDIMDiscardRow0_3 = materialProxy.UDIMDiscardRow0_3, // v1.7.0
UDIMDiscardRow0_2 = materialProxy.UDIMDiscardRow0_2, // v1.7.0
UDIMDiscardRow0_1 = materialProxy.UDIMDiscardRow0_1, // v1.7.0
UDIMDiscardRow0_0 = materialProxy.UDIMDiscardRow0_0, // v1.7.0
};
}
#endif
#endregion

#region Encryption

/// <summary>
Expand Down
55 changes: 52 additions & 3 deletions Runtime/Accessors/LilToonMaterialSetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// @Namespace : LilToonShader
// @Class : LilToonMaterialSetter
// ----------------------------------------------------------------------
#if !LILTOON_1_2_12_OR_OLDER && !LILTOON_1_3_0_OR_NEWER && !LILTOON_1_4_0_OR_NEWER && !LILTOON_1_5_0_OR_NEWER && !LILTOON_1_6_0_OR_NEWER
#define LILTOON_1_6_0_OR_NEWER
#if !LILTOON_1_2_12_OR_OLDER && !LILTOON_1_3_0_OR_NEWER && !LILTOON_1_4_0_OR_NEWER && !LILTOON_1_5_0_OR_NEWER && !LILTOON_1_6_0_OR_NEWER && !LILTOON_1_7_0_OR_NEWER
#define LILTOON_1_7_0_OR_NEWER
#endif
#nullable enable
namespace LilToonShader
Expand All @@ -13,7 +13,9 @@ namespace LilToonShader
using LilToonShader.Extensions;
using LilToonShader.Proxies;

#if LILTOON_1_6_0_OR_NEWER
#if LILTOON_1_7_0_OR_NEWER
using LilToonShader.v1_7_0;
#elif LILTOON_1_6_0_OR_NEWER
using LilToonShader.v1_6_0;
#elif LILTOON_1_5_0_OR_NEWER
using LilToonShader.v1_5_0;
Expand Down Expand Up @@ -250,6 +252,12 @@ public virtual void SetLilToonNormalPropertyEntity(Material material, LilToonPro
// ID Mask
SetLilIDMaskPropertyValues(material, normalPropertyEntity.IDMask); // v1.4.0
#endif

#if LILTOON_1_7_0_OR_NEWER
// UDIM Discard
SetLilUdimDiscardPropertyValues(material, normalPropertyEntity.UdimDiscard); // v1.7.0
#endif

// Encryption
SetLilEncryptionPropertyValues(material, normalPropertyEntity.Encryption);

Expand Down Expand Up @@ -1641,6 +1649,47 @@ public virtual void SetLilIDMaskPropertyValues(Material material, ILilIDMask? pr
#endif
#endregion

#region UDIM Discard

#if LILTOON_1_7_0_OR_NEWER
/// <summary>
/// Set the lilToon UDIM Discard property values to the material.
/// </summary>
/// <param name="material">A lilToon material.</param>
/// <param name="propertyBlock"></param>
public virtual void SetLilUdimDiscardPropertyValues(Material material, ILilUdimDiscard? propertyBlock)
{
if (propertyBlock is null)
{
return;
}

_ = new LilUdimDiscardMaterialProxy(material)
{
UDIMDiscardCompile = propertyBlock.UDIMDiscardCompile, // v1.7.0
UDIMDiscardUV = propertyBlock.UDIMDiscardUV, // v1.7.0
UDIMDiscardMode = propertyBlock.UDIMDiscardMode, // v1.7.0
UDIMDiscardRow3_3 = propertyBlock.UDIMDiscardRow3_3, // v1.7.0
UDIMDiscardRow3_2 = propertyBlock.UDIMDiscardRow3_2, // v1.7.0
UDIMDiscardRow3_1 = propertyBlock.UDIMDiscardRow3_1, // v1.7.0
UDIMDiscardRow3_0 = propertyBlock.UDIMDiscardRow3_0, // v1.7.0
UDIMDiscardRow2_3 = propertyBlock.UDIMDiscardRow2_3, // v1.7.0
UDIMDiscardRow2_2 = propertyBlock.UDIMDiscardRow2_2, // v1.7.0
UDIMDiscardRow2_1 = propertyBlock.UDIMDiscardRow2_1, // v1.7.0
UDIMDiscardRow2_0 = propertyBlock.UDIMDiscardRow2_0, // v1.7.0
UDIMDiscardRow1_3 = propertyBlock.UDIMDiscardRow1_3, // v1.7.0
UDIMDiscardRow1_2 = propertyBlock.UDIMDiscardRow1_2, // v1.7.0
UDIMDiscardRow1_1 = propertyBlock.UDIMDiscardRow1_1, // v1.7.0
UDIMDiscardRow1_0 = propertyBlock.UDIMDiscardRow1_0, // v1.7.0
UDIMDiscardRow0_3 = propertyBlock.UDIMDiscardRow0_3, // v1.7.0
UDIMDiscardRow0_2 = propertyBlock.UDIMDiscardRow0_2, // v1.7.0
UDIMDiscardRow0_1 = propertyBlock.UDIMDiscardRow0_1, // v1.7.0
UDIMDiscardRow0_0 = propertyBlock.UDIMDiscardRow0_0, // v1.7.0
};
}
#endif
#endregion

#region Encryption

/// <summary>
Expand Down
8 changes: 5 additions & 3 deletions Runtime/Accessors/LtsUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// @Namespace : LilToonShader
// @Class : LtsUtility
// ----------------------------------------------------------------------
#if !LILTOON_1_2_12_OR_OLDER && !LILTOON_1_3_0_OR_NEWER && !LILTOON_1_4_0_OR_NEWER && !LILTOON_1_5_0_OR_NEWER && !LILTOON_1_6_0_OR_NEWER
#define LILTOON_1_6_0_OR_NEWER
#if !LILTOON_1_2_12_OR_OLDER && !LILTOON_1_3_0_OR_NEWER && !LILTOON_1_4_0_OR_NEWER && !LILTOON_1_5_0_OR_NEWER && !LILTOON_1_6_0_OR_NEWER && !LILTOON_1_7_0_OR_NEWER
#define LILTOON_1_7_0_OR_NEWER
#endif
#nullable enable
namespace LilToonShader
Expand All @@ -12,7 +12,9 @@ namespace LilToonShader
using UnityEngine.Rendering;
using LilToonShader.Extensions;

#if LILTOON_1_6_0_OR_NEWER
#if LILTOON_1_7_0_OR_NEWER
using LilToonShader.v1_7_0;
#elif LILTOON_1_6_0_OR_NEWER
using LilToonShader.v1_6_0;
#elif LILTOON_1_5_0_OR_NEWER
using LilToonShader.v1_5_0;
Expand Down
80 changes: 80 additions & 0 deletions Runtime/Constants/PropertyName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,86 @@ public class PropertyName

#endregion

#region UDIM Discard

/// <summary>UDIM Discard Compile</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardCompile = "_UDIMDiscardCompile";

/// <summary>UDIM Discard UV</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardUV = "_UDIMDiscardUV";

/// <summary>UDIM Discard Mode</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardMode = "_UDIMDiscardMode";

/// <summary>UDIM Discard Row 3-3</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow3_3 = "_UDIMDiscardRow3_3";

/// <summary>UDIM Discard Row 3-2</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow3_2 = "_UDIMDiscardRow3_2";

/// <summary>UDIM Discard Row 3-1</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow3_1 = "_UDIMDiscardRow3_1";

/// <summary>UDIM Discard Row 3-0</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow3_0 = "_UDIMDiscardRow3_0";

/// <summary>UDIM Discard Row 2-3</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow2_3 = "_UDIMDiscardRow2_3";

/// <summary>UDIM Discard Row 2-2</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow2_2 = "_UDIMDiscardRow2_2";

/// <summary>UDIM Discard Row 2-1</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow2_1 = "_UDIMDiscardRow2_1";

/// <summary>UDIM Discard Row 2-0</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow2_0 = "_UDIMDiscardRow2_0";

/// <summary>UDIM Discard Row 1-3</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow1_3 = "_UDIMDiscardRow1_3";

/// <summary>UDIM Discard Row 1-2</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow1_2 = "_UDIMDiscardRow1_2";

/// <summary>UDIM Discard Row 1-1</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow1_1 = "_UDIMDiscardRow1_1";

/// <summary>UDIM Discard Row 1-0</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow1_0 = "_UDIMDiscardRow1_0";

/// <summary>UDIM Discard Row 0-3</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow0_3 = "_UDIMDiscardRow0_3";

/// <summary>UDIM Discard Row 0-2</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow0_2 = "_UDIMDiscardRow0_2";

/// <summary>UDIM Discard Row 0-1</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow0_1 = "_UDIMDiscardRow0_1";

/// <summary>UDIM Discard Row 0-0</summary>
/// <remarks>v1.7.0 added</remarks>
public const string UDIMDiscardRow0_0 = "_UDIMDiscardRow0_0";

#endregion

#region Encryption

/// <summary>Ignore Encryption</summary>
Expand Down
80 changes: 80 additions & 0 deletions Runtime/Constants/PropertyNameID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,86 @@ public class PropertyNameID

#endregion

#region UDIM Discard

/// <summary>UDIM Discard Compile</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardCompile = Shader.PropertyToID(PropertyName.UDIMDiscardCompile);

/// <summary>UDIM Discard UV</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardUV = Shader.PropertyToID(PropertyName.UDIMDiscardUV);

/// <summary>UDIM Discard Mode</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardMode = Shader.PropertyToID(PropertyName.UDIMDiscardMode);

/// <summary>UDIM Discard Row 3-3</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow3_3 = Shader.PropertyToID(PropertyName.UDIMDiscardRow3_3);

/// <summary>UDIM Discard Row 3-2</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow3_2 = Shader.PropertyToID(PropertyName.UDIMDiscardRow3_2);

/// <summary>UDIM Discard Row 3-1</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow3_1 = Shader.PropertyToID(PropertyName.UDIMDiscardRow3_1);

/// <summary>UDIM Discard Row 3-0</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow3_0 = Shader.PropertyToID(PropertyName.UDIMDiscardRow3_0);

/// <summary>UDIM Discard Row 2-3</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow2_3 = Shader.PropertyToID(PropertyName.UDIMDiscardRow2_3);

/// <summary>UDIM Discard Row 2-2</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow2_2 = Shader.PropertyToID(PropertyName.UDIMDiscardRow2_2);

/// <summary>UDIM Discard Row 2-1</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow2_1 = Shader.PropertyToID(PropertyName.UDIMDiscardRow2_1);

/// <summary>UDIM Discard Row 2-0</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow2_0 = Shader.PropertyToID(PropertyName.UDIMDiscardRow2_0);

/// <summary>UDIM Discard Row 1-3</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow1_3 = Shader.PropertyToID(PropertyName.UDIMDiscardRow1_3);

/// <summary>UDIM Discard Row 1-2</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow1_2 = Shader.PropertyToID(PropertyName.UDIMDiscardRow1_2);

/// <summary>UDIM Discard Row 1-1</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow1_1 = Shader.PropertyToID(PropertyName.UDIMDiscardRow1_1);

/// <summary>UDIM Discard Row 1-0</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow1_0 = Shader.PropertyToID(PropertyName.UDIMDiscardRow1_0);

/// <summary>UDIM Discard Row 0-3</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow0_3 = Shader.PropertyToID(PropertyName.UDIMDiscardRow0_3);

/// <summary>UDIM Discard Row 0-2</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow0_2 = Shader.PropertyToID(PropertyName.UDIMDiscardRow0_2);

/// <summary>UDIM Discard Row 0-1</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow0_1 = Shader.PropertyToID(PropertyName.UDIMDiscardRow0_1);

/// <summary>UDIM Discard Row 0-0</summary>
/// <remarks>v1.7.0 added</remarks>
public static readonly int UDIMDiscardRow0_0 = Shader.PropertyToID(PropertyName.UDIMDiscardRow0_0);

#endregion

#region Encryption

/// <summary>Ignore Encryption</summary>
Expand Down
Loading

0 comments on commit 789d5f6

Please sign in to comment.