Skip to content

Commit

Permalink
feat: rimshade
Browse files Browse the repository at this point in the history
  • Loading branch information
lilxyzw committed Dec 31, 2023
1 parent 563a5d0 commit d6f6cb0
Show file tree
Hide file tree
Showing 86 changed files with 705 additions and 10 deletions.
5 changes: 4 additions & 1 deletion Assets/lilToon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.3] - 2023-12-31
## [1.6.0] - 2023-12-31
### Added
- RimShade feature

### Fixed
- AssetPostprocessor not working properly
- Avoid problems caused by incompatibility of shader keywords
Expand Down
5 changes: 4 additions & 1 deletion Assets/lilToon/CHANGELOG_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.3] - 2023-12-31
## [1.6.0] - 2023-12-31
### 追加
- RimShadeを追加

### 修正
- AssetPostprocessorが正しく動作していなかったのを修正
- シェーダーキーワードの非互換による不具合を回避
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -86,6 +87,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down Expand Up @@ -176,6 +178,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local _NORMALMAP
#pragma shader_feature_local EFFECT_BUMP
#pragma shader_feature_local SOURCE_GBUFFER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -87,6 +88,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down Expand Up @@ -235,6 +237,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local _NORMALMAP
#pragma shader_feature_local EFFECT_BUMP
#pragma shader_feature_local SOURCE_GBUFFER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -87,6 +88,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down Expand Up @@ -243,6 +245,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local _NORMALMAP
#pragma shader_feature_local EFFECT_BUMP
#pragma shader_feature_local SOURCE_GBUFFER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -84,6 +85,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down Expand Up @@ -169,6 +171,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local _NORMALMAP
#pragma shader_feature_local EFFECT_BUMP
#pragma shader_feature_local SOURCE_GBUFFER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -86,6 +87,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -87,6 +88,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -86,6 +87,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -80,6 +81,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -88,6 +89,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -89,6 +90,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -88,6 +89,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -82,6 +83,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
10 changes: 10 additions & 0 deletions Assets/lilToon/CustomShaderResources/Properties/Default.lilblock
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@
_ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1
_ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1

//----------------------------------------------------------------------------------------------------------------------
// Rim Shade
[lilToggleLeft] _UseRimShade ("RimShade", Int) = 0
_RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0)
[NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {}
_RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0
_RimShadeBorder ("sBorder", Range(0, 1)) = 0.5
_RimShadeBlur ("sBlur", Range(0, 1)) = 1.0
[PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0

//----------------------------------------------------------------------------------------------------------------------
// Reflection
[lilToggleLeft] _UseReflection ("sReflection", Int) = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@
_ShadowFlatBorder ("sBorder", Range(-2, 2)) = 1
_ShadowFlatBlur ("sBlur", Range(0.001, 2)) = 1

//----------------------------------------------------------------------------------------------------------------------
// Rim Shade
[lilToggleLeft] _UseRimShade ("RimShade", Int) = 0
_RimShadeColor ("sColor", Color) = (0.5,0.5,0.5,1.0)
[NoScaleOffset] _RimShadeMask ("Mask", 2D) = "white" {}
_RimShadeNormalStrength ("sNormalStrength", Range(0, 1)) = 1.0
_RimShadeBorder ("sBorder", Range(0, 1)) = 0.5
_RimShadeBlur ("sBlur", Range(0, 1)) = 1.0
[PowerSlider(3.0)]_RimShadeFresnelPower ("sFresnelPower", Range(0.01, 50)) = 1.0

//----------------------------------------------------------------------------------------------------------------------
// Reflection
[lilToggleLeft] _UseReflection ("sReflection", Int) = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -88,6 +89,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -89,6 +90,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -88,6 +89,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define LIL_MULTI_INPUTS_MAIN3RD
#define LIL_MULTI_INPUTS_ALPHAMASK
#define LIL_MULTI_INPUTS_SHADOW
#define LIL_MULTI_INPUTS_RIMSHADE
#define LIL_MULTI_INPUTS_BACKLIGHT
#define LIL_MULTI_INPUTS_EMISSION
#define LIL_MULTI_INPUTS_EMISSION_2ND
Expand Down Expand Up @@ -82,6 +83,7 @@
#pragma shader_feature_local _SUNDISK_NONE
#pragma shader_feature_local GEOM_TYPE_FROND
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local AUTO_KEY_VALUE
#pragma shader_feature_local ANTI_FLICKER
#pragma shader_feature_local _EMISSION
#pragma shader_feature_local GEOM_TYPE_BRANCH
Expand Down
1 change: 1 addition & 0 deletions Assets/lilToon/Editor/Resources/lang.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ sAnchorMainColor1 color/maincolor color/maincolor color/maincolor color/maincolo
sAnchorMainColor2 color/maincolor_layer color/maincolor_layer color/maincolor_layer color/maincolor_layer color/maincolor_layer
sAnchorAlphaMask color/alphamask color/alphamask color/alphamask color/alphamask color/alphamask
sAnchorShadow color/shadow color/shadow color/shadow color/shadow color/shadow
sAnchorRimShade color/rimshade color/rimshade color/rimshade color/rimshade color/rimshade
sAnchorEmission color/emission color/emission color/emission color/emission color/emission
sAnchorNormalMap reflections/normal reflections/normal reflections/normal reflections/normal reflections/normal
sAnchorAnisotropy reflections/anisotropy reflections/anisotropy reflections/anisotropy reflections/anisotropy reflections/anisotropy
Expand Down
2 changes: 1 addition & 1 deletion Assets/lilToon/Editor/lilConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace lilToon
{
public class lilConstants
{
public const string currentVersionName = "1.5.3";
public const string currentVersionName = "1.6.0";
public const int currentVersionValue = 39;

internal const string boothURL = "https://lilxyzw.booth.pm/";
Expand Down
1 change: 1 addition & 0 deletions Assets/lilToon/Editor/lilEnumeration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public enum PropertyBlock
MainColor3rd,
AlphaMask,
Shadow,
RimShade,
Emission,
Emission1st,
Emission2nd,
Expand Down
Loading

0 comments on commit d6f6cb0

Please sign in to comment.