Skip to content

Commit

Permalink
Merge branch 'head_unity2019'
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteflare committed Jan 28, 2025
2 parents 527b784 + b8024d1 commit cc7138d
Show file tree
Hide file tree
Showing 132 changed files with 809 additions and 487 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Change Log

## 2025/01/28 (2.7.0)
https://github.com/whiteflare/Unlit_WF_ShaderSuite/releases/tag/UnlitWF_Shader_20250128

### Added
- Shader
- SDFテクスチャを使用して影を付ける機能を追加しました。

### Changed
- Shader
- ToonShade のフェードアウト距離(Min)初期値を `1.0` から `2.0` に調整しました。
- GUI
- GemのデフォルトをTransparentからOpaqueに変更しました。

----

## 2024/12/17 (2.6.1)
https://github.com/whiteflare/Unlit_WF_ShaderSuite/releases/tag/UnlitWF_Shader_20241217

Expand Down
2 changes: 1 addition & 1 deletion Editor/WFEditorSetting.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WFMaterialTemplate.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WFMaterialValidator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_AutoMigrationPostprocessor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_Common.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_DebugViewEditor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
18 changes: 13 additions & 5 deletions Editor/WF_Dictionary.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -105,8 +105,8 @@ static class WFShaderDictionary
// Gem 系列
// ================

new WFShaderName("BRP", "Gem", "Basic", "Opaque", "UnlitWF/WF_Gem_Opaque"),
new WFShaderName("BRP", "Gem", "Basic", "Transparent", "UnlitWF/WF_Gem_Transparent", represent: true),
new WFShaderName("BRP", "Gem", "Basic", "Opaque", "UnlitWF/WF_Gem_Opaque", represent: true),
new WFShaderName("BRP", "Gem", "Basic", "Transparent", "UnlitWF/WF_Gem_Transparent"),

// ================
// Grass 系列
Expand Down Expand Up @@ -180,8 +180,8 @@ static class WFShaderDictionary
// Gem 系列(URP)
// ================

new WFShaderName("URP", "Gem", "Basic", "Opaque", "UnlitWF_URP/WF_Gem_Opaque"),
new WFShaderName("URP", "Gem", "Basic", "Transparent", "UnlitWF_URP/WF_Gem_Transparent", represent: true),
new WFShaderName("URP", "Gem", "Basic", "Opaque", "UnlitWF_URP/WF_Gem_Opaque", represent: true),
new WFShaderName("URP", "Gem", "Basic", "Transparent", "UnlitWF_URP/WF_Gem_Transparent"),

// ================
// Water 系列(URP)
Expand Down Expand Up @@ -398,6 +398,9 @@ private static bool HasPropertyPrefix(Material mat, string prefix)
new WFCustomKeywordSettingEnum("_MT_CubemapType", "_", "_", "_MT_ONLY2ND_ENABLE") {
enablePropName = "_MT_Enable",
},
new WFCustomKeywordSettingEnum("_TS_MaskType", "_", "_TS_SDF_ENABLE") {
enablePropName = "_TS_Enable",
},
new WFCustomKeywordSettingEnum("_TS_Steps", "_", "_TS_STEP1_ENABLE", "_TS_STEP2_ENABLE", "_TS_STEP3_ENABLE") {
enablePropName = "_TS_Enable",
},
Expand Down Expand Up @@ -633,8 +636,11 @@ private static Dictionary<string, WFCustomKeywordSetting> ToWFCustomKeywordSetti
new WFI18NTranslation("TS", "1st Feather", "1影の境界ぼかし強度"),
new WFI18NTranslation("TS", "2nd Feather", "2影の境界ぼかし強度"),
new WFI18NTranslation("TS", "3rd Feather", "3影の境界ぼかし強度"),
new WFI18NTranslation("TS", "Mask Type", "マスクの種類"),
new WFI18NTranslation("TS", "Anti-Shadow Mask Texture", "アンチシャドウマスク"),
new WFI18NTranslation("TS", "Anti-Shadow Mask Texture (R)", "アンチシャドウマスク (R)"),
new WFI18NTranslation("TS", "SDF Texture", "SDFテクスチャ"),
new WFI18NTranslation("TS", "SDF Texture (RG)", "SDFテクスチャ (RG)"),
new WFI18NTranslation("TS", "Shade Color Suggest", "影色を自動設定する"),
new WFI18NTranslation("TS", "Align the boundaries equally", "境界を等間隔に整列"),
new WFI18NTranslation("TS", "Dont Ajust Contrast", "影コントラストを調整しない"),
Expand Down Expand Up @@ -898,6 +904,7 @@ private static Dictionary<string, WFCustomKeywordSetting> ToWFCustomKeywordSetti
new WFI18NTranslation(WFMessageText.PlzDeprecatedFeature, "今後削除される予定の機能がマテリアルから使用されています。"),

