Skip to content

Commit

Permalink
Merge branch 'dev_20201213'
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteflare committed Dec 12, 2020
2 parents 7881b6a + d1bef6c commit a194c95
Show file tree
Hide file tree
Showing 93 changed files with 4,080 additions and 510 deletions.
29 changes: 29 additions & 0 deletions Editor/WF_Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,27 @@ internal static class WFI18N
{ "[HL] Parallax", "[HL] 視差(Parallax)" },
{ "[HL] Power", "[HL] matcap強度" },
{ "[HL] Mask Texture", "[HL] マスクテクスチャ" },
// Lame
{ "[LM] Color", "[LM] ラメ色" },
{ "[LM] Texture", "[LM] ラメ色テクスチャ" },
{ "[LM] Random Color", "[LM] ランダム色パラメタ" },
{ "[LM] Shape", "[LM] 形状" },
{ "[LM] Scale", "[LM] スケール" },
{ "[LM] Dencity", "[LM] 密度" },
{ "[LM] Glitter", "[LM] きらきら" },
{ "[LM] Dist Fade Start", "[LM] 距離フェード開始" },
{ "[LM] Spot Fade Strength", "[LM] スポットフェード強度" },
{ "[LM] Anim Speed", "[LM] アニメ速度" },
{ "[LM] Mask Texture", "[LM] マスクテクスチャ" },
// ToonShade
{ "[SH] Base Color", "[SH] ベース色" },
{ "[SH] Base Shade Texture", "[SH] ベース色テクスチャ" },
{ "[SH] 1st Shade Color", "[SH] 1影色" },
{ "[SH] 1st Shade Texture", "[SH] 1影色テクスチャ" },
{ "[SH] 2nd Shade Color", "[SH] 2影色" },
{ "[SH] 2nd Shade Texture", "[SH] 2影色テクスチャ" },
{ "[SH] 3rd Shade Color", "[SH] 3影色" },
{ "[SH] 3rd Shade Texture", "[SH] 3影色テクスチャ" },
{ "[SH] Shade Power", "[SH] 影の強度" },
{ "[SH] 1st Border", "[SH] 1影の境界位置" },
{ "[SH] 2nd Border", "[SH] 2影の境界位置" },
Expand Down Expand Up @@ -525,6 +539,13 @@ internal static class WFI18N
{ "[AO] Contrast", "[AO] コントラスト" },
{ "[AO] Brightness", "[AO] 明るさ" },
{ "[AO] Occlusion Mask Texture", "[AO] マスクテクスチャ" },
// Toon Fog
{ "[FG] Color", "[FG] フォグの色" },
{ "[FG] Fog Min Distance", "[FG] フォグが効き始める距離" },
{ "[FG] Fog Max Distance", "[FG] フォグが最大になる距離" },
{ "[FG] Exponential", "[FG] 変化の鋭さ" },
{ "[FG] Base Offset", "[FG] フォグ原点の位置(オフセット)" },
{ "[FG] Scale", "[FG] フォグ範囲のスケール" },
// Lit Advance
{ "Sun Source", "太陽光のモード" },
{ "Custom Sun Azimuth", "カスタム太陽の方角" },
Expand Down Expand Up @@ -737,6 +758,14 @@ internal static class WFShaderNameDictionary
new WFShaderName("UnToon", "Tessellation", "Transparent", "UnlitWF/UnToon_Tessellation/WF_UnToon_Tess_Transparent"),
new WFShaderName("UnToon", "Tessellation", "Transparent3Pass", "UnlitWF/UnToon_Tessellation/WF_UnToon_Tess_Transparent3Pass"),