new WFI18NTranslation(WFMessageText.PsAntiShadowMask, "アンチシャドウマスクにはアバターの顔を白く塗ったマスクテクスチャを指定してください。マスク反転をチェックすることでマテリアル全体を顔とみなすこともできます。"),
new WFI18NTranslation(WFMessageText.PsSdfShadowMask, "SDFシャドウマスクフィールドには、身体の左側から当たる光をRチャンネル、身体の右側から当たる光をGチャンネルに格納した影テクスチャを設定してください。"),
new WFI18NTranslation(WFMessageText.PsCapTypeMedian, "MEDIAN_CAPは灰色を基準とした加算&減算合成を行うmatcapです"),
new WFI18NTranslation(WFMessageText.PsCapTypeLight, "LIGHT_CAPは黒色を基準とした加算合成を行うmatcapです"),
new WFI18NTranslation(WFMessageText.PsCapTypeShade, "SHADE_CAPは白色を基準とした乗算合成を行うmatcapです"),
Expand Down Expand Up @@ -1169,6 +1176,7 @@ static class WFMessageText
public static readonly string PlzQuestSupport = "This material uses a shader that does not support Quest.";
public static readonly string PlzDeprecatedFeature = "Features that will be removed in the future are used from this material.";
public static readonly string PsAntiShadowMask = "In the Anti-Shadow Mask field, specify a mask texture with the avatar face painted white. You can also check the InvertMask checkbox to make the entire material a face.";
public static readonly string PsSdfShadowMask = "In the SDF shadow mask field, set a shadow texture that stores the light hitting from the left side of the body in the R channel and the light hitting from the right side of the body in the G channel.";
public static readonly string PsCapTypeMedian = "MEDIAN_CAP is a matcap that performs gray-based additive and subtractive blending.";
public static readonly string PsCapTypeLight = "LIGHT_CAP is a matcap that performs black-based additive blending.";
public static readonly string PsCapTypeShade = "SHADE_CAP is a matcap that performs white-based multiply blending.";
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_MaterialConverter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_MaterialEditUtility.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_MiscUtil.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_QuestScenePreprocessor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
19 changes: 16 additions & 3 deletions Editor/WF_ShaderCustomEditor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -125,7 +125,12 @@ class ShaderCustomEditor : ShaderGUI
// ZWrite
new ZWriteFrontBackPropertyHook("_AL_ZWrite", "_AL_ZWriteBack"),

// _OL_CustomParam1のディスプレイ名をカスタマイズ
// ディスプレイ名をカスタマイズ
new CustomPropertyHook("_TS_MaskTex", ctx => {
if (IsAnyIntValue(ctx, "_TS_MaskType", p => p == 1)) {
ctx.guiContent = WFI18N.GetGUIContent("TS", "SDF Texture (RG)");
}
}, null, isRegex:false),
new CustomPropertyHook("_OVL_CustomParam1", ctx => {
if (IsAnyIntValue(ctx, "_OVL_UVType", p => p == 3)) {
ctx.guiContent = WFI18N.GetGUIContent("OL", "UV2.y <-> Normal.y");
Expand Down Expand Up @@ -207,7 +212,15 @@ class ShaderCustomEditor : ShaderGUI
new HelpBoxPropertyHook("_CRF_UseDepthTex|_CGL_UseDepthTex", ctx => ctx.current.floatValue == 0 ? null : WFI18N.Translate(WFMessageText.PsCameraDepthTex), MessageType.Info),

// _TS_InvMaskVal の後に説明文を追加する
new HelpBoxPropertyHook("_TS_InvMaskVal", ctx => WFI18N.Translate(WFMessageText.PsAntiShadowMask), MessageType.Info, isRegex:false),
new HelpBoxPropertyHook("_TS_InvMaskVal", ctx => {
if (IsAnyIntValue(ctx, "_TS_MaskType", p => p == 0)) {
return WFI18N.Translate(WFMessageText.PsAntiShadowMask);
}
if (IsAnyIntValue(ctx, "_TS_MaskType", p => p == 1)) {
return WFI18N.Translate(WFMessageText.PsSdfShadowMask);
}
return null;
}, MessageType.Info, isRegex:false),
// _HL_MatcapColor の後に説明文を追加する
new HelpBoxPropertyHook("_HL_MatcapColor(_[0-9]+)?", ctx => {
var name = ctx.current.name.Replace("_MatcapColor", "_CapType");
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_ShaderPreprocessor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_ShaderToolWindow.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion Editor/WF_VersionCheck.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The zlib/libpng License

Copyright 2018-2024 whiteflare.
Copyright 2018-2025 whiteflare.

This software is provided �eas-is�f, without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ UnlitWF/UnToon は、テクスチャをそのまま描画するUnlitシェーダ

The zlib/libpng License

Copyright 2018-2024 whiteflare.
Copyright 2018-2025 whiteflare.

This software is provided ‘as-is’, without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
4 changes: 2 additions & 2 deletions Shaders/Unlit_WF_DebugView.shader
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -67,7 +67,7 @@ Shader "UnlitWF/Debug/WF_DebugView" {

[HideInInspector]
[WF_FixFloat(0.0)]
_CurrentVersion ("2024/12/17 (2.6.1)", Float) = 0
_CurrentVersion ("2025/01/28 (2.7.0)", Float) = 0
[HideInInspector]
[WF_FixFloat(0.0)]
_QuestSupported ("True", Float) = 0
Expand Down
17 changes: 11 additions & 6 deletions Shaders/Unlit_WF_FakeFur_FurOnly_Mix.shader
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
* Copyright 2021 ma1on.
*
* This software is provided ‘as-is’, without any express or implied
Expand Down Expand Up @@ -108,10 +108,9 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_Mix" {
[NoScaleOffset]
_TS_3rdTex ("[TS] 3rd Shade Texture", 2D) = "white" {}
_TS_Power ("[TS] Shade Power", Range(0, 2)) = 1
_TS_MinDist ("[TS] FadeOut Distance (Near)", Range(0, 15)) = 1.0
_TS_MaxDist ("[TS] FadeOut Distance (Far)", Range(0, 15)) = 4.0
[ToggleUI]
_TS_FixContrast ("[TS] Dont Ajust Contrast", Range(0, 1)) = 0
[Header(Shade Mask)]
[Enum(ANTI_SHADE,0,SDF,1)]
_TS_MaskType ("[TS] Mask Type", Float) = 0
[NoScaleOffset]
_TS_MaskTex ("[TS] Anti-Shadow Mask Texture (R)", 2D) = "black" {}
[ToggleUI]
Expand All @@ -123,6 +122,10 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_Mix" {
_TS_1stFeather ("[TS] 1st Feather", Range(0, 0.2)) = 0.05
_TS_2ndFeather ("[TS] 2nd Feather", Range(0, 0.2)) = 0.05
_TS_3rdFeather ("[TS] 3rd Feather", Range(0, 0.2)) = 0.05
_TS_MinDist ("[TS] FadeOut Distance (Near)", Range(0, 15)) = 2.0
_TS_MaxDist ("[TS] FadeOut Distance (Far)", Range(0, 15)) = 4.0
[ToggleUI]
_TS_FixContrast ("[TS] Dont Ajust Contrast", Range(0, 1)) = 0
[ToggleUI]
_TS_DisableBackLit ("[TS] Disable BackLit", Range(0, 1)) = 0

Expand Down Expand Up @@ -172,7 +175,7 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_Mix" {

[HideInInspector]
[WF_FixFloat(0.0)]
_CurrentVersion ("2024/12/17 (2.6.1)", Float) = 0
_CurrentVersion ("2025/01/28 (2.7.0)", Float) = 0
[HideInInspector]
[WF_FixFloat(0.0)]
_VRCFallback ("Hidden", Float) = 0
Expand Down Expand Up @@ -204,6 +207,7 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_Mix" {
#pragma shader_feature_local _ _TS_FIXC_ENABLE
#pragma shader_feature_local _GL_NCC_ENABLE
#pragma shader_feature_local _TS_ENABLE
#pragma shader_feature_local_fragment _ _TS_SDF_ENABLE
#pragma shader_feature_local_fragment _ _TS_STEP1_ENABLE _TS_STEP2_ENABLE _TS_STEP3_ENABLE
#pragma shader_feature_local_fragment _CGR_ENABLE
#pragma shader_feature_local_fragment _CLC_ENABLE
Expand Down Expand Up @@ -237,6 +241,7 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_Mix" {
#pragma shader_feature_local _ _TS_FIXC_ENABLE
#pragma shader_feature_local _GL_NCC_ENABLE
#pragma shader_feature_local _TS_ENABLE
#pragma shader_feature_local_fragment _ _TS_SDF_ENABLE
#pragma shader_feature_local_fragment _ _TS_STEP1_ENABLE _TS_STEP2_ENABLE _TS_STEP3_ENABLE
#pragma shader_feature_local_fragment _CGR_ENABLE
#pragma shader_feature_local_fragment _CLC_ENABLE
Expand Down
16 changes: 10 additions & 6 deletions Shaders/Unlit_WF_FakeFur_FurOnly_TransCutout.shader
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The zlib/libpng License
*
* Copyright 2018-2024 whiteflare.
* Copyright 2018-2025 whiteflare.
*
* This software is provided ‘as-is’, without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -104,10 +104,9 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_TransCutout" {
[NoScaleOffset]
_TS_3rdTex ("[TS] 3rd Shade Texture", 2D) = "white" {}
_TS_Power ("[TS] Shade Power", Range(0, 2)) = 1
_TS_MinDist ("[TS] FadeOut Distance (Near)", Range(0, 15)) = 1.0
_TS_MaxDist ("[TS] FadeOut Distance (Far)", Range(0, 15)) = 4.0
[ToggleUI]
_TS_FixContrast ("[TS] Dont Ajust Contrast", Range(0, 1)) = 0
[Header(Shade Mask)]
[Enum(ANTI_SHADE,0,SDF,1)]
_TS_MaskType ("[TS] Mask Type", Float) = 0
[NoScaleOffset]
_TS_MaskTex ("[TS] Anti-Shadow Mask Texture (R)", 2D) = "black" {}
[ToggleUI]
Expand All @@ -119,6 +118,10 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_TransCutout" {
_TS_1stFeather ("[TS] 1st Feather", Range(0, 0.2)) = 0.05
_TS_2ndFeather ("[TS] 2nd Feather", Range(0, 0.2)) = 0.05
_TS_3rdFeather ("[TS] 3rd Feather", Range(0, 0.2)) = 0.05
_TS_MinDist ("[TS] FadeOut Distance (Near)", Range(0, 15)) = 2.0
_TS_MaxDist ("[TS] FadeOut Distance (Far)", Range(0, 15)) = 4.0
[ToggleUI]
_TS_FixContrast ("[TS] Dont Ajust Contrast", Range(0, 1)) = 0
[ToggleUI]
_TS_DisableBackLit ("[TS] Disable BackLit", Range(0, 1)) = 0

Expand Down Expand Up @@ -168,7 +171,7 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_TransCutout" {

[HideInInspector]
[WF_FixFloat(0.0)]
_CurrentVersion ("2024/12/17 (2.6.1)", Float) = 0
_CurrentVersion ("2025/01/28 (2.7.0)", Float) = 0
[HideInInspector]
[WF_FixFloat(0.0)]
_VRCFallback ("Hidden", Float) = 0
Expand Down Expand Up @@ -200,6 +203,7 @@ Shader "UnlitWF/WF_FakeFur_FurOnly_TransCutout" {
#pragma shader_feature_local _ _TS_FIXC_ENABLE
#pragma shader_feature_local _GL_NCC_ENABLE
#pragma shader_feature_local _TS_ENABLE
#pragma shader_feature_local_fragment _ _TS_SDF_ENABLE
#pragma shader_feature_local_fragment _ _TS_STEP1_ENABLE _TS_STEP2_ENABLE _TS_STEP3_ENABLE
#pragma shader_feature_local_fragment _CGR_ENABLE
#pragma shader_feature_local_fragment _CLC_ENABLE
Expand Down
Loading

0 comments on commit cc7138d

Please sign in to comment.