new WFShaderName("UnToon", "TriShade", "Opaque", "UnlitWF/UnToon_TriShade/WF_UnToon_TriShade_Opaque"),
new WFShaderName("UnToon", "TriShade", "TransCutout", "UnlitWF/UnToon_TriShade/WF_UnToon_TriShade_TransCutout"),
new WFShaderName("UnToon", "TriShade", "Transparent", "UnlitWF/UnToon_TriShade/WF_UnToon_TriShade_Transparent"),
new WFShaderName("UnToon", "TriShade", "Transparent3Pass", "UnlitWF/UnToon_TriShade/WF_UnToon_TriShade_Transparent3Pass"),
new WFShaderName("UnToon", "TriShade", "Transparent_Mask", "UnlitWF/UnToon_TriShade/WF_UnToon_TriShade_Transparent_Mask"),
new WFShaderName("UnToon", "TriShade", "Transparent_MaskOut", "UnlitWF/UnToon_TriShade/WF_UnToon_TriShade_Transparent_MaskOut"),
new WFShaderName("UnToon", "TriShade", "Transparent_MaskOut_Blend", "UnlitWF/UnToon_TriShade/WF_UnToon_TriShade_Transparent_MaskOut_Blend"),

new WFShaderName("FakeFur", "Basic", "TransCutout", "UnlitWF/WF_FakeFur_TransCutout"),
new WFShaderName("FakeFur", "Basic", "Transparent", "UnlitWF/WF_FakeFur_Transparent"),

Expand Down
11 changes: 9 additions & 2 deletions Editor/WF_DebugViewEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,15 @@ public static void ClearDebugOverrideTag(Material mat) {
new DebugMode("Dynamic Lightmap UV", "_ModeUV", 6),
}),
new DebugModeSection("Show Normals", new List<DebugMode>(){
new DebugMode("Normal", "_ModeNormal", 1),
new DebugMode("Tangent", "_ModeNormal", 2),
new DebugMode("Normal (local space)", "_ModeNormal", 1),
new DebugMode("Tangent (local space)", "_ModeNormal", 2),
new DebugMode("BiTangent (local space)", "_ModeNormal", 3),
new DebugMode("Normal (world space)", "_ModeNormal", 4),
new DebugMode("Tangent (world space)", "_ModeNormal", 5),
new DebugMode("BiTangent (world space)", "_ModeNormal", 6),
}),
new DebugModeSection("Show Parallel Normals", new List<DebugMode>(){
new DebugMode("view Parallel Normal and Tangent", "_ModeParaNormal", 1),
}),
new DebugModeSection("Show Lightings", new List<DebugMode>(){
new DebugMode("Light 0", "_ModeLight", 1),
Expand Down
1 change: 1 addition & 0 deletions Editor/WF_ShaderCustomEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class ShaderCustomEditor : ShaderGUI
{ "_TS_3rdColor", "_TS_3rdTex" },
{ "_ES_Color", "_ES_MaskTex" },
{ "_EmissionColor", "_EmissionMap" },
{ "_LM_Color", "_LM_Texture" },
};

delegate void DefaultValueSetter(MaterialProperty prop, MaterialProperty[] properties);
Expand Down
8 changes: 8 additions & 0 deletions Editor/WF_ShaderToolWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,14 @@ internal class CopyPropParameter : ScriptableObject
public bool copyNormal = false;
public bool copyMetallic = false;
public bool copyMatcap = false;
public bool copyLame = false;
public bool copyToonShade = false;
public bool copyRimLight = false;
public bool copyDecal = false;
public bool copyEmissive = false;
public bool copyOcclusion = false;
public bool copyOutline = false;
public bool copyToonFog = false;
public bool copyLit = false;
public bool copyTessellation = false;
}
Expand Down Expand Up @@ -456,6 +458,8 @@ private void OnGUI() {
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::Metallic");
prop = so.FindProperty("copyMatcap");
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::Light Matcap");
prop = so.FindProperty("copyLame");
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::Lame");
prop = so.FindProperty("copyToonShade");
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::ToonShade");
prop = so.FindProperty("copyRimLight");
Expand All @@ -468,6 +472,8 @@ private void OnGUI() {
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::Ambient Occlusion");
prop = so.FindProperty("copyOutline");
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::Outline");
prop = so.FindProperty("copyToonFog");
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::Toon Fog");
prop = so.FindProperty("copyLit");
prop.boolValue = GUILayout.Toggle(prop.boolValue, "UnToon::Lit & Lit Advance");
prop = so.FindProperty("copyTessellation");
Expand Down Expand Up @@ -699,12 +705,14 @@ public void CopyProperties(CopyPropParameter param) {
if (param.copyEmissive) { copy_target.Add("ES"); }
if (param.copyLit) { copy_target.Add("GL"); }
if (param.copyMatcap) { copy_target.Add("HL"); }
if (param.copyLame) { copy_target.Add("LM"); }
if (param.copyMetallic) { copy_target.Add("MT"); }
if (param.copyNormal) { copy_target.Add("NM"); }
if (param.copyOcclusion) { copy_target.Add("AO"); }
if (param.copyOutline) { copy_target.Add("TL"); }
if (param.copyRimLight) { copy_target.Add("TR"); }
if (param.copyToonShade) { copy_target.Add("TS"); }
if (param.copyToonFog) { copy_target.Add("FG"); }
if (param.copyTessellation) { copy_target.Add("TE"); }

foreach (var src_prop in ShaderMaterialProperty.AsList(param.materialSource)) {
Expand Down
10 changes: 5 additions & 5 deletions Shaders/URP/Unlit_WF_URP_Gem_Opaque.shader
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Shader "UnlitWF_URP/WF_Gem_Opaque" {

/*
* authors:
* ver:2020/11/19 whiteflare,
* ver:2020/12/13 whiteflare,
*/

Properties {
Expand Down Expand Up @@ -51,8 +51,8 @@ Shader "UnlitWF_URP/WF_Gem_Opaque" {
_GR_Cubemap ("[GR] CubeMap", Cube) = "" {}
_GR_Brightness ("[GR] Brightness", Range(0, 1)) = 0
_GR_Monochrome ("[GR] Monochrome Reflection", Range(0, 1)) = 1
[PowerSlider(4.0)]
_GR_CubemapPower ("[GR] 2nd CubeMap Power", Range(0, 16)) = 1
_GR_CubemapPower ("[GR] 2nd CubeMap Power", Range(0, 2)) = 1
_GR_CubemapHighCut ("[GR] 2nd CubeMap Hi-Cut Filter", Range(0, 1)) = 0
_GR_BlendNormal ("[GR] Blend Normal", Range(0, 1)) = 0.1

// 法線マップ
Expand Down Expand Up @@ -105,8 +105,8 @@ Shader "UnlitWF_URP/WF_Gem_Opaque" {

#pragma target 3.0

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _NM_ENABLE
#define _VC_ENABLE
Expand Down Expand Up @@ -150,8 +150,8 @@ Shader "UnlitWF_URP/WF_Gem_Opaque" {
#pragma vertex vert_depth
#pragma fragment frag_depth

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _VC_ENABLE

Expand Down
14 changes: 7 additions & 7 deletions Shaders/URP/Unlit_WF_URP_Gem_Transparent.shader
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Shader "UnlitWF_URP/WF_Gem_Transparent" {

/*
* authors:
* ver:2020/11/19 whiteflare,
* ver:2020/12/13 whiteflare,
*/

Properties {
Expand Down Expand Up @@ -52,8 +52,8 @@ Shader "UnlitWF_URP/WF_Gem_Transparent" {
_GR_Cubemap ("[GR] CubeMap", Cube) = "" {}
_GR_Brightness ("[GR] Brightness", Range(0, 1)) = 0
_GR_Monochrome ("[GR] Monochrome Reflection", Range(0, 1)) = 1
[PowerSlider(4.0)]
_GR_CubemapPower ("[GR] 2nd CubeMap Power", Range(0, 16)) = 1
_GR_CubemapPower ("[GR] 2nd CubeMap Power", Range(0, 2)) = 1
_GR_CubemapHighCut ("[GR] 2nd CubeMap Hi-Cut Filter", Range(0, 1)) = 0
_GR_BlendNormal ("[GR] Blend Normal", Range(0, 1)) = 0.1

// Alpha
Expand Down Expand Up @@ -124,11 +124,10 @@ Shader "UnlitWF_URP/WF_Gem_Transparent" {

#pragma target 3.0

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_FRESNEL
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AL_ENABLE
#define _AL_FRESNEL_ENABLE
#define _NM_ENABLE
#define _VC_ENABLE

Expand Down Expand Up @@ -171,8 +170,9 @@ Shader "UnlitWF_URP/WF_Gem_Transparent" {
#pragma vertex vert_depth
#pragma fragment frag_depth

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_BLEND
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _VC_ENABLE

Expand Down
10 changes: 5 additions & 5 deletions Shaders/URP/Unlit_WF_URP_UnToon_Mobile_Opaque.shader
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_Opaque" {

/*
* authors:
* ver:2020/11/19 whiteflare,
* ver:2020/12/13 whiteflare,
*/

Properties {
Expand Down Expand Up @@ -170,8 +170,8 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_Opaque" {

#pragma target 3.0

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AO_ENABLE
#define _ES_ENABLE
Expand Down Expand Up @@ -222,8 +222,8 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_Opaque" {
#pragma vertex vert_depth
#pragma fragment frag_depth

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _VC_ENABLE

Expand All @@ -249,8 +249,8 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_Opaque" {
#pragma vertex vert_shadow
#pragma fragment frag_shadow

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _VC_ENABLE

Expand All @@ -275,8 +275,8 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_Opaque" {
#pragma vertex vert_meta
#pragma fragment frag_meta

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _VC_ENABLE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_OutlineOnly_Opaque" {

/*
* authors:
* ver:2020/11/19 whiteflare,
* ver:2020/12/13 whiteflare,
*/

Properties {
Expand Down Expand Up @@ -92,8 +92,8 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_OutlineOnly_Opaque" {

#pragma target 3.0

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _TL_ENABLE
#define _VC_ENABLE
Expand Down Expand Up @@ -137,8 +137,8 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_OutlineOnly_Opaque" {
#pragma vertex vert_outline
#pragma fragment frag

#define _WF_PLATFORM_LWRP
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _TL_ENABLE
#define _VC_ENABLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_OutlineOnly_TransCutout" {

/*
* authors:
* ver:2020/11/19 whiteflare,
* ver:2020/12/13 whiteflare,
*/

Properties {
Expand Down Expand Up @@ -104,11 +104,10 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_OutlineOnly_TransCutout" {

#pragma target 3.0

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_CUTOUT
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AL_ENABLE
#define _AL_CUTOUT
#define _TL_ENABLE
#define _VC_ENABLE

Expand Down Expand Up @@ -151,11 +150,10 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_OutlineOnly_TransCutout" {
#pragma vertex vert_outline
#pragma fragment frag

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_CUTOUT
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AL_ENABLE
#define _AL_CUTOUT
#define _TL_ENABLE
#define _VC_ENABLE

Expand Down
22 changes: 9 additions & 13 deletions Shaders/URP/Unlit_WF_URP_UnToon_Mobile_TransCutout.shader
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_TransCutout" {

/*
* authors:
* ver:2020/11/19 whiteflare,
* ver:2020/12/13 whiteflare,
*/

Properties {
Expand Down Expand Up @@ -173,11 +173,10 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_TransCutout" {

#pragma target 3.0

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_CUTOUT
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AL_ENABLE
#define _AL_CUTOUT
#define _AO_ENABLE
#define _ES_ENABLE
#define _ES_SIMPLE_ENABLE
Expand Down Expand Up @@ -227,11 +226,10 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_TransCutout" {
#pragma vertex vert_depth
#pragma fragment frag_depth

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_CUTOUT
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AL_ENABLE
#define _AL_CUTOUT
#define _VC_ENABLE

#pragma multi_compile_fog
Expand All @@ -256,11 +254,10 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_TransCutout" {
#pragma vertex vert_shadow
#pragma fragment frag_shadow

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_CUTOUT
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AL_ENABLE
#define _AL_CUTOUT
#define _VC_ENABLE

#pragma multi_compile_instancing
Expand All @@ -284,11 +281,10 @@ Shader "UnlitWF_URP/UnToon_Mobile/WF_UnToon_Mobile_TransCutout" {
#pragma vertex vert_meta
#pragma fragment frag_meta

#define _WF_PLATFORM_LWRP
#define _WF_ALPHA_CUTOUT
#define _WF_MOBILE
#define _WF_PLATFORM_LWRP

#define _AL_ENABLE
#define _AL_CUTOUT
#define _VC_ENABLE

#include "../WF_INPUT_UnToon.cginc"
Expand Down
Loading

0 comments on commit a194c95

Please sign in to comment.