Modify: 릴툰 1.7.3 버전으로 롤백

This commit is contained in:
DESKTOP-S4BOTN2\user 2025-05-10 23:24:42 +09:00
parent 70b2c3a553
commit f120c4f9ff
116 changed files with 424 additions and 848 deletions

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 64d5c1392c9bac842ad516cef3d16abe guid: 05d1d116436047941ad97d1b9064ee05
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

BIN
Assets/External/lilToon/CHANGELOG.md (Stored with Git LFS) vendored

Binary file not shown.

BIN
Assets/External/lilToon/CHANGELOG_JP.md (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -217,17 +217,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]
@ -257,17 +246,6 @@
{ {
Name "SHADOW_CASTER_OUTLINE" Name "SHADOW_CASTER_OUTLINE"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -218,17 +218,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -316,17 +316,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -111,17 +111,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -217,17 +217,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]
@ -257,17 +246,6 @@
{ {
Name "SHADOW_CASTER_OUTLINE" Name "SHADOW_CASTER_OUTLINE"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -265,17 +265,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]
@ -305,17 +294,6 @@
{ {
Name "SHADOW_CASTER_OUTLINE" Name "SHADOW_CASTER_OUTLINE"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -220,17 +220,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -337,17 +337,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -148,17 +148,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -353,17 +353,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -213,17 +213,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -123,17 +123,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -168,17 +168,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -232,17 +232,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]
@ -272,17 +261,6 @@
{ {
Name "SHADOW_CASTER_OUTLINE" Name "SHADOW_CASTER_OUTLINE"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -285,17 +285,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]
@ -325,17 +314,6 @@
{ {
Name "SHADOW_CASTER_OUTLINE" Name "SHADOW_CASTER_OUTLINE"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -266,17 +266,6 @@
{ {
Name "SHADOW_CASTER" Name "SHADOW_CASTER"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]
@ -306,17 +295,6 @@
{ {
Name "SHADOW_CASTER_OUTLINE" Name "SHADOW_CASTER_OUTLINE"
Tags {"LightMode" = "ShadowCaster"} Tags {"LightMode" = "ShadowCaster"}
Stencil
{
Ref [_StencilRef]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
Comp [_StencilComp]
Pass [_StencilPass]
Fail [_StencilFail]
ZFail [_StencilZFail]
}
Offset 1, 1 Offset 1, 1
Cull [_Cull] Cull [_Cull]

View File

@ -690,9 +690,6 @@
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("Cutout Length", Float) = 0.8 _FurCutoutLength ("Cutout Length", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -46,9 +46,6 @@
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -46,9 +46,6 @@
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

BIN
Assets/External/lilToon/Editor/CurrentRP.txt (Stored with Git LFS) vendored

Binary file not shown.

BIN
Assets/External/lilToon/Editor/Resources/lang.txt (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -6,8 +6,8 @@ namespace lilToon
{ {
public class lilConstants public class lilConstants
{ {
public const string currentVersionName = "1.9.0"; public const string currentVersionName = "1.7.3";
public const int currentVersionValue = 45; public const int currentVersionValue = 43;
internal const string boothURL = "https://lilxyzw.booth.pm/"; internal const string boothURL = "https://lilxyzw.booth.pm/";
internal const string githubURL = "https://github.com/lilxyzw/lilToon"; internal const string githubURL = "https://github.com/lilxyzw/lilToon";

View File

@ -157,7 +157,7 @@ namespace lilToon
loc["sGlitterParams2"] = BuildParams(GetLoc("sBlinkSpeed"), GetLoc("sAngleLimit"), GetLoc("sRimLightDirection"), GetLoc("sColorRandomness")); loc["sGlitterParams2"] = BuildParams(GetLoc("sBlinkSpeed"), GetLoc("sAngleLimit"), GetLoc("sRimLightDirection"), GetLoc("sColorRandomness"));
loc["sOutlineVertexColorUsages"] = BuildParams(GetLoc("sVertexColor"), GetLoc("sNone"), GetLoc("sVertexR2Width"), GetLoc("sVertexRGBA2Normal")); loc["sOutlineVertexColorUsages"] = BuildParams(GetLoc("sVertexColor"), GetLoc("sNone"), GetLoc("sVertexR2Width"), GetLoc("sVertexRGBA2Normal"));
loc["sShadowColorTypes"] = BuildParams(GetLoc("sColorType"), GetLoc("sColorTypeNormal"), GetLoc("sColorTypeLUT")); loc["sShadowColorTypes"] = BuildParams(GetLoc("sColorType"), GetLoc("sColorTypeNormal"), GetLoc("sColorTypeLUT"));
loc["sShadowMaskTypes"] = BuildParams(GetLoc("sMaskType"), GetLoc("sStrength"), GetLoc("sFlat"), "SDF"); loc["sShadowMaskTypes"] = BuildParams(GetLoc("sMaskType"), GetLoc("sStrength"), GetLoc("sFlat"));
loc["sHSVGs"] = BuildParams(GetLoc("sHue"), GetLoc("sSaturation"), GetLoc("sValue"), GetLoc("sGamma")); loc["sHSVGs"] = BuildParams(GetLoc("sHue"), GetLoc("sSaturation"), GetLoc("sValue"), GetLoc("sGamma"));
loc["sScrollRotates"] = BuildParams(GetLoc("sAngle"), GetLoc("sUVAnimation"), GetLoc("sScroll"), GetLoc("sRotate")); loc["sScrollRotates"] = BuildParams(GetLoc("sAngle"), GetLoc("sUVAnimation"), GetLoc("sScroll"), GetLoc("sRotate"));
loc["sDecalAnimations"] = BuildParams(GetLoc("sAnimation"), GetLoc("sXFrames"), GetLoc("sYFrames"), GetLoc("sFrames"), GetLoc("sFPS")); loc["sDecalAnimations"] = BuildParams(GetLoc("sAnimation"), GetLoc("sXFrames"), GetLoc("sYFrames"), GetLoc("sFrames"), GetLoc("sFPS"));
@ -190,7 +190,7 @@ namespace lilToon
sBlendModeList = new[]{GetLoc("sBlendModeNormal"), GetLoc("sBlendModeAdd"), GetLoc("sBlendModeScreen"), GetLoc("sBlendModeMul")}; sBlendModeList = new[]{GetLoc("sBlendModeNormal"), GetLoc("sBlendModeAdd"), GetLoc("sBlendModeScreen"), GetLoc("sBlendModeMul")};
sOutlineVertexColorUsages = BuildParams(GetLoc("sVertexColor"), GetLoc("sNone"), GetLoc("sVertexR2Width"), GetLoc("sVertexRGBA2Normal")); sOutlineVertexColorUsages = BuildParams(GetLoc("sVertexColor"), GetLoc("sNone"), GetLoc("sVertexR2Width"), GetLoc("sVertexRGBA2Normal"));
sShadowColorTypes = BuildParams(GetLoc("sColorType"), GetLoc("sColorTypeNormal"), GetLoc("sColorTypeLUT")); sShadowColorTypes = BuildParams(GetLoc("sColorType"), GetLoc("sColorTypeNormal"), GetLoc("sColorTypeLUT"));
sShadowMaskTypes = BuildParams(GetLoc("sMaskType"), GetLoc("sStrength"), GetLoc("sFlat"), "SDF"); sShadowMaskTypes = BuildParams(GetLoc("sMaskType"), GetLoc("sStrength"), GetLoc("sFlat"));
colorRGBAContent = new GUIContent(GetLoc("sColor"), GetLoc("sTextureRGBA")); colorRGBAContent = new GUIContent(GetLoc("sColor"), GetLoc("sTextureRGBA"));
colorAlphaRGBAContent = new GUIContent(GetLoc("sColorAlpha"), GetLoc("sTextureRGBA")); colorAlphaRGBAContent = new GUIContent(GetLoc("sColorAlpha"), GetLoc("sTextureRGBA"));
maskBlendContent = new GUIContent(GetLoc("sMask"), GetLoc("sBlendR")); maskBlendContent = new GUIContent(GetLoc("sMask"), GetLoc("sBlendR"));

View File

@ -9,7 +9,7 @@ namespace lilToon
internal class lilMaterialProperty internal class lilMaterialProperty
{ {
public MaterialProperty p; public MaterialProperty p;
public HashSet<PropertyBlock> blocks; public List<PropertyBlock> blocks;
public string propertyName; public string propertyName;
public bool isTexture; public bool isTexture;
@ -94,7 +94,7 @@ namespace lilToon
public lilMaterialProperty() public lilMaterialProperty()
{ {
p = null; p = null;
blocks = new HashSet<PropertyBlock>(); blocks = new List<PropertyBlock>();
isTexture = false; isTexture = false;
propertyName = null; propertyName = null;
} }
@ -102,7 +102,7 @@ namespace lilToon
public lilMaterialProperty(string name, params PropertyBlock[] inBrocks) public lilMaterialProperty(string name, params PropertyBlock[] inBrocks)
{ {
p = null; p = null;
blocks = inBrocks.ToHashSet(); blocks = inBrocks.ToList();
isTexture = false; isTexture = false;
propertyName = name; propertyName = name;
} }
@ -110,7 +110,7 @@ namespace lilToon
public lilMaterialProperty(string name, bool isTex, params PropertyBlock[] inBrocks) public lilMaterialProperty(string name, bool isTex, params PropertyBlock[] inBrocks)
{ {
p = null; p = null;
blocks = inBrocks.ToHashSet(); blocks = inBrocks.ToList();
isTexture = isTex; isTexture = isTex;
propertyName = name; propertyName = name;
} }

View File

@ -17,7 +17,6 @@ namespace lilToon
{ {
internal static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool istess, bool ismulti) internal static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool istess, bool ismulti)
{ {
Undo.RecordObject(material, null);
int renderQueue = GetTrueRenderQueue(material); int renderQueue = GetTrueRenderQueue(material);
RenderingMode rend = renderingMode; RenderingMode rend = renderingMode;
lilRenderPipeline RP = lilRenderPipelineReader.GetRP(); lilRenderPipeline RP = lilRenderPipelineReader.GetRP();
@ -538,54 +537,49 @@ namespace lilToon
else material.DisableKeyword(keyword); else material.DisableKeyword(keyword);
} }
public static void RemoveUnusedTexture(Material material, params string[] animatedProps) public static void RemoveUnusedTexture(Material material)
{ {
if(!material.shader.name.Contains("lilToon")) return; if(!material.shader.name.Contains("lilToon")) return;
RemoveUnusedTexture(material, material.shader.name.Contains("Lite"), animatedProps); RemoveUnusedTexture(material, material.shader.name.Contains("Lite"));
} }
public static void RemoveUnusedTexture(Material material, bool islite, params string[] animatedProps) public static void RemoveUnusedTexture(Material material, bool islite)
{ {
RemoveUnusedProperties(material); RemoveUnusedProperties(material);
RemoveUnusedTextureOnly(material, islite, animatedProps);
}
public static void RemoveUnusedTextureOnly(Material material, bool islite, params string[] animatedProps)
{
if(islite) if(islite)
{ {
if(IsPropZero(material, "_UseShadow", animatedProps)) if(material.GetFloat("_UseShadow") == 0.0f)
{ {
material.SetTexture("_ShadowColorTex", null); material.SetTexture("_ShadowColorTex", null);
material.SetTexture("_Shadow2ndColorTex", null); material.SetTexture("_Shadow2ndColorTex", null);
} }
if(IsPropZero(material, "_UseEmission", animatedProps)) if(material.GetFloat("_UseEmission") == 0.0f)
{ {
material.SetTexture("_EmissionMap", null); material.SetTexture("_EmissionMap", null);
} }
if(IsPropZero(material, "_UseMatCap", animatedProps)) if(material.GetFloat("_UseMatCap") == 0.0f)
{ {
material.SetTexture("_MatCapTex", null); material.SetTexture("_MatCapTex", null);
} }
} }
else else
{ {
if(IsPropZero(material, "_MainGradationStrength", animatedProps)) material.SetTexture("_MainGradationTex", null); if(material.GetFloat("_MainGradationStrength") == 0.0f) material.SetTexture("_MainGradationTex", null);
if(IsPropZero(material, "_UseMain2ndTex", animatedProps)) if(material.GetFloat("_UseMain2ndTex") == 0.0f)
{ {
material.SetTexture("_Main2ndTex", null); material.SetTexture("_Main2ndTex", null);
material.SetTexture("_Main2ndBlendMask", null); material.SetTexture("_Main2ndBlendMask", null);
material.SetTexture("_Main2ndDissolveMask", null); material.SetTexture("_Main2ndDissolveMask", null);
material.SetTexture("_Main2ndDissolveNoiseMask", null); material.SetTexture("_Main2ndDissolveNoiseMask", null);
} }
if(IsPropZero(material, "_UseMain3rdTex", animatedProps)) if(material.GetFloat("_UseMain3rdTex") == 0.0f)
{ {
material.SetTexture("_Main3rdTex", null); material.SetTexture("_Main3rdTex", null);
material.SetTexture("_Main3rdBlendMask", null); material.SetTexture("_Main3rdBlendMask", null);
material.SetTexture("_Main3rdDissolveMask", null); material.SetTexture("_Main3rdDissolveMask", null);
material.SetTexture("_Main3rdDissolveNoiseMask", null); material.SetTexture("_Main3rdDissolveNoiseMask", null);
} }
if(IsPropZero(material, "_UseShadow", animatedProps)) if(material.GetFloat("_UseShadow") == 0.0f)
{ {
material.SetTexture("_ShadowBlurMask", null); material.SetTexture("_ShadowBlurMask", null);
material.SetTexture("_ShadowBorderMask", null); material.SetTexture("_ShadowBorderMask", null);
@ -594,52 +588,50 @@ namespace lilToon
material.SetTexture("_Shadow2ndColorTex", null); material.SetTexture("_Shadow2ndColorTex", null);
material.SetTexture("_Shadow3rdColorTex", null); material.SetTexture("_Shadow3rdColorTex", null);
} }
if(IsPropZero(material, "_UseRimShade", animatedProps)) if(material.GetFloat("_UseRimShade") == 0.0f)
{ {
material.SetTexture("_RimShadeMask", null); material.SetTexture("_RimShadeMask", null);
} }
if(IsPropZero(material, "_UseEmission", animatedProps)) if(material.GetFloat("_UseEmission") == 0.0f)
{ {
material.SetTexture("_EmissionMap", null); material.SetTexture("_EmissionMap", null);
material.SetTexture("_EmissionBlendMask", null); material.SetTexture("_EmissionBlendMask", null);
material.SetTexture("_EmissionGradTex", null); material.SetTexture("_EmissionGradTex", null);
} }
if(IsPropZero(material, "_UseEmission2nd", animatedProps)) if(material.GetFloat("_UseEmission2nd") == 0.0f)
{ {
material.SetTexture("_Emission2ndMap", null); material.SetTexture("_Emission2ndMap", null);
material.SetTexture("_Emission2ndBlendMask", null); material.SetTexture("_Emission2ndBlendMask", null);
material.SetTexture("_Emission2ndGradTex", null); material.SetTexture("_Emission2ndGradTex", null);
} }
if(IsPropZero(material, "_UseBumpMap", animatedProps)) material.SetTexture("_BumpMap", null); if(material.GetFloat("_UseBumpMap") == 0.0f) material.SetTexture("_BumpMap", null);
if(IsPropZero(material, "_UseBump2ndMap", animatedProps)) if(material.GetFloat("_UseBump2ndMap") == 0.0f)
{ {
material.SetTexture("_Bump2ndMap", null); material.SetTexture("_Bump2ndMap", null);
material.SetTexture("_Bump2ndScaleMask", null); material.SetTexture("_Bump2ndScaleMask", null);
} }
if(IsPropZero(material, "_UseAnisotropy", animatedProps)) if(material.GetFloat("_UseAnisotropy") == 0.0f)
{ {
material.SetTexture("_AnisotropyTangentMap", null); material.SetTexture("_AnisotropyTangentMap", null);
material.SetTexture("_AnisotropyScaleMask", null); material.SetTexture("_AnisotropyScaleMask", null);
material.SetTexture("_AnisotropyShiftNoiseMask", null); material.SetTexture("_AnisotropyShiftNoiseMask", null);
} }
if(IsPropZero(material, "_UseReflection", animatedProps)) if(material.GetFloat("_UseReflection") == 0.0f)
{ {
material.SetTexture("_SmoothnessTex", null); material.SetTexture("_SmoothnessTex", null);
material.SetTexture("_MetallicGlossMap", null); material.SetTexture("_MetallicGlossMap", null);
material.SetTexture("_ReflectionColorTex", null); material.SetTexture("_ReflectionColorTex", null);
material.SetTexture("_ReflectionCubeTex", null); material.SetTexture("_ReflectionCubeTex", null);
} }
if(IsPropZero(material, "_UseMatCap", animatedProps)) if(material.GetFloat("_UseMatCap") == 0.0f)
{ {
material.SetTexture("_MatCapTex", null); material.SetTexture("_MatCapTex", null);
material.SetTexture("_MatCapBlendMask", null); material.SetTexture("_MatCapBlendMask", null);
material.SetTexture("_MatCapBumpMap", null);
} }
if(IsPropZero(material, "_UseMatCap2nd", animatedProps)) if(material.GetFloat("_UseMatCap2nd") == 0.0f)
{ {
material.SetTexture("_MatCap2ndTex", null); material.SetTexture("_MatCap2ndTex", null);
material.SetTexture("_MatCap2ndBlendMask", null); material.SetTexture("_MatCap2ndBlendMask", null);
material.SetTexture("_MatCap2ndBumpMap", null);
} }
if(!material.shader.name.Contains("Outline")) if(!material.shader.name.Contains("Outline"))
{ {
@ -647,24 +639,12 @@ namespace lilToon
material.SetTexture("_OutlineWidthMask", null); material.SetTexture("_OutlineWidthMask", null);
material.SetTexture("_OutlineVectorTex", null); material.SetTexture("_OutlineVectorTex", null);
} }
if(!material.shader.name.Contains("Fur")) if(material.GetFloat("_UseRim") == 0.0f) material.SetTexture("_RimColorTex", null);
{ if(material.GetFloat("_UseGlitter") == 0.0f) material.SetTexture("_GlitterColorTex", null);
material.SetTexture("_FurVectorTex", null); if(material.GetFloat("_UseParallax") == 0.0f) material.SetTexture("_ParallaxMap", null);
material.SetTexture("_FurLengthMask", null); if(material.GetFloat("_UseAudioLink") == 0.0f || material.GetFloat("_AudioLinkUVMode") != 3.0f) material.SetTexture("_AudioLinkMask", null);
material.SetTexture("_FurNoiseMask", null); if(material.GetFloat("_UseAudioLink") == 0.0f || material.GetFloat("_AudioLinkAsLocal") == 0.0f) material.SetTexture("_AudioLinkLocalMap", null);
material.SetTexture("_FurMask", null);
} }
if(IsPropZero(material, "_UseRim", animatedProps)) material.SetTexture("_RimColorTex", null);
if(IsPropZero(material, "_UseGlitter", animatedProps)) material.SetTexture("_GlitterColorTex", null);
if(IsPropZero(material, "_UseParallax", animatedProps)) material.SetTexture("_ParallaxMap", null);
if(IsPropZero(material, "_UseAudioLink", animatedProps) || material.GetFloat("_AudioLinkUVMode") != 3.0f || animatedProps.Contains("_AudioLinkUVMode")) material.SetTexture("_AudioLinkMask", null);
if(IsPropZero(material, "_UseAudioLink", animatedProps) || IsPropZero(material, "_AudioLinkAsLocal", animatedProps)) material.SetTexture("_AudioLinkLocalMap", null);
}
}
private static bool IsPropZero(Material material, string name, string[] animatedProps)
{
return !material.HasProperty(name) || material.GetFloat(name) == 0.0f && !animatedProps.Contains(name);
} }
public static void RemoveShaderKeywords(Material material) public static void RemoveShaderKeywords(Material material)

View File

@ -829,9 +829,6 @@ namespace lilToon
} }
subShaderTags = line.Substring(first, second - first); subShaderTags = line.Substring(first, second - first);
#if LILTOON_LTCGI
subShaderTags += " \"LTCGI\"=\"ALWAYS\"";
#endif
} }
private static string ReadTextFile(string path) private static string ReadTextFile(string path)
@ -1221,9 +1218,6 @@ namespace lilToon
"#pragma multi_compile_fwdbase", "#pragma multi_compile_fwdbase",
"#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2", "#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2",
"#pragma multi_compile_instancing", "#pragma multi_compile_instancing",
#if LILTOON_LTCGI
"#define LIL_FEATURE_LTCGI",
#endif
"#define LIL_PASS_FORWARD"); "#define LIL_PASS_FORWARD");
} }
} }

View File

@ -18,8 +18,8 @@ namespace lilToon
public static Shader ltstto = Shader.Find("Hidden/lilToonTwoPassTransparentOutline"); public static Shader ltstto = Shader.Find("Hidden/lilToonTwoPassTransparentOutline");
public static Shader ltsoo = Shader.Find("_lil/[Optional] lilToonOutlineOnly"); public static Shader ltsoo = Shader.Find("_lil/[Optional] lilToonOutlineOnly");
public static Shader ltscoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyCutout"); public static Shader ltscoo = Shader.Find("_lil/[Optional] lilToonCutoutOutlineOnly");
public static Shader ltstoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyTransparent"); public static Shader ltstoo = Shader.Find("_lil/[Optional] lilToonTransparentOutlineOnly");
public static Shader ltstess = Shader.Find("Hidden/lilToonTessellation"); public static Shader ltstess = Shader.Find("Hidden/lilToonTessellation");
public static Shader ltstessc = Shader.Find("Hidden/lilToonTessellationCutout"); public static Shader ltstessc = Shader.Find("Hidden/lilToonTessellationCutout");
@ -50,13 +50,13 @@ namespace lilToon
public static Shader ltsfur = Shader.Find("Hidden/lilToonFur"); public static Shader ltsfur = Shader.Find("Hidden/lilToonFur");
public static Shader ltsfurc = Shader.Find("Hidden/lilToonFurCutout"); public static Shader ltsfurc = Shader.Find("Hidden/lilToonFurCutout");
public static Shader ltsfurtwo = Shader.Find("Hidden/lilToonFurTwoPass"); public static Shader ltsfurtwo = Shader.Find("Hidden/lilToonFurTwoPass");
public static Shader ltsfuro = Shader.Find("_lil/[Optional] lilToonFurOnlyTransparent"); public static Shader ltsfuro = Shader.Find("_lil/[Optional] lilToonFurOnly");
public static Shader ltsfuroc = Shader.Find("_lil/[Optional] lilToonFurOnlyCutout"); public static Shader ltsfuroc = Shader.Find("_lil/[Optional] lilToonFurOnlyCutout");
public static Shader ltsfurotwo = Shader.Find("_lil/[Optional] lilToonFurOnlyTwoPass"); public static Shader ltsfurotwo = Shader.Find("_lil/[Optional] lilToonFurOnlyTwoPass");
public static Shader ltsgem = Shader.Find("Hidden/lilToonGem"); public static Shader ltsgem = Shader.Find("Hidden/lilToonGem");
public static Shader ltsfs = Shader.Find("_lil/[Optional] lilToonFakeShadow"); public static Shader ltsfs = Shader.Find("_lil/lilToonFakeShadow");
public static Shader ltsover = Shader.Find("_lil/[Optional] lilToonOverlay"); public static Shader ltsover = Shader.Find("_lil/[Optional] lilToonOverlay");
public static Shader ltsoover = Shader.Find("_lil/[Optional] lilToonOverlayOnePass"); public static Shader ltsoover = Shader.Find("_lil/[Optional] lilToonOverlayOnePass");
@ -93,8 +93,8 @@ namespace lilToon
ltstto = Shader.Find("Hidden/lilToonTwoPassTransparentOutline"); ltstto = Shader.Find("Hidden/lilToonTwoPassTransparentOutline");
ltsoo = Shader.Find("_lil/[Optional] lilToonOutlineOnly"); ltsoo = Shader.Find("_lil/[Optional] lilToonOutlineOnly");
ltscoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyCutout"); ltscoo = Shader.Find("_lil/[Optional] lilToonCutoutOutlineOnly");
ltstoo = Shader.Find("_lil/[Optional] lilToonOutlineOnlyTransparent"); ltstoo = Shader.Find("_lil/[Optional] lilToonTransparentOutlineOnly");
ltstess = Shader.Find("Hidden/lilToonTessellation"); ltstess = Shader.Find("Hidden/lilToonTessellation");
ltstessc = Shader.Find("Hidden/lilToonTessellationCutout"); ltstessc = Shader.Find("Hidden/lilToonTessellationCutout");
@ -125,18 +125,10 @@ namespace lilToon
ltsfur = Shader.Find("Hidden/lilToonFur"); ltsfur = Shader.Find("Hidden/lilToonFur");
ltsfurc = Shader.Find("Hidden/lilToonFurCutout"); ltsfurc = Shader.Find("Hidden/lilToonFurCutout");
ltsfurtwo = Shader.Find("Hidden/lilToonFurTwoPass"); ltsfurtwo = Shader.Find("Hidden/lilToonFurTwoPass");
ltsfuro = Shader.Find("_lil/[Optional] lilToonFurOnlyTransparent");
ltsfuroc = Shader.Find("_lil/[Optional] lilToonFurOnlyCutout");
ltsfurotwo = Shader.Find("_lil/[Optional] lilToonFurOnlyTwoPass");
ltsgem = Shader.Find("Hidden/lilToonGem"); ltsgem = Shader.Find("Hidden/lilToonGem");
ltsfs = Shader.Find("_lil/[Optional] lilToonFakeShadow"); ltsfs = Shader.Find("_lil/lilToonFakeShadow");
ltsover = Shader.Find("_lil/[Optional] lilToonOverlay");
ltsoover = Shader.Find("_lil/[Optional] lilToonOverlayOnePass");
ltslover = Shader.Find("_lil/[Optional] lilToonLiteOverlay");
ltsloover = Shader.Find("_lil/[Optional] lilToonLiteOverlayOnePass");
ltsbaker = Shader.Find("Hidden/ltsother_baker"); ltsbaker = Shader.Find("Hidden/ltsother_baker");
ltspo = Shader.Find("Hidden/ltspass_opaque"); ltspo = Shader.Find("Hidden/ltspass_opaque");

View File

@ -24,8 +24,6 @@ namespace lilToon
AssetDatabase.importPackageStarted -= PackageVersionChecker; AssetDatabase.importPackageStarted -= PackageVersionChecker;
AssetDatabase.importPackageStarted += PackageVersionChecker; AssetDatabase.importPackageStarted += PackageVersionChecker;
EditorApplication.playModeStateChanged -= PlayModeStateChanged;
EditorApplication.playModeStateChanged += PlayModeStateChanged;
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Create files // Create files
@ -81,22 +79,14 @@ namespace lilToon
var srRP = new StreamReader(currentRPPath); var srRP = new StreamReader(currentRPPath);
string shaderRP = srRP.ReadLine(); string shaderRP = srRP.ReadLine();
string shaderAPI = srRP.ReadLine(); string shaderAPI = srRP.ReadLine();
string shaderLTCGI = srRP.ReadLine();
srRP.Close(); srRP.Close();
bool shouldRewrite = false; bool shouldRewrite = false;
string projectRP = lilRenderPipelineReader.GetRP().ToString(); string projectRP = lilRenderPipelineReader.GetRP().ToString();
string projectAPI = SystemInfo.graphicsDeviceType.ToString(); string projectAPI = SystemInfo.graphicsDeviceType.ToString();
#if LILTOON_LTCGI
string projectLTCGI = "LTCGI";
#else
string projectLTCGI = "";
#endif
var swRP = new StreamWriter(currentRPPath,false); var swRP = new StreamWriter(currentRPPath,false);
swRP.WriteLine(projectRP); swRP.WriteLine(projectRP);
swRP.WriteLine(projectAPI); swRP.WriteLine(projectAPI);
swRP.WriteLine(projectLTCGI);
swRP.Close();
if(shaderRP != projectRP) if(shaderRP != projectRP)
{ {
@ -110,12 +100,7 @@ namespace lilToon
shouldRewrite = true; shouldRewrite = true;
} }
if(shaderLTCGI != projectLTCGI) swRP.Close();
{
Debug.Log("[lilToon] Switch LTCGI");
shouldRewrite = true;
}
if(shouldRewrite) if(shouldRewrite)
{ {
if(shaderSetting.isDebugOptimize) if(shaderSetting.isDebugOptimize)
@ -184,14 +169,6 @@ namespace lilToon
} }
} }
private static void PlayModeStateChanged(PlayModeStateChange playModeStateChange)
{
if(playModeStateChange == PlayModeStateChange.EnteredEditMode)
{
lilToonSetting.SetShaderSettingAfterBuild();
}
}
private static IEnumerator GetLatestVersionInfo() private static IEnumerator GetLatestVersionInfo()
{ {
using(UnityWebRequest webRequest = UnityWebRequest.Get(lilConstants.versionInfoURL)) using(UnityWebRequest webRequest = UnityWebRequest.Get(lilConstants.versionInfoURL))

View File

@ -18,11 +18,6 @@
"name": "com.vrchat.base", "name": "com.vrchat.base",
"expression": "", "expression": "",
"define": "LILTOON_VRCSDK3" "define": "LILTOON_VRCSDK3"
},
{
"name": "at.pimaker.ltcgi",
"expression": "1.4",
"define": "LILTOON_LTCGI"
} }
] ]
} }

View File

@ -14,7 +14,6 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
using Object = UnityEngine.Object;
#if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER) #if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER)
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
#endif #endif
@ -134,7 +133,6 @@ public class lilToonSetting : ScriptableObject
public bool isLocked = false; public bool isLocked = false;
public bool isDebugOptimize = false; public bool isDebugOptimize = false;
public bool isOptimizeInTestBuild = false; public bool isOptimizeInTestBuild = false;
public bool isOptimizeInNDMF = false;
public bool isMigrateInStartUp = true; public bool isMigrateInStartUp = true;
public float defaultAsUnlit = 0.0f; public float defaultAsUnlit = 0.0f;
@ -157,8 +155,6 @@ public class lilToonSetting : ScriptableObject
public lilToonPreset presetHair; public lilToonPreset presetHair;
public lilToonPreset presetCloth; public lilToonPreset presetCloth;
private static HashSet<string> logs = new HashSet<string>();
// This is not a shader setting, but the version number is stored here for material migration. // This is not a shader setting, but the version number is stored here for material migration.
public int previousVersion = 0; public int previousVersion = 0;
@ -511,8 +507,7 @@ public class lilToonSetting : ScriptableObject
if(shaderPath.Contains(".lilcontainer")) continue; if(shaderPath.Contains(".lilcontainer")) continue;
string baseShaderPath = baseShaderFolderPath + Path.AltDirectorySeparatorChar + Path.GetFileNameWithoutExtension(shaderPath) + ".lilinternal"; string baseShaderPath = baseShaderFolderPath + Path.AltDirectorySeparatorChar + Path.GetFileNameWithoutExtension(shaderPath) + ".lilinternal";
if(!File.Exists(baseShaderPath)) continue; if(File.Exists(baseShaderPath)) File.WriteAllText(shaderPath, lilShaderContainer.UnpackContainer(baseShaderPath, null, doOptimize));
File.WriteAllText(shaderPath, lilShaderContainer.UnpackContainer(baseShaderPath, null, doOptimize));
} }
foreach(var shaderPath in shaderPathes) foreach(var shaderPath in shaderPathes)
{ {
@ -697,40 +692,16 @@ public class lilToonSetting : ScriptableObject
return shaderSettingString; return shaderSettingString;
} }
internal static void WalkAllSceneReferencedAssets(Action<Object> callback, bool loadBuildScene) internal static void WalkAllSceneReferencedAssets(Action<UnityEngine.Object> callback)
{ {
Debug.Log("WalkAllSceneReferencedAssets"); var toVisit = new Queue<UnityEngine.Object>();
var visited = new HashSet<UnityEngine.Object>();
var toVisit = new Queue<Object>();
var visited = new HashSet<Object>();
if(loadBuildScene)
{
var startScenePath = UnityEngine.SceneManagement.SceneManager.GetActiveScene().path;
for(int i = -1; i < UnityEngine.SceneManagement.SceneManager.sceneCountInBuildSettings; i++)
{
if(i >= 0) UnityEditor.SceneManagement.EditorSceneManager.OpenScene(UnityEngine.SceneManagement.SceneUtility.GetScenePathByBuildIndex(i));
WalkAllSceneReferencedAssets(callback, toVisit, visited);
}
UnityEditor.SceneManagement.EditorSceneManager.OpenScene(startScenePath);
}
else
{
WalkAllSceneReferencedAssets(callback, toVisit, visited);
}
}
private static void WalkAllSceneReferencedAssets(Action<Object> callback, Queue<Object> toVisit, HashSet<Object> visited)
{
void Add(Object o)
{
if(!o || visited.Contains(o)) return;
toVisit.Enqueue(o);
visited.Add(o);
}
foreach (var root in UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects()) foreach (var root in UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects())
Add(root.transform); {
toVisit.Enqueue(root.transform);
visited.Add(root.transform);
}
// use unity reflection to walk all properties in all objects referenced from the scene // use unity reflection to walk all properties in all objects referenced from the scene
while (toVisit.Count > 0) while (toVisit.Count > 0)
@ -740,38 +711,60 @@ public class lilToonSetting : ScriptableObject
callback.Invoke(next); callback.Invoke(next);
if(
next is Mesh ||
next is Texture ||
next is Shader ||
next is TextAsset ||
next.GetType() == typeof(Object)
) continue;
if (next is Transform) if (next is Transform)
{ {
var t = next as Transform; var t = (Transform)next;
foreach(Transform child in t) Add(child); foreach (Transform child in t)
{
if (!visited.Contains(child))
{
toVisit.Enqueue(child);
visited.Add(child);
}
}
foreach (var c in t.GetComponents(typeof(Component))) foreach (var c in t.GetComponents(typeof(Component)))
if(!(c is Transform)) Add(c); {
if (!(c is Transform) && !visited.Contains(c))
{
toVisit.Enqueue(c);
visited.Add(c);
}
}
} }
else else
using(var so = new SerializedObject(next))
using(var prop = so.GetIterator())
{ {
var so = new SerializedObject(next);
var prop = so.GetIterator();
bool enterChildren = true; bool enterChildren = true;
while (prop.Next(enterChildren)) while (prop.Next(enterChildren))
{ {
enterChildren = prop.propertyType != SerializedPropertyType.String; enterChildren = true;
if(prop.propertyType == SerializedPropertyType.ObjectReference)
Add(prop.objectReferenceValue); switch (prop.propertyType)
{
case SerializedPropertyType.String:
enterChildren = false;
break;
case SerializedPropertyType.ObjectReference:
{
var obj = prop.objectReferenceValue;
if (obj != null && !visited.Contains(obj))
{
toVisit.Enqueue(obj);
visited.Add(obj);
}
break;
}
}
} }
} }
} }
} }
internal static void ApplyShaderSettingOptimized(bool loadBuildScene = true, List<Shader> shaders = null) internal static void ApplyShaderSettingOptimized(List<Shader> shaders = null)
{ {
lilToonSetting shaderSetting = null; lilToonSetting shaderSetting = null;
InitializeShaderSetting(ref shaderSetting); InitializeShaderSetting(ref shaderSetting);
@ -786,7 +779,7 @@ public class lilToonSetting : ScriptableObject
{ {
SetupShaderSettingFromAnimationClip((AnimationClip)obj, ref shaderSetting); SetupShaderSettingFromAnimationClip((AnimationClip)obj, ref shaderSetting);
} }
}, loadBuildScene); });
// Apply // Apply
ApplyShaderSetting(shaderSetting, "[lilToon] PreprocessBuild", shaders); ApplyShaderSetting(shaderSetting, "[lilToon] PreprocessBuild", shaders);
@ -854,7 +847,6 @@ public class lilToonSetting : ScriptableObject
#endif #endif
try try
{ {
logs.Clear();
#if UNITY_2022_1_OR_NEWER #if UNITY_2022_1_OR_NEWER
var materialParents = new HashSet<Material>(); var materialParents = new HashSet<Material>();
foreach(var m in materials) foreach(var m in materials)
@ -890,7 +882,6 @@ public class lilToonSetting : ScriptableObject
// Apply // Apply
ApplyShaderSetting(shaderSetting, "[lilToon] PreprocessBuild", shaders, true); ApplyShaderSetting(shaderSetting, "[lilToon] PreprocessBuild", shaders, true);
AssetDatabase.Refresh(); AssetDatabase.Refresh();
Debug.Log(string.Join(Environment.NewLine, logs));
} }
catch(Exception e) catch(Exception e)
{ {
@ -903,14 +894,14 @@ public class lilToonSetting : ScriptableObject
#if UNITY_2022_1_OR_NEWER #if UNITY_2022_1_OR_NEWER
private static void GetMaterialParents(HashSet<Material> parents, Material material) private static void GetMaterialParents(HashSet<Material> parents, Material material)
{ {
if(!material || !material.parent) return;
var p = material.parent; var p = material.parent;
if(p == null) return;
parents.Add(p); parents.Add(p);
GetMaterialParents(parents, p); GetMaterialParents(parents, p);
} }
#endif #endif
internal static void SetShaderSettingBeforeBuild(bool loadBuildScene = true) internal static void SetShaderSettingBeforeBuild()
{ {
#if !LILTOON_DISABLE_OPTIMIZATION #if !LILTOON_DISABLE_OPTIMIZATION
#if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER) #if UNITY_2022_1_OR_NEWER || (UNITY_2023_1_OR_NEWER && !UNITY_2023_2_OR_NEWER)
@ -919,11 +910,9 @@ public class lilToonSetting : ScriptableObject
try try
{ {
if(!ShouldOptimization()) return; if(!ShouldOptimization()) return;
logs.Clear();
var shaders = GetShaderListFromProject(); var shaders = GetShaderListFromProject();
lilEditorParameters.instance.modifiedShaders = string.Join(",", shaders.Select(s => s.name).Distinct().ToArray()); lilEditorParameters.instance.modifiedShaders = string.Join(",", shaders.Select(s => s.name).Distinct().ToArray());
ApplyShaderSettingOptimized(loadBuildScene, shaders); ApplyShaderSettingOptimized(shaders);
Debug.Log(string.Join(Environment.NewLine, logs));
} }
catch(Exception e) catch(Exception e)
{ {
@ -972,17 +961,17 @@ public class lilToonSetting : ScriptableObject
if(!shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV && material.HasProperty("_MainTex_ScrollRotate") && material.GetVector("_MainTex_ScrollRotate") != lilConstants.defaultScrollRotate) if(!shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV && material.HasProperty("_MainTex_ScrollRotate") && material.GetVector("_MainTex_ScrollRotate") != lilConstants.defaultScrollRotate)
{ {
logs.Add("[lilToon] LIL_FEATURE_ANIMATE_MAIN_UV : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_ANIMATE_MAIN_UV : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV = true; shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV = true;
} }
if(!shaderSetting.LIL_FEATURE_SHADOW && material.HasProperty("_UseShadow") && material.GetFloat("_UseShadow") != 0.0f) if(!shaderSetting.LIL_FEATURE_SHADOW && material.HasProperty("_UseShadow") && material.GetFloat("_UseShadow") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_SHADOW : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_SHADOW : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_SHADOW = true; shaderSetting.LIL_FEATURE_SHADOW = true;
} }
if(!shaderSetting.LIL_FEATURE_RIMSHADE && material.HasProperty("_UseRimShade") && material.GetFloat("_UseRimShade") != 0.0f) if(!shaderSetting.LIL_FEATURE_RIMSHADE && material.HasProperty("_UseRimShade") && material.GetFloat("_UseRimShade") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_RIMSHADE : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_RIMSHADE : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_RIMSHADE = true; shaderSetting.LIL_FEATURE_RIMSHADE = true;
} }
if(!shaderSetting.LIL_FEATURE_RECEIVE_SHADOW && material.HasProperty("_UseShadow") && material.GetFloat("_UseShadow") != 0.0f && ( if(!shaderSetting.LIL_FEATURE_RECEIVE_SHADOW && material.HasProperty("_UseShadow") && material.GetFloat("_UseShadow") != 0.0f && (
@ -991,22 +980,22 @@ public class lilToonSetting : ScriptableObject
(material.HasProperty("_Shadow3rdReceive") && material.GetFloat("_Shadow3rdReceive") > 0.0f)) (material.HasProperty("_Shadow3rdReceive") && material.GetFloat("_Shadow3rdReceive") > 0.0f))
) )
{ {
logs.Add("[lilToon] LIL_FEATURE_RECEIVE_SHADOW : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_RECEIVE_SHADOW : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = true; shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = true;
} }
if(!shaderSetting.LIL_FEATURE_DISTANCE_FADE && material.HasProperty("_DistanceFade") && material.GetVector("_DistanceFade").z != lilConstants.defaultDistanceFadeParams.z) if(!shaderSetting.LIL_FEATURE_DISTANCE_FADE && material.HasProperty("_DistanceFade") && material.GetVector("_DistanceFade").z != lilConstants.defaultDistanceFadeParams.z)
{ {
logs.Add("[lilToon] LIL_FEATURE_DISTANCE_FADE : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_DISTANCE_FADE : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_DISTANCE_FADE = true; shaderSetting.LIL_FEATURE_DISTANCE_FADE = true;
} }
if(!shaderSetting.LIL_FEATURE_SHADOW_3RD && material.HasProperty("_Shadow3rdColor") && material.GetColor("_Shadow3rdColor").a != 0.0f) if(!shaderSetting.LIL_FEATURE_SHADOW_3RD && material.HasProperty("_Shadow3rdColor") && material.GetColor("_Shadow3rdColor").a != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_SHADOW_3RD : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_SHADOW_3RD : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_SHADOW_3RD = true; shaderSetting.LIL_FEATURE_SHADOW_3RD = true;
} }
if(!shaderSetting.LIL_FEATURE_SHADOW_LUT && material.HasProperty("_ShadowColorType") && material.GetFloat("_ShadowColorType") != 0.0f) if(!shaderSetting.LIL_FEATURE_SHADOW_LUT && material.HasProperty("_ShadowColorType") && material.GetFloat("_ShadowColorType") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_SHADOW_LUT : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_SHADOW_LUT : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_SHADOW_LUT = true; shaderSetting.LIL_FEATURE_SHADOW_LUT = true;
} }
@ -1014,8 +1003,8 @@ public class lilToonSetting : ScriptableObject
{ {
if(!shaderSetting.LIL_FEATURE_FUR_COLLISION && material.HasProperty("_FurTouchStrength") && material.GetFloat("_FurTouchStrength") != 0.0f) if(!shaderSetting.LIL_FEATURE_FUR_COLLISION && material.HasProperty("_FurTouchStrength") && material.GetFloat("_FurTouchStrength") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_FUR_COLLISION : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_FUR_COLLISION : " + AssetDatabase.GetAssetPath(material));
logs.Add("[lilToon] LIL_OPTIMIZE_USE_VERTEXLIGHT : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_OPTIMIZE_USE_VERTEXLIGHT : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_FUR_COLLISION = true; shaderSetting.LIL_FEATURE_FUR_COLLISION = true;
shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = true; shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = true;
} }
@ -1023,22 +1012,22 @@ public class lilToonSetting : ScriptableObject
if(!shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION && material.HasProperty("_MainTexHSVG") && material.GetVector("_MainTexHSVG") != lilConstants.defaultHSVG) if(!shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION && material.HasProperty("_MainTexHSVG") && material.GetVector("_MainTexHSVG") != lilConstants.defaultHSVG)
{ {
logs.Add("[lilToon] LIL_FEATURE_MAIN_TONE_CORRECTION : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_MAIN_TONE_CORRECTION : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION = true; shaderSetting.LIL_FEATURE_MAIN_TONE_CORRECTION = true;
} }
if(!shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP && material.HasProperty("_MainGradationStrength") && material.GetFloat("_MainGradationStrength") != 0.0f) if(!shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP && material.HasProperty("_MainGradationStrength") && material.GetFloat("_MainGradationStrength") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_MAIN_GRADATION_MAP : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_MAIN_GRADATION_MAP : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP = true; shaderSetting.LIL_FEATURE_MAIN_GRADATION_MAP = true;
} }
if(!shaderSetting.LIL_FEATURE_MAIN2ND && material.HasProperty("_UseMain2ndTex") && material.GetFloat("_UseMain2ndTex") != 0.0f) if(!shaderSetting.LIL_FEATURE_MAIN2ND && material.HasProperty("_UseMain2ndTex") && material.GetFloat("_UseMain2ndTex") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_MAIN2ND : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_MAIN2ND : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_MAIN2ND = true; shaderSetting.LIL_FEATURE_MAIN2ND = true;
} }
if(!shaderSetting.LIL_FEATURE_MAIN3RD && material.HasProperty("_UseMain3rdTex") && material.GetFloat("_UseMain3rdTex") != 0.0f) if(!shaderSetting.LIL_FEATURE_MAIN3RD && material.HasProperty("_UseMain3rdTex") && material.GetFloat("_UseMain3rdTex") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_MAIN3RD : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_MAIN3RD : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_MAIN3RD = true; shaderSetting.LIL_FEATURE_MAIN3RD = true;
} }
if(!shaderSetting.LIL_FEATURE_DECAL && ( if(!shaderSetting.LIL_FEATURE_DECAL && (
@ -1046,7 +1035,7 @@ public class lilToonSetting : ScriptableObject
(material.HasProperty("_Main3rdTexIsDecal") && material.GetFloat("_Main3rdTexIsDecal") != 0.0f)) (material.HasProperty("_Main3rdTexIsDecal") && material.GetFloat("_Main3rdTexIsDecal") != 0.0f))
) )
{ {
logs.Add("[lilToon] LIL_FEATURE_DECAL : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_DECAL : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_DECAL = true; shaderSetting.LIL_FEATURE_DECAL = true;
} }
if(!shaderSetting.LIL_FEATURE_ANIMATE_DECAL && ( if(!shaderSetting.LIL_FEATURE_ANIMATE_DECAL && (
@ -1054,7 +1043,7 @@ public class lilToonSetting : ScriptableObject
(material.HasProperty("_Main3rdTexDecalAnimation") && material.GetVector("_Main3rdTexDecalAnimation") != lilConstants.defaultDecalAnim)) (material.HasProperty("_Main3rdTexDecalAnimation") && material.GetVector("_Main3rdTexDecalAnimation") != lilConstants.defaultDecalAnim))
) )
{ {
logs.Add("[lilToon] LIL_FEATURE_ANIMATE_DECAL : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_ANIMATE_DECAL : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_ANIMATE_DECAL = true; shaderSetting.LIL_FEATURE_ANIMATE_DECAL = true;
} }
if(!shaderSetting.LIL_FEATURE_LAYER_DISSOLVE && ( if(!shaderSetting.LIL_FEATURE_LAYER_DISSOLVE && (
@ -1062,22 +1051,22 @@ public class lilToonSetting : ScriptableObject
(material.HasProperty("_Main3rdDissolveParams") && material.GetVector("_Main3rdDissolveParams").x != lilConstants.defaultDissolveParams.x)) (material.HasProperty("_Main3rdDissolveParams") && material.GetVector("_Main3rdDissolveParams").x != lilConstants.defaultDissolveParams.x))
) )
{ {
logs.Add("[lilToon] LIL_FEATURE_LAYER_DISSOLVE : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_LAYER_DISSOLVE : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_LAYER_DISSOLVE = true; shaderSetting.LIL_FEATURE_LAYER_DISSOLVE = true;
} }
if(!shaderSetting.LIL_FEATURE_ALPHAMASK && material.HasProperty("_AlphaMaskMode") && material.GetFloat("_AlphaMaskMode") != 0.0f) if(!shaderSetting.LIL_FEATURE_ALPHAMASK && material.HasProperty("_AlphaMaskMode") && material.GetFloat("_AlphaMaskMode") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_ALPHAMASK : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_ALPHAMASK : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_ALPHAMASK = true; shaderSetting.LIL_FEATURE_ALPHAMASK = true;
} }
if(!shaderSetting.LIL_FEATURE_EMISSION_1ST && material.HasProperty("_UseEmission") && material.GetFloat("_UseEmission") != 0.0f) if(!shaderSetting.LIL_FEATURE_EMISSION_1ST && material.HasProperty("_UseEmission") && material.GetFloat("_UseEmission") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_EMISSION_1ST : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_EMISSION_1ST : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_EMISSION_1ST = true; shaderSetting.LIL_FEATURE_EMISSION_1ST = true;
} }
if(!shaderSetting.LIL_FEATURE_EMISSION_2ND && material.HasProperty("_UseEmission2nd") && material.GetFloat("_UseEmission2nd") != 0.0f) if(!shaderSetting.LIL_FEATURE_EMISSION_2ND && material.HasProperty("_UseEmission2nd") && material.GetFloat("_UseEmission2nd") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_EMISSION_2ND : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_EMISSION_2ND : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_EMISSION_2ND = true; shaderSetting.LIL_FEATURE_EMISSION_2ND = true;
} }
if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV && ( if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV && (
@ -1085,7 +1074,7 @@ public class lilToonSetting : ScriptableObject
(material.HasProperty("_Emission2ndMap_ScrollRotate") && material.GetVector("_Emission2ndMap_ScrollRotate") != lilConstants.defaultScrollRotate)) (material.HasProperty("_Emission2ndMap_ScrollRotate") && material.GetVector("_Emission2ndMap_ScrollRotate") != lilConstants.defaultScrollRotate))
) )
{ {
logs.Add("[lilToon] LIL_FEATURE_ANIMATE_EMISSION_UV : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_ANIMATE_EMISSION_UV : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = true; shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = true;
} }
if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV && ( if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV && (
@ -1093,7 +1082,7 @@ public class lilToonSetting : ScriptableObject
(material.HasProperty("_Emission2ndBlendMask_ScrollRotate") && material.GetVector("_Emission2ndBlendMask_ScrollRotate") != lilConstants.defaultScrollRotate)) (material.HasProperty("_Emission2ndBlendMask_ScrollRotate") && material.GetVector("_Emission2ndBlendMask_ScrollRotate") != lilConstants.defaultScrollRotate))
) )
{ {
logs.Add("[lilToon] LIL_FEATURE_ANIMATE_EMISSION_MASK_UV : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_ANIMATE_EMISSION_MASK_UV : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = true; shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = true;
} }
if(!shaderSetting.LIL_FEATURE_EMISSION_GRADATION && ( if(!shaderSetting.LIL_FEATURE_EMISSION_GRADATION && (
@ -1101,92 +1090,92 @@ public class lilToonSetting : ScriptableObject
(material.HasProperty("_Emission2ndUseGrad") && material.GetFloat("_Emission2ndUseGrad") != 0.0f)) (material.HasProperty("_Emission2ndUseGrad") && material.GetFloat("_Emission2ndUseGrad") != 0.0f))
) )
{ {
logs.Add("[lilToon] LIL_FEATURE_EMISSION_GRADATION : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_EMISSION_GRADATION : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_EMISSION_GRADATION = true; shaderSetting.LIL_FEATURE_EMISSION_GRADATION = true;
} }
if(!shaderSetting.LIL_FEATURE_NORMAL_1ST && material.HasProperty("_UseBumpMap") && material.GetFloat("_UseBumpMap") != 0.0f) if(!shaderSetting.LIL_FEATURE_NORMAL_1ST && material.HasProperty("_UseBumpMap") && material.GetFloat("_UseBumpMap") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_NORMAL_1ST : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_NORMAL_1ST : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_NORMAL_1ST = true; shaderSetting.LIL_FEATURE_NORMAL_1ST = true;
} }
if(!shaderSetting.LIL_FEATURE_NORMAL_2ND && material.HasProperty("_UseBump2ndMap") && material.GetFloat("_UseBump2ndMap") != 0.0f) if(!shaderSetting.LIL_FEATURE_NORMAL_2ND && material.HasProperty("_UseBump2ndMap") && material.GetFloat("_UseBump2ndMap") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_NORMAL_2ND : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_NORMAL_2ND : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_NORMAL_2ND = true; shaderSetting.LIL_FEATURE_NORMAL_2ND = true;
} }
if(!shaderSetting.LIL_FEATURE_ANISOTROPY && material.HasProperty("_UseAnisotropy") && material.GetFloat("_UseAnisotropy") != 0.0f) if(!shaderSetting.LIL_FEATURE_ANISOTROPY && material.HasProperty("_UseAnisotropy") && material.GetFloat("_UseAnisotropy") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_ANISOTROPY : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_ANISOTROPY : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_ANISOTROPY = true; shaderSetting.LIL_FEATURE_ANISOTROPY = true;
} }
if(!shaderSetting.LIL_FEATURE_REFLECTION && material.HasProperty("_UseReflection") && material.GetFloat("_UseReflection") != 0.0f) if(!shaderSetting.LIL_FEATURE_REFLECTION && material.HasProperty("_UseReflection") && material.GetFloat("_UseReflection") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_REFLECTION : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_REFLECTION : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_REFLECTION = true; shaderSetting.LIL_FEATURE_REFLECTION = true;
} }
if(!shaderSetting.LIL_FEATURE_MATCAP && material.HasProperty("_UseMatCap") && material.GetFloat("_UseMatCap") != 0.0f) if(!shaderSetting.LIL_FEATURE_MATCAP && material.HasProperty("_UseMatCap") && material.GetFloat("_UseMatCap") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_MATCAP : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_MATCAP : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_MATCAP = true; shaderSetting.LIL_FEATURE_MATCAP = true;
} }
if(!shaderSetting.LIL_FEATURE_MATCAP_2ND && material.HasProperty("_UseMatCap2nd") && material.GetFloat("_UseMatCap2nd") != 0.0f) if(!shaderSetting.LIL_FEATURE_MATCAP_2ND && material.HasProperty("_UseMatCap2nd") && material.GetFloat("_UseMatCap2nd") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_MATCAP_2ND : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_MATCAP_2ND : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_MATCAP_2ND = true; shaderSetting.LIL_FEATURE_MATCAP_2ND = true;
} }
if(!shaderSetting.LIL_FEATURE_RIMLIGHT && material.HasProperty("_UseRim") && material.GetFloat("_UseRim") != 0.0f) if(!shaderSetting.LIL_FEATURE_RIMLIGHT && material.HasProperty("_UseRim") && material.GetFloat("_UseRim") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_RIMLIGHT : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_RIMLIGHT : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_RIMLIGHT = true; shaderSetting.LIL_FEATURE_RIMLIGHT = true;
} }
if(!shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION && material.HasProperty("_RimDirStrength") && material.GetFloat("_RimDirStrength") != 0.0f) if(!shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION && material.HasProperty("_RimDirStrength") && material.GetFloat("_RimDirStrength") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_RIMLIGHT_DIRECTION : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_RIMLIGHT_DIRECTION : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION = true; shaderSetting.LIL_FEATURE_RIMLIGHT_DIRECTION = true;
} }
if(!shaderSetting.LIL_FEATURE_GLITTER && material.HasProperty("_UseGlitter") && material.GetFloat("_UseGlitter") != 0.0f) if(!shaderSetting.LIL_FEATURE_GLITTER && material.HasProperty("_UseGlitter") && material.GetFloat("_UseGlitter") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_GLITTER : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_GLITTER : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_GLITTER = true; shaderSetting.LIL_FEATURE_GLITTER = true;
} }
if(!shaderSetting.LIL_FEATURE_BACKLIGHT && material.HasProperty("_UseBacklight") && material.GetFloat("_UseBacklight") != 0.0f) if(!shaderSetting.LIL_FEATURE_BACKLIGHT && material.HasProperty("_UseBacklight") && material.GetFloat("_UseBacklight") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_BACKLIGHT : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_BACKLIGHT : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_BACKLIGHT = true; shaderSetting.LIL_FEATURE_BACKLIGHT = true;
} }
if(!shaderSetting.LIL_FEATURE_PARALLAX && material.HasProperty("_UseParallax") && material.GetFloat("_UseParallax") != 0.0f) if(!shaderSetting.LIL_FEATURE_PARALLAX && material.HasProperty("_UseParallax") && material.GetFloat("_UseParallax") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_PARALLAX : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_PARALLAX : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_PARALLAX = true; shaderSetting.LIL_FEATURE_PARALLAX = true;
if(!shaderSetting.LIL_FEATURE_POM && material.HasProperty("_UsePOM") && material.GetFloat("_UsePOM") != 0.0f) if(!shaderSetting.LIL_FEATURE_POM && material.HasProperty("_UsePOM") && material.GetFloat("_UsePOM") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_POM : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_POM : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_POM = true; shaderSetting.LIL_FEATURE_POM = true;
} }
} }
if(!shaderSetting.LIL_FEATURE_AUDIOLINK && material.HasProperty("_UseAudioLink") && material.GetFloat("_UseAudioLink") != 0.0f) if(!shaderSetting.LIL_FEATURE_AUDIOLINK && material.HasProperty("_UseAudioLink") && material.GetFloat("_UseAudioLink") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_AUDIOLINK : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_AUDIOLINK : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_AUDIOLINK = true; shaderSetting.LIL_FEATURE_AUDIOLINK = true;
} }
if(!shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX && material.HasProperty("_AudioLink2Vertex") && material.GetFloat("_AudioLink2Vertex") != 0.0f) if(!shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX && material.HasProperty("_AudioLink2Vertex") && material.GetFloat("_AudioLink2Vertex") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_AUDIOLINK_VERTEX : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_AUDIOLINK_VERTEX : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX = true; shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX = true;
} }
if(!shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL && material.HasProperty("_AudioLinkAsLocal") && material.GetFloat("_AudioLinkAsLocal") != 0.0f) if(!shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL && material.HasProperty("_AudioLinkAsLocal") && material.GetFloat("_AudioLinkAsLocal") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_AUDIOLINK_LOCAL : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_AUDIOLINK_LOCAL : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL = true; shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL = true;
} }
if(!shaderSetting.LIL_FEATURE_DISSOLVE && material.HasProperty("_DissolveParams") && material.GetVector("_DissolveParams").x != lilConstants.defaultDissolveParams.x) if(!shaderSetting.LIL_FEATURE_DISSOLVE && material.HasProperty("_DissolveParams") && material.GetVector("_DissolveParams").x != lilConstants.defaultDissolveParams.x)
{ {
logs.Add("[lilToon] LIL_FEATURE_DISSOLVE : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_DISSOLVE : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_DISSOLVE = true; shaderSetting.LIL_FEATURE_DISSOLVE = true;
} }
if(!shaderSetting.LIL_FEATURE_DITHER && material.HasProperty("_UseDither") && material.GetFloat("_UseDither") != 0.0f) if(!shaderSetting.LIL_FEATURE_DITHER && material.HasProperty("_UseDither") && material.GetFloat("_UseDither") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_DITHER : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_DITHER : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_DITHER = true; shaderSetting.LIL_FEATURE_DITHER = true;
} }
if(!shaderSetting.LIL_FEATURE_IDMASK && ( if(!shaderSetting.LIL_FEATURE_IDMASK && (
@ -1210,12 +1199,12 @@ public class lilToonSetting : ScriptableObject
material.HasProperty("_IDMaskCompile") && material.GetFloat("_IDMaskCompile") != 0.0f material.HasProperty("_IDMaskCompile") && material.GetFloat("_IDMaskCompile") != 0.0f
)) ))
{ {
logs.Add("[lilToon] LIL_FEATURE_IDMASK : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_IDMASK : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_IDMASK = true; shaderSetting.LIL_FEATURE_IDMASK = true;
} }
if(!shaderSetting.LIL_FEATURE_UDIMDISCARD && material.HasProperty("_UDIMDiscardCompile") && material.GetFloat("_UDIMDiscardCompile") != 0.0f) { if(!shaderSetting.LIL_FEATURE_UDIMDISCARD && material.HasProperty("_UDIMDiscardCompile") && material.GetFloat("_UDIMDiscardCompile") != 0.0f) {
logs.Add("[lilToon] LIL_FEATURE_UDIMDISCARD : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_UDIMDISCARD : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_UDIMDISCARD = true; shaderSetting.LIL_FEATURE_UDIMDISCARD = true;
} }
@ -1224,24 +1213,24 @@ public class lilToonSetting : ScriptableObject
{ {
if(!shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV && material.HasProperty("_OutlineTex_ScrollRotate") && material.GetVector("_OutlineTex_ScrollRotate") != lilConstants.defaultScrollRotate) if(!shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV && material.HasProperty("_OutlineTex_ScrollRotate") && material.GetVector("_OutlineTex_ScrollRotate") != lilConstants.defaultScrollRotate)
{ {
logs.Add("[lilToon] LIL_FEATURE_ANIMATE_OUTLINE_UV : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_ANIMATE_OUTLINE_UV : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV = true; shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV = true;
} }
if(!shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION && material.HasProperty("_OutlineTexHSVG") && material.GetVector("_OutlineTexHSVG") != lilConstants.defaultHSVG) if(!shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION && material.HasProperty("_OutlineTexHSVG") && material.GetVector("_OutlineTexHSVG") != lilConstants.defaultHSVG)
{ {
logs.Add("[lilToon] LIL_FEATURE_OUTLINE_TONE_CORRECTION : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_OUTLINE_TONE_CORRECTION : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION = true; shaderSetting.LIL_FEATURE_OUTLINE_TONE_CORRECTION = true;
} }
if(!shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW && material.HasProperty("_OutlineLitShadowReceive") && material.GetFloat("_OutlineLitShadowReceive") != 0.0f) if(!shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW && material.HasProperty("_OutlineLitShadowReceive") && material.GetFloat("_OutlineLitShadowReceive") != 0.0f)
{ {
logs.Add("[lilToon] LIL_FEATURE_OUTLINE_RECEIVE_SHADOW : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_FEATURE_OUTLINE_RECEIVE_SHADOW : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW = true; shaderSetting.LIL_FEATURE_OUTLINE_RECEIVE_SHADOW = true;
} }
} }
if(!shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT && material.HasProperty("_VertexLightStrength") && material.GetFloat("_VertexLightStrength") != 0.0f) if(!shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT && material.HasProperty("_VertexLightStrength") && material.GetFloat("_VertexLightStrength") != 0.0f)
{ {
logs.Add("[lilToon] LIL_OPTIMIZE_USE_VERTEXLIGHT : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] LIL_OPTIMIZE_USE_VERTEXLIGHT : " + AssetDatabase.GetAssetPath(material));
shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = true; shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT = true;
} }
@ -1474,7 +1463,7 @@ public class lilToonSetting : ScriptableObject
private static void CheckTexture(ref bool LIL_FEATURE_Tex, string propname, Material material) private static void CheckTexture(ref bool LIL_FEATURE_Tex, string propname, Material material)
{ {
if(LIL_FEATURE_Tex || !material.HasProperty(propname) || material.GetTexture(propname) == null) return; if(LIL_FEATURE_Tex || !material.HasProperty(propname) || material.GetTexture(propname) == null) return;
logs.Add("[lilToon] " + propname + " : " + AssetDatabase.GetAssetPath(material)); Debug.Log("[lilToon] " + propname + " : " + AssetDatabase.GetAssetPath(material));
LIL_FEATURE_Tex = true; LIL_FEATURE_Tex = true;
} }

View File

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using UnityEngine.Events; using UnityEngine.Events;
using System.Linq;
namespace lilToon.External namespace lilToon.External
{ {
@ -57,7 +56,7 @@ namespace lilToon.External
var materials = new List<Material>(); var materials = new List<Material>();
foreach(var renderer in gameObject.GetComponentsInChildren<Renderer>(true)) foreach(var renderer in gameObject.GetComponentsInChildren<Renderer>(true))
{ {
materials.AddRange(renderer.sharedMaterials.Where(m => m)); materials.AddRange(renderer.sharedMaterials);
} }
return materials.ToArray(); return materials.ToArray();
} }
@ -68,7 +67,7 @@ namespace lilToon.External
foreach(var animator in gameObject.GetComponentsInChildren<Animator>(true)) foreach(var animator in gameObject.GetComponentsInChildren<Animator>(true))
{ {
if(animator.runtimeAnimatorController) clips.AddRange(animator.runtimeAnimatorController.animationClips); if(animator.runtimeAnimatorController != null) clips.AddRange(animator.runtimeAnimatorController.animationClips);
} }
try try
@ -78,9 +77,9 @@ namespace lilToon.External
foreach(var descriptor in gameObject.GetComponentsInChildren(type,true)) foreach(var descriptor in gameObject.GetComponentsInChildren(type,true))
{ {
var overrides = (AnimatorOverrideController)overridesField.GetValue(descriptor); var overrides = (AnimatorOverrideController)overridesField.GetValue(descriptor);
if(overrides) if(overrides != null)
{ {
clips.AddRange(overrides.animationClips.Where(clip => clip)); clips.AddRange(overrides.animationClips);
} }
} }
} }
@ -129,7 +128,7 @@ namespace lilToon.External
foreach(var descriptor in Selection.activeGameObject.GetComponentsInChildren(type,true)) foreach(var descriptor in Selection.activeGameObject.GetComponentsInChildren(type,true))
{ {
var overrides = (AnimatorOverrideController)overridesField.GetValue(descriptor); var overrides = (AnimatorOverrideController)overridesField.GetValue(descriptor);
if(overrides) if(overrides != null)
{ {
clips.AddRange(overrides.animationClips); clips.AddRange(overrides.animationClips);
} }
@ -161,7 +160,7 @@ namespace lilToon.External
try try
{ {
var type = Assembly.Load("Assembly-CSharp").GetType("ABI.CCK.Components.CVRAvatar"); var type = Assembly.Load("Assembly-CSharp").GetType("ABI.CCK.Components.CVRAvatar");
return Selection.activeGameObject.GetComponent(type); return Selection.activeGameObject.GetComponent(type) != null;
} }
catch(Exception e) catch(Exception e)
{ {

View File

@ -6,11 +6,12 @@
#endif #endif
#endif #endif
#if UNITY_EDITOR && (LILTOON_VRCSDK3_AVATARS || LILTOON_VRCSDK3_WORLDS || VRC_SDK_VRCSDK2) #if UNITY_EDITOR && (LILTOON_VRCSDK3_AVATARS || LILTOON_VRCSDK3_WORLDS || VRC_SDK_VRCSDK2)
using UnityEditor;
using UnityEngine;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEditor; using System.Reflection;
using UnityEngine;
using VRC.SDKBase.Editor.BuildPipeline; using VRC.SDKBase.Editor.BuildPipeline;
namespace lilToon.External namespace lilToon.External
@ -31,9 +32,9 @@ namespace lilToon.External
} }
else else
{ {
lilToonSetting.SetShaderSettingBeforeBuild(false); SetShaderSettingBeforeBuild();
EditorApplication.delayCall -= lilToonSetting.SetShaderSettingAfterBuild; EditorApplication.delayCall -= SetShaderSettingAfterBuild;
EditorApplication.delayCall += lilToonSetting.SetShaderSettingAfterBuild; EditorApplication.delayCall += SetShaderSettingAfterBuild;
} }
} }
catch(Exception e) catch(Exception e)
@ -48,15 +49,9 @@ namespace lilToon.External
{ {
try try
{ {
lilToonSetting shaderSetting = null;
lilToonSetting.InitializeShaderSetting(ref shaderSetting);
var caller = new System.Diagnostics.StackFrame(2, false);
var callerMethod = caller.GetMethod();
if(!shaderSetting.isOptimizeInNDMF && callerMethod.DeclaringType.FullName == "nadena.dev.ndmf.ApplyOnPlay") return true;
var materials = GetMaterialsFromGameObject(avatarGameObject); var materials = GetMaterialsFromGameObject(avatarGameObject);
var clips = GetAnimationClipsFromGameObject(avatarGameObject); var clips = GetAnimationClipsFromGameObject(avatarGameObject);
lilToonSetting.SetShaderSettingBeforeBuild(materials, clips); SetShaderSettingBeforeBuild(materials, clips);
lilMaterialUtils.SetupMultiMaterial(materials, clips); lilMaterialUtils.SetupMultiMaterial(materials, clips);
} }
catch(Exception e) catch(Exception e)
@ -69,7 +64,7 @@ namespace lilToon.External
public void OnPostprocessAvatar() public void OnPostprocessAvatar()
{ {
lilToonSetting.SetShaderSettingAfterBuild(); SetShaderSettingAfterBuild();
} }
private static Material[] GetMaterialsFromGameObject(GameObject gameObject) private static Material[] GetMaterialsFromGameObject(GameObject gameObject)
@ -79,8 +74,7 @@ namespace lilToon.External
{ {
materials.AddRange(renderer.sharedMaterials); materials.AddRange(renderer.sharedMaterials);
} }
// sharedMaterials may a Material[null] on Unity 2022.3.22f1 if there is no material on a renderer. return materials.ToArray();
return materials.Where(m => m != null).ToArray();
} }
private static AnimationClip[] GetAnimationClipsFromGameObject(GameObject gameObject) private static AnimationClip[] GetAnimationClipsFromGameObject(GameObject gameObject)
@ -130,6 +124,45 @@ namespace lilToon.External
return clips.ToArray(); return clips.ToArray();
} }
private static void SetShaderSettingBeforeBuild(Material[] materials, AnimationClip[] clips)
{
Type type = typeof(lilToonSetting);
var methods = type.GetMethods(BindingFlags.Static | BindingFlags.NonPublic);
foreach(var method in methods)
{
var methodParams = method.GetParameters();
if(method.Name != "SetShaderSettingBeforeBuild" || methodParams.Length != 2 || methodParams[0].ParameterType != typeof(Material[])) continue;
method.Invoke(null, new object[]{materials,clips});
break;
}
}
private static void SetShaderSettingBeforeBuild()
{
Type type = typeof(lilToonSetting);
var methods = type.GetMethods(BindingFlags.Static | BindingFlags.NonPublic);
foreach(var method in methods)
{
var methodParams = method.GetParameters();
if(method.Name != "SetShaderSettingBeforeBuild" || methodParams.Length != 0) continue;
method.Invoke(null, null);
break;
}
}
private static void SetShaderSettingAfterBuild()
{
Type type = typeof(lilToonSetting);
var methods = type.GetMethods(BindingFlags.Static | BindingFlags.NonPublic);
foreach(var method in methods)
{
var methodParams = method.GetParameters();
if(method.Name != "SetShaderSettingAfterBuild" || methodParams.Length != 0) continue;
method.Invoke(null, null);
break;
}
}
// Debug // Debug
#if LILTOON_VRCSDK3_AVATARS || VRC_SDK_VRCSDK2 #if LILTOON_VRCSDK3_AVATARS || VRC_SDK_VRCSDK2
[MenuItem("GameObject/lilToon/[Debug] Generate bug report (VRChat Avatar)", false, 23)] [MenuItem("GameObject/lilToon/[Debug] Generate bug report (VRChat Avatar)", false, 23)]
@ -171,8 +204,19 @@ namespace lilToon.External
} }
#endif #endif
lilToonEditorUtils.GenerateBugReport(null, clips, "# VRChat Avatar Debug"); Type type = typeof(lilToonEditorUtils);
EditorUtility.DisplayDialog("[Debug] Generate bug report (VRChat Avatar)","Failed to generate bug report.","OK"); var methods = type.GetMethods(BindingFlags.Static | BindingFlags.NonPublic);
foreach(var method in methods)
{
var methodParams = method.GetParameters();
if(method.Name != "GenerateBugReport" || methodParams.Length != 3) continue;
method.Invoke(null, new object[]{null, clips, "# VRChat Avatar Debug"});
return;
}
#pragma warning disable 0162
if(lilConstants.currentVersionValue < 31) EditorUtility.DisplayDialog("[Debug] Generate bug report (VRChat Avatar)","This version does not support bug reports. Prease import lilToon 1.3.5 or newer.","OK");
else EditorUtility.DisplayDialog("[Debug] Generate bug report (VRChat Avatar)","Failed to generate bug report.","OK");
#pragma warning restore 0162
} }
[MenuItem("GameObject/lilToon/[Debug] Generate bug report (VRChat Avatar)", true, 23)] [MenuItem("GameObject/lilToon/[Debug] Generate bug report (VRChat Avatar)", true, 23)]

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020-present lilxyzw Copyright (c) 2020-2024 lilxyzw
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

BIN
Assets/External/lilToon/README.md (Stored with Git LFS) vendored

Binary file not shown.

BIN
Assets/External/lilToon/README_JP.md (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -931,43 +931,13 @@
#endif #endif
#endif #endif
float4 shadowStrengthMask = 1;
#if defined(LIL_FEATURE_ShadowStrengthMask)
#if defined(_ShadowStrengthMaskLOD)
shadowStrengthMask = LIL_SAMPLE_2D(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain);
if(_ShadowStrengthMaskLOD) shadowStrengthMask = LIL_SAMPLE_2D_GRAD(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowStrengthMaskLOD), max(fd.ddyMain, _ShadowStrengthMaskLOD));
#else
shadowStrengthMask = LIL_SAMPLE_2D_GRAD(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowStrengthMaskLOD), max(fd.ddyMain, _ShadowStrengthMaskLOD));
#endif
#endif
// Shade // Shade
float aastrencth = _AAStrength;
float4 lns = 1.0; float4 lns = 1.0;
lns.x = saturate(dot(fd.L,N1)*0.5+0.5); lns.x = saturate(dot(fd.L,N1)*0.5+0.5);
lns.y = saturate(dot(fd.L,N2)*0.5+0.5); lns.y = saturate(dot(fd.L,N2)*0.5+0.5);
#if defined(LIL_FEATURE_SHADOW_3RD) #if defined(LIL_FEATURE_SHADOW_3RD)
lns.z = saturate(dot(fd.L,N3)*0.5+0.5); lns.z = saturate(dot(fd.L,N3)*0.5+0.5);
#endif #endif
if(_ShadowMaskType == 2)
{
float3 faceR = mul((float3x3)LIL_MATRIX_M, float3(-1.0,0.0,0.0));
float LdotR = dot(fd.L.xz, faceR.xz);
float sdf = LdotR < 0 ? shadowStrengthMask.g : shadowStrengthMask.r;
float3 faceF = mul((float3x3)LIL_MATRIX_M, float3(0.0,0.0,1.0)).xyz;
faceF.y *= _ShadowFlatBlur;
faceF = dot(faceF,faceF) == 0 ? 0 : normalize(faceF);
float3 faceL = fd.L.xyz;
faceL.y *= _ShadowFlatBlur;
faceL = dot(faceL,faceL) == 0 ? 0 : normalize(faceL);
float lnSDF = dot(faceL,faceF);
lns = lerp(saturate(lnSDF * 0.5 + sdf * 0.5 + 0.25), lns, shadowStrengthMask.b);
aastrencth = 0;
shadowStrengthMask.r = shadowStrengthMask.a;
}
// Shadow // Shadow
#if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW) #if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW)
@ -1015,21 +985,21 @@
lns.xyz = _ShadowPostAO ? lns.xyz : lns.xyz * shadowBorderMask.rgb; lns.xyz = _ShadowPostAO ? lns.xyz : lns.xyz * shadowBorderMask.rgb;
lns.w = lns.x; lns.w = lns.x;
lns.x = lilTooningNoSaturateScale(aastrencth, lns.x, _ShadowBorder, shadowBlur); lns.x = lilTooningNoSaturateScale(_AAStrength, lns.x, _ShadowBorder, shadowBlur);
lns.y = lilTooningNoSaturateScale(aastrencth, lns.y, _Shadow2ndBorder, shadow2ndBlur); lns.y = lilTooningNoSaturateScale(_AAStrength, lns.y, _Shadow2ndBorder, shadow2ndBlur);
lns.w = lilTooningNoSaturateScale(aastrencth, lns.w, _ShadowBorder, shadowBlur, _ShadowBorderRange); lns.w = lilTooningNoSaturateScale(_AAStrength, lns.w, _ShadowBorder, shadowBlur, _ShadowBorderRange);
#if defined(LIL_FEATURE_SHADOW_3RD) #if defined(LIL_FEATURE_SHADOW_3RD)
lns.z = lilTooningNoSaturateScale(aastrencth, lns.z, _Shadow3rdBorder, shadow3rdBlur); lns.z = lilTooningNoSaturateScale(_AAStrength, lns.z, _Shadow3rdBorder, shadow3rdBlur);
#endif #endif
lns = _ShadowPostAO ? lns * shadowBorderMask.rgbr : lns; lns = _ShadowPostAO ? lns * shadowBorderMask.rgbr : lns;
lns = saturate(lns); lns = saturate(lns);
#else #else
lns.w = lns.x; lns.w = lns.x;
lns.x = lilTooningScale(aastrencth, lns.x, _ShadowBorder, shadowBlur); lns.x = lilTooningScale(_AAStrength, lns.x, _ShadowBorder, shadowBlur);
lns.y = lilTooningScale(aastrencth, lns.y, _Shadow2ndBorder, shadow2ndBlur); lns.y = lilTooningScale(_AAStrength, lns.y, _Shadow2ndBorder, shadow2ndBlur);
lns.w = lilTooningScale(aastrencth, lns.w, _ShadowBorder, shadowBlur, _ShadowBorderRange); lns.w = lilTooningScale(_AAStrength, lns.w, _ShadowBorder, shadowBlur, _ShadowBorderRange);
#if defined(LIL_FEATURE_SHADOW_3RD) #if defined(LIL_FEATURE_SHADOW_3RD)
lns.z = lilTooningScale(aastrencth, lns.z, _Shadow3rdBorder, shadow3rdBlur); lns.z = lilTooningScale(_AAStrength, lns.z, _Shadow3rdBorder, shadow3rdBlur);
#endif #endif
#endif #endif
@ -1044,23 +1014,33 @@
// Copy // Copy
fd.shadowmix = lns.x; fd.shadowmix = lns.x;
// Strength // Strength
float shadowStrength = _ShadowStrength; float shadowStrength = _ShadowStrength;
#ifdef LIL_COLORSPACE_GAMMA #ifdef LIL_COLORSPACE_GAMMA
shadowStrength = lilSRGBToLinear(shadowStrength); shadowStrength = lilSRGBToLinear(shadowStrength);
#endif #endif
if(_ShadowMaskType == 1) float shadowStrengthMask = 1;
#if defined(LIL_FEATURE_ShadowStrengthMask)
#if defined(_ShadowStrengthMaskLOD)
shadowStrengthMask = LIL_SAMPLE_2D(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain).r;
if(_ShadowStrengthMaskLOD) shadowStrengthMask = LIL_SAMPLE_2D_GRAD(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowStrengthMaskLOD), max(fd.ddyMain, _ShadowStrengthMaskLOD)).r;
#else
shadowStrengthMask = LIL_SAMPLE_2D_GRAD(_ShadowStrengthMask, lil_sampler_linear_repeat, fd.uvMain, max(fd.ddxMain, _ShadowStrengthMaskLOD), max(fd.ddyMain, _ShadowStrengthMaskLOD)).r;
#endif
#endif
if(_ShadowMaskType)
{ {
float3 flatN = normalize(mul((float3x3)LIL_MATRIX_M, float3(0.0,0.25,1.0)));//normalize(LIL_MATRIX_M._m02_m12_m22); float3 flatN = normalize(mul((float3x3)LIL_MATRIX_M, float3(0.0,0.25,1.0)));//normalize(LIL_MATRIX_M._m02_m12_m22);
float lnFlat = saturate((dot(flatN, fd.L) + _ShadowFlatBorder) / _ShadowFlatBlur); float lnFlat = saturate((dot(flatN, fd.L) + _ShadowFlatBorder) / _ShadowFlatBlur);
#if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW) #if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW)
lnFlat *= lerp(1.0, calculatedShadow, _ShadowReceive); lnFlat *= lerp(1.0, calculatedShadow, _ShadowReceive);
#endif #endif
lns = lerp(lnFlat, lns, shadowStrengthMask.r); lns = lerp(lnFlat, lns, shadowStrengthMask);
} }
else else
{ {
shadowStrength *= shadowStrengthMask.r; shadowStrength *= shadowStrengthMask;
} }
lns.x = lerp(1.0, lns.x, shadowStrength); lns.x = lerp(1.0, lns.x, shadowStrength);

View File

@ -2,13 +2,6 @@
// Alpha in PS // Alpha in PS
// This is included in the subpass fragment shader // This is included in the subpass fragment shader
#define LIL_ALPHA_PS #define LIL_ALPHA_PS
//------------------------------------------------------------------------------------------------------------------------------
// UDIM Discard
#if defined(LIL_FEATURE_UDIMDISCARD)
OVERRIDE_UDIMDISCARD
#endif
#if LIL_RENDER > 0 #if LIL_RENDER > 0
#if defined(LIL_V2F_POSITION_WS) #if defined(LIL_V2F_POSITION_WS)
LIL_GET_POSITION_WS_DATA(input,fd); LIL_GET_POSITION_WS_DATA(input,fd);
@ -22,6 +15,12 @@
OVERRIDE_ANIMATE_MAIN_UV OVERRIDE_ANIMATE_MAIN_UV
#endif #endif
//------------------------------------------------------------------------------------------------------------------------------
// UDIM Discard
#if defined(LIL_FEATURE_UDIMDISCARD)
OVERRIDE_UDIMDISCARD
#endif
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Main Color // Main Color
#if defined(LIL_OUTLINE) #if defined(LIL_OUTLINE)

View File

@ -106,81 +106,6 @@ bool lilCheckAudioLink()
#endif #endif
} }
//------------------------------------------------------------------------------------------------------------------------------
// LTCGI
// https://github.com/PiMaker/ltcgi
#if defined(LIL_FEATURE_LTCGI)
float3 NearestPointOnLine(float3 p, float3 pos1, float3 pos2)
{
float3 v = pos2 - pos1;
float3 w = p - pos1;
float c1 = dot(w, v);
float c2 = dot(v, v);
float b = c1 / c2;
float3 pb = pos1 + b * v;
if(c1 <= 0.0) return pos1;
if(c2 <= c1) return pos2;
return pb;
}
float3 NearestPointOnQuad(float3 p, float3 v[4])
{
float3 v1 = NearestPointOnLine(p, v[0], v[1]);
float3 v2 = NearestPointOnLine(p, v[2], v[3]);
return NearestPointOnLine(p, v1, v2);
}
#define Sample(smp,uv) SampleLevel(smp,uv,0)
#include "Packages/at.pimaker.ltcgi/Shaders/LTCGI_structs.cginc"
struct lil_ltcgi_struct
{
float3 diff;
float3 spec;
float3 L;
float3 N;
float3 V;
};
float lilLTCGIAttenuation(inout lil_ltcgi_struct ltcgi, in ltcgi_output output)
{
float3 C = (output.input.Lw[1] + output.input.Lw[0] + output.input.Lw[3] + output.input.Lw[0]) * 0.25;
float3 P = NearestPointOnQuad(float3(0,0,0), output.input.Lw);
float3 N = normalize(cross(output.input.Lw[1]-output.input.Lw[0], output.input.Lw[3]-output.input.Lw[0]));
float3 L = normalize(lerp(P, C, 0.3));
float dist = lerp(length(P), length(C), 0.3) + 1;
float rim = saturate(1 - abs(dot(ltcgi.N,ltcgi.V)) * 2 + dot(ltcgi.N,L));
float atten = abs(dot(N, normalize(P))) / (pow(dist, 3));
atten *= lerp(rim, 1, saturate(dot(ltcgi.V,L) * 0.5 + 0.5));
atten = saturate(atten);
ltcgi.L += atten * dot(output.color,0.333333) * L;
return atten;
}
void callback_diffuse(inout lil_ltcgi_struct ltcgi, in ltcgi_output output) {
float atten = lilLTCGIAttenuation(ltcgi, output);
ltcgi.diff += atten * output.color * 2;
//ltcgi.diff += output.intensity * output.color;
}
void callback_specular(inout lil_ltcgi_struct ltcgi, in ltcgi_output output) {
float atten = lilLTCGIAttenuation(ltcgi, output);
ltcgi.spec += atten * output.color;
//ltcgi.spec += output.intensity * output.color;
}
#define LTCGI_V2_CUSTOM_INPUT lil_ltcgi_struct
#define LTCGI_V2_DIFFUSE_CALLBACK callback_diffuse
#define LTCGI_V2_SPECULAR_CALLBACK callback_specular
#include "Packages/at.pimaker.ltcgi/Shaders/LTCGI.cginc"
void lilLTCGI(inout lilLightData o, float3 positionWS, float3 N, float3 V, float2 uv1)
{
lil_ltcgi_struct ltcgi = (lil_ltcgi_struct)0;
ltcgi.N = N;
ltcgi.V = V;
LTCGI_Contribution(ltcgi, positionWS, N, V, 1, uv1);
o.lightColor += ltcgi.diff + ltcgi.spec;
//o.lightDirection = normalize(o.lightDirection * dot(o.lightColor+0.001,0.333333) + ltcgi.L);
}
#undef Sample
#endif
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// GTAvaCrypt // GTAvaCrypt
// https://github.com/rygo6/GTAvaCrypt/blob/master/LICENSE // https://github.com/rygo6/GTAvaCrypt/blob/master/LICENSE

View File

@ -373,7 +373,6 @@ CBUFFER_START(UnityPerMaterial)
#if defined(LIL_FUR) #if defined(LIL_FUR)
float4 _FurNoiseMask_ST; float4 _FurNoiseMask_ST;
float4 _FurVector; float4 _FurVector;
float4 _FurRimColor;
#endif #endif
#if defined(LIL_REFRACTION) || defined(LIL_GEM) #if defined(LIL_REFRACTION) || defined(LIL_GEM)
float4 _RefractionColor; float4 _RefractionColor;
@ -626,8 +625,6 @@ CBUFFER_START(UnityPerMaterial)
float _FurRootOffset; float _FurRootOffset;
float _FurRandomize; float _FurRandomize;
float _FurTouchStrength; float _FurTouchStrength;
float _FurRimFresnelPower;
float _FurRimAntiLight;
#endif #endif
#if defined(LIL_REFRACTION) || defined(LIL_GEM) #if defined(LIL_REFRACTION) || defined(LIL_GEM)
float _RefractionStrength; float _RefractionStrength;
@ -899,7 +896,7 @@ SAMPLER(sampler_AudioLinkMask);
SAMPLER(sampler_OutlineTex); SAMPLER(sampler_OutlineTex);
// AudioLink // AudioLink
#if defined(LIL_FEATURE_AUDIOLINK) && !defined(AUDIOLINK_CGINC_INCLUDED) #if defined(LIL_FEATURE_AUDIOLINK)
TEXTURE2D_FLOAT(_AudioTexture); TEXTURE2D_FLOAT(_AudioTexture);
float4 _AudioTexture_TexelSize; float4 _AudioTexture_TexelSize;
#endif #endif

View File

@ -259,7 +259,6 @@ float4 _MainTex_ST;
#if defined(LIL_FUR) #if defined(LIL_FUR)
float4 _FurNoiseMask_ST; float4 _FurNoiseMask_ST;
float4 _FurVector; float4 _FurVector;
float4 _FurRimColor;
#endif #endif
// Refraction // Refraction
@ -542,8 +541,6 @@ float _lilShadowCasterBias;
float _FurRootOffset; float _FurRootOffset;
float _FurRandomize; float _FurRandomize;
float _FurCutoutLength; float _FurCutoutLength;
float _FurRimFresnelPower;
float _FurRimAntiLight;
#if defined(LIL_FEATURE_FUR_COLLISION) #if defined(LIL_FEATURE_FUR_COLLISION)
float _FurTouchStrength; float _FurTouchStrength;
#endif #endif

View File

@ -259,7 +259,6 @@ float4 _MainTex_ST;
#if defined(LIL_FUR) #if defined(LIL_FUR)
float4 _FurNoiseMask_ST; float4 _FurNoiseMask_ST;
float4 _FurVector; float4 _FurVector;
float4 _FurRimColor;
#endif #endif
// Refraction // Refraction
@ -542,8 +541,6 @@ float _lilShadowCasterBias;
float _FurRootOffset; float _FurRootOffset;
float _FurRandomize; float _FurRandomize;
float _FurCutoutLength; float _FurCutoutLength;
float _FurRimFresnelPower;
float _FurRimAntiLight;
#if defined(LIL_FEATURE_FUR_COLLISION) #if defined(LIL_FEATURE_FUR_COLLISION)
float _FurTouchStrength; float _FurTouchStrength;
#endif #endif

View File

@ -191,7 +191,7 @@
#endif #endif
// normalOS (vertex input) // normalOS (vertex input)
#if defined(LIL_SHOULD_TANGENT) || defined(LIL_FEATURE_SHADOW) || defined(LIL_FEATURE_RIMSHADE) || defined(LIL_FEATURE_REFLECTION) || defined(LIL_FEATURE_MATCAP) || defined(LIL_FEATURE_MATCAP_2ND) || defined(LIL_FEATURE_RIMLIGHT) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_BACKLIGHT) || defined(LIL_FEATURE_DISTANCE_FADE) || defined(LIL_FEATURE_AUDIOLINK) || defined(LIL_FEATURE_LTCGI) || defined(LIL_REFRACTION) || (defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SUBTRACTIVE)) || defined(LIL_HDRP) #if defined(LIL_SHOULD_TANGENT) || defined(LIL_FEATURE_SHADOW) || defined(LIL_FEATURE_RIMSHADE) || defined(LIL_FEATURE_REFLECTION) || defined(LIL_FEATURE_MATCAP) || defined(LIL_FEATURE_MATCAP_2ND) || defined(LIL_FEATURE_RIMLIGHT) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_BACKLIGHT) || defined(LIL_FEATURE_DISTANCE_FADE) || defined(LIL_FEATURE_AUDIOLINK) || defined(LIL_REFRACTION) || (defined(LIL_USE_LIGHTMAP) && defined(LIL_LIGHTMODE_SUBTRACTIVE)) || defined(LIL_HDRP)
#define LIL_SHOULD_NORMAL #define LIL_SHOULD_NORMAL
#endif #endif
@ -201,7 +201,7 @@
#endif #endif
// positionWS // positionWS
#if defined(SHADOWS_SCREEN) || defined(LIL_PASS_FORWARDADD) || defined(LIL_FEATURE_MAIN2ND) || defined(LIL_FEATURE_MAIN3RD) || defined(LIL_FEATURE_ANISOTROPY) || defined(LIL_FEATURE_RECEIVE_SHADOW) || defined(LIL_FEATURE_RIMSHADE) || defined(LIL_FEATURE_REFLECTION) || defined(LIL_FEATURE_MATCAP) || defined(LIL_FEATURE_MATCAP_2ND) || defined(LIL_FEATURE_RIMLIGHT) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_BACKLIGHT) || defined(LIL_FEATURE_EMISSION_1ST) || defined(LIL_FEATURE_EMISSION_2ND) || defined(LIL_FEATURE_PARALLAX) || defined(LIL_FEATURE_DISTANCE_FADE) || defined(LIL_FEATURE_LTCGI) || defined(LIL_REFRACTION) || !defined(LIL_BRP) || defined(LIL_USE_LPPV) #if defined(SHADOWS_SCREEN) || defined(LIL_PASS_FORWARDADD) || defined(LIL_FEATURE_MAIN2ND) || defined(LIL_FEATURE_MAIN3RD) || defined(LIL_FEATURE_ANISOTROPY) || defined(LIL_FEATURE_RECEIVE_SHADOW) || defined(LIL_FEATURE_RIMSHADE) || defined(LIL_FEATURE_REFLECTION) || defined(LIL_FEATURE_MATCAP) || defined(LIL_FEATURE_MATCAP_2ND) || defined(LIL_FEATURE_RIMLIGHT) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_BACKLIGHT) || defined(LIL_FEATURE_EMISSION_1ST) || defined(LIL_FEATURE_EMISSION_2ND) || defined(LIL_FEATURE_PARALLAX) || defined(LIL_FEATURE_DISTANCE_FADE) || defined(LIL_REFRACTION) || !defined(LIL_BRP) || defined(LIL_USE_LPPV)
#define LIL_SHOULD_POSITION_WS #define LIL_SHOULD_POSITION_WS
#endif #endif
@ -2085,12 +2085,6 @@ struct lilLightData
#define LIL_CORRECT_LIGHTCOLOR_PS(lightColor) #define LIL_CORRECT_LIGHTCOLOR_PS(lightColor)
#endif #endif
#if defined(LIL_FEATURE_LTCGI)
#define LIL_APPLY_LTCGI(o) lilLTCGI(o, vertexInput.positionWS, normalize(vertexNormalInput.normalWS), normalize(lilHeadDirection(lilToAbsolutePositionWS(vertexInput.positionWS))), input.uv1);
#else
#define LIL_APPLY_LTCGI(o)
#endif
#if defined(LIL_PASS_FORWARDADD) #if defined(LIL_PASS_FORWARDADD)
#define LIL_CALC_MAINLIGHT(i,o) #define LIL_CALC_MAINLIGHT(i,o)
#elif defined(LIL_HDRP) #elif defined(LIL_HDRP)
@ -2117,7 +2111,6 @@ struct lilLightData
o.lightDirection = lightDatas.lightDirection; \ o.lightDirection = lightDatas.lightDirection; \
o.lightColor = lightDatas.directLight; \ o.lightColor = lightDatas.directLight; \
o.indLightColor = lightDatas.indirectLight; \ o.indLightColor = lightDatas.indirectLight; \
LIL_APPLY_LTCGI(o) \
LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o); \ LIL_APPLY_ADDITIONALLIGHT_TO_MAIN(i,o); \
LIL_CORRECT_LIGHTCOLOR_VS(o.lightColor) LIL_CORRECT_LIGHTCOLOR_VS(o.lightColor)
#else #else

View File

@ -286,13 +286,13 @@ LIL_V2F_TYPE vert(appdata input)
#if defined(LIL_V2F_POSITION_CS) && defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) #if defined(LIL_V2F_POSITION_CS) && defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED)
#if defined(UNITY_REVERSED_Z) #if defined(UNITY_REVERSED_Z)
// DirectX // DirectX
if(LIL_V2F_OUT_BASE.positionCS.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT_BASE.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(LIL_V2F_OUT_BASE.positionCS.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT_BASE.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
LIL_V2F_OUT_BASE.positionCS.z = LIL_V2F_OUT_BASE.positionCS.z * 0.0001 + LIL_V2F_OUT_BASE.positionCS.w * 0.999; LIL_V2F_OUT_BASE.positionCS.z = LIL_V2F_OUT_BASE.positionCS.z * 0.0001 + LIL_V2F_OUT_BASE.positionCS.w * 0.999;
} }
#else #else
// OpenGL // OpenGL
if(LIL_V2F_OUT_BASE.positionCS.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT_BASE.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(LIL_V2F_OUT_BASE.positionCS.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT_BASE.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
LIL_V2F_OUT_BASE.positionCS.z = LIL_V2F_OUT_BASE.positionCS.z * 0.0001 - LIL_V2F_OUT_BASE.positionCS.w * 0.999; LIL_V2F_OUT_BASE.positionCS.z = LIL_V2F_OUT_BASE.positionCS.z * 0.0001 - LIL_V2F_OUT_BASE.positionCS.w * 0.999;
} }
@ -315,13 +315,13 @@ LIL_V2F_TYPE vert(appdata input)
#if defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED) #if defined(LIL_FEATURE_CLIPPING_CANCELLER) && !defined(LIL_LITE) && !defined(LIL_PASS_SHADOWCASTER_INCLUDED) && !defined(LIL_PASS_META_INCLUDED)
#if defined(UNITY_REVERSED_Z) #if defined(UNITY_REVERSED_Z)
// DirectX // DirectX
if(LIL_V2F_OUT.positionCSOL.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT.positionCSOL.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(LIL_V2F_OUT.positionCSOL.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT.positionCSOL.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
LIL_V2F_OUT.positionCSOL.z = LIL_V2F_OUT.positionCSOL.z * 0.0001 + LIL_V2F_OUT.positionCSOL.w * 0.999; LIL_V2F_OUT.positionCSOL.z = LIL_V2F_OUT.positionCSOL.z * 0.0001 + LIL_V2F_OUT.positionCSOL.w * 0.999;
} }
#else #else
// OpenGL // OpenGL
if(LIL_V2F_OUT.positionCSOL.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT.positionCSOL.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(LIL_V2F_OUT.positionCSOL.w < _ProjectionParams.y * 1.01 && LIL_V2F_OUT.positionCSOL.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
LIL_V2F_OUT.positionCSOL.z = LIL_V2F_OUT.positionCSOL.z * 0.0001 - LIL_V2F_OUT.positionCSOL.w * 0.999; LIL_V2F_OUT.positionCSOL.z = LIL_V2F_OUT.positionCSOL.z * 0.0001 - LIL_V2F_OUT.positionCSOL.w * 0.999;
} }
@ -417,7 +417,7 @@ LIL_V2F_TYPE vert(appdata input)
#if defined(LIL_FEATURE_UDIMDISCARD) && !defined(LIL_LITE) #if defined(LIL_FEATURE_UDIMDISCARD) && !defined(LIL_LITE)
if(_UDIMDiscardMode == 0 && _UDIMDiscardCompile == 1 && LIL_CHECK_UDIMDISCARD(input)) // Discard Vertices instead of just pixels if(_UDIMDiscardMode == 0 && _UDIMDiscardCompile == 1 && LIL_CHECK_UDIMDISCARD(input)) // Discard Vertices instead of just pixels
{ {
#if defined(LIL_V2F_POSITION_CS) || defined(LIL_V2F_SHADOW_CASTER_OUTPUT) #if defined(LIL_V2F_POSITION_CS)
LIL_V2F_OUT_BASE.positionCS = 0.0/0.0; LIL_V2F_OUT_BASE.positionCS = 0.0/0.0;
#endif #endif
#if defined(LIL_ONEPASS_OUTLINE) #if defined(LIL_ONEPASS_OUTLINE)

View File

@ -123,18 +123,6 @@ v2g vert(appdata input)
LIL_CUSTOM_VERT_COPY LIL_CUSTOM_VERT_COPY
//------------------------------------------------------------------------------------------------------------------------------
// UDIM Discard
#if defined(LIL_FEATURE_UDIMDISCARD) && !defined(LIL_LITE)
if(_UDIMDiscardMode == 0 && _UDIMDiscardCompile == 1 && LIL_CHECK_UDIMDISCARD(input)) // Discard Vertices instead of just pixels
{
#if defined(LIL_V2F_POSITION_CS)
output.positionWS = 0.0/0.0;
#endif
return output;
}
#endif
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Fog & Lighting // Fog & Lighting
lilFragData fd = lilInitFragData(); lilFragData fd = lilInitFragData();
@ -237,6 +225,17 @@ v2g vert(appdata input)
#endif #endif
#endif #endif
//------------------------------------------------------------------------------------------------------------------------------
// UDIM Discard
#if defined(LIL_FEATURE_UDIMDISCARD) && !defined(LIL_LITE)
if(_UDIMDiscardMode == 0 && _UDIMDiscardCompile == 1 && LIL_CHECK_UDIMDISCARD(input)) // Discard Vertices instead of just pixels
{
#if defined(LIL_V2F_POSITION_CS)
output.positionWS = 0.0/0.0;
#endif
}
#endif
return output; return output;
} }
@ -274,9 +273,6 @@ void AppendFur(inout TriangleStream<v2f> outStream, inout v2f output, v2g input[
#if defined(LIL_V2F_NORMAL_WS) #if defined(LIL_V2F_NORMAL_WS)
output.normalWS = lilLerp3(input[0].normalWS, input[1].normalWS, input[2].normalWS, factor); output.normalWS = lilLerp3(input[0].normalWS, input[1].normalWS, input[2].normalWS, factor);
#endif #endif
#if defined(LIL_V2F_LIGHTCOLOR) && defined(LIL_FEATURE_LTCGI) && defined(LIL_PASS_FORWARD)
output.lightColor = lilLerp3(input[0].lightColor, input[1].lightColor, input[2].lightColor, factor);
#endif
#if defined(LIL_V2F_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP)) #if defined(LIL_V2F_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP))
output.vlf = lilLerp3(input[0].vlf, input[1].vlf, input[2].vlf, factor); output.vlf = lilLerp3(input[0].vlf, input[1].vlf, input[2].vlf, factor);
#endif #endif
@ -300,13 +296,13 @@ void AppendFur(inout TriangleStream<v2f> outStream, inout v2f output, v2g input[
// Clipping Canceller // Clipping Canceller
#if defined(UNITY_REVERSED_Z) #if defined(UNITY_REVERSED_Z)
// DirectX // DirectX
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999;
} }
#else #else
// OpenGL // OpenGL
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999;
} }
@ -344,13 +340,13 @@ void AppendFur(inout TriangleStream<v2f> outStream, inout v2f output, v2g input[
// Clipping Canceller // Clipping Canceller
#if defined(UNITY_REVERSED_Z) #if defined(UNITY_REVERSED_Z)
// DirectX // DirectX
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999;
} }
#else #else
// OpenGL // OpenGL
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999;
} }

View File

@ -28,9 +28,6 @@
#if defined(LIL_V2G_NORMAL_WS) #if defined(LIL_V2G_NORMAL_WS)
float3 ndc = (input[0].normalWS +input[1].normalWS +input[2].normalWS) *0.333333333333; float3 ndc = (input[0].normalWS +input[1].normalWS +input[2].normalWS) *0.333333333333;
#endif #endif
#if defined(LIL_V2F_LIGHTCOLOR) && defined(LIL_FEATURE_LTCGI) && defined(LIL_PASS_FORWARD)
float3 lcc = (input[0].lightColor +input[1].lightColor +input[2].lightColor) * 0.333333333333;
#endif
#if defined(LIL_V2G_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP)) #if defined(LIL_V2G_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP))
LIL_VERTEXLIGHT_FOG_TYPE vlfc = (input[0].vlf + input[1].vlf + input[2].vlf) * 0.333333333333; LIL_VERTEXLIGHT_FOG_TYPE vlfc = (input[0].vlf + input[1].vlf + input[2].vlf) * 0.333333333333;
#endif #endif
@ -68,9 +65,6 @@ for(uint fl = 0; fl < _FurLayerNum; fl++)
#if defined(LIL_V2F_NORMAL_WS) #if defined(LIL_V2F_NORMAL_WS)
output.normalWS = lerp(input[ii2].normalWS,ndc,lpmix); output.normalWS = lerp(input[ii2].normalWS,ndc,lpmix);
#endif #endif
#if defined(LIL_V2F_LIGHTCOLOR) && defined(LIL_FEATURE_LTCGI) && defined(LIL_PASS_FORWARD)
output.lightColor = lerp(input[ii2].lightColor,lcc,lpmix);
#endif
#if defined(LIL_V2F_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP)) #if defined(LIL_V2F_VERTEXLIGHT_FOG) && !(!defined(LIL_USE_ADDITIONALLIGHT_VS) && defined(LIL_HDRP))
output.vlf = lerp(input[ii2].vlf,vlfc,lpmix); output.vlf = lerp(input[ii2].vlf,vlfc,lpmix);
#endif #endif
@ -106,13 +100,13 @@ for(uint fl = 0; fl < _FurLayerNum; fl++)
// Clipping Canceller // Clipping Canceller
#if defined(UNITY_REVERSED_Z) #if defined(UNITY_REVERSED_Z)
// DirectX // DirectX
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999;
} }
#else #else
// OpenGL // OpenGL
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999;
} }
@ -149,13 +143,13 @@ for(uint fl = 0; fl < _FurLayerNum; fl++)
// Clipping Canceller // Clipping Canceller
#if defined(UNITY_REVERSED_Z) #if defined(UNITY_REVERSED_Z)
// DirectX // DirectX
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 + output.positionCS.w * 0.999;
} }
#else #else
// OpenGL // OpenGL
if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING && !LIL_IS_MIRROR) if(output.positionCS.w < _ProjectionParams.y * 1.01 && output.positionCS.w > 0 && _ProjectionParams.y < LIL_NEARCLIP_THRESHOLD LIL_MULTI_SHOULD_CLIPPING)
{ {
output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999; output.positionCS.z = output.positionCS.z * 0.0001 - output.positionCS.w * 0.999;
} }

View File

@ -53,9 +53,9 @@ v2f vert(appdata input)
#else #else
float3 lightDirection = normalize(lilGetLightDirection() + length(_FakeShadowVector.xyz) * normalize(mul((float3x3)LIL_MATRIX_M, _FakeShadowVector.xyz))); float3 lightDirection = normalize(lilGetLightDirection() + length(_FakeShadowVector.xyz) * normalize(mul((float3x3)LIL_MATRIX_M, _FakeShadowVector.xyz)));
#endif #endif
float4 lightShift = mul(LIL_MATRIX_VP, float4(lightDirection * _FakeShadowVector.w, 0)); float2 lightShift = mul((float3x3)LIL_MATRIX_VP, lightDirection * _FakeShadowVector.w).xy;
output.positionCS = vertexInput.positionCS; output.positionCS = vertexInput.positionCS;
output.positionCS -= lightShift; output.positionCS.xy -= lightShift.xy;
output.uv0 = input.uv0 * _MainTex_ST.xy + _MainTex_ST.zw; output.uv0 = input.uv0 * _MainTex_ST.xy + _MainTex_ST.zw;
LIL_TRANSFER_FOG(vertexInput, output); LIL_TRANSFER_FOG(vertexInput, output);

View File

@ -17,7 +17,9 @@
// v2g // v2g
#define LIL_V2G_TEXCOORD0 #define LIL_V2G_TEXCOORD0
#define LIL_V2G_POSITION_WS #define LIL_V2G_POSITION_WS
#if defined(LIL_V2G_FORCE_NORMAL_WS) || defined(LIL_SHOULD_NORMAL)
#define LIL_V2G_NORMAL_WS #define LIL_V2G_NORMAL_WS
#endif
#if !defined(LIL_PASS_FORWARDADD) #if !defined(LIL_PASS_FORWARDADD)
#define LIL_V2G_LIGHTCOLOR #define LIL_V2G_LIGHTCOLOR
#define LIL_V2G_LIGHTDIRECTION #define LIL_V2G_LIGHTDIRECTION
@ -31,10 +33,15 @@
// g2f // g2f
#define LIL_V2F_POSITION_CS #define LIL_V2F_POSITION_CS
#define LIL_V2F_POSITION_WS
#define LIL_V2F_TEXCOORD0 #define LIL_V2F_TEXCOORD0
#define LIL_V2F_NORMAL_WS
#if defined(LIL_V2F_FORCE_POSITION_WS) || defined(LIL_PASS_FORWARDADD) || defined(LIL_FEATURE_DISTANCE_FADE) || !defined(LIL_BRP) || defined(LIL_USE_LPPV)
#define LIL_V2F_POSITION_WS
#endif
#if defined(LIL_V2F_FORCE_NORMAL_WS) || defined(LIL_SHOULD_NORMAL)
#define LIL_V2F_NORMAL_WS
#endif
#if !defined(LIL_PASS_FORWARDADD) #if !defined(LIL_PASS_FORWARDADD)
#define LIL_V2F_LIGHTCOLOR #define LIL_V2F_LIGHTCOLOR
#define LIL_V2F_LIGHTDIRECTION #define LIL_V2F_LIGHTDIRECTION
@ -51,7 +58,9 @@ struct v2g
float3 positionWS : TEXCOORD1; float3 positionWS : TEXCOORD1;
float3 furVector : TEXCOORD2; float3 furVector : TEXCOORD2;
uint vertexID : TEXCOORD3; uint vertexID : TEXCOORD3;
#if defined(LIL_V2G_NORMAL_WS)
float3 normalWS : TEXCOORD4; float3 normalWS : TEXCOORD4;
#endif
LIL_LIGHTCOLOR_COORDS(5) LIL_LIGHTCOLOR_COORDS(5)
LIL_LIGHTDIRECTION_COORDS(6) LIL_LIGHTDIRECTION_COORDS(6)
LIL_INDLIGHTCOLOR_COORDS(7) LIL_INDLIGHTCOLOR_COORDS(7)
@ -65,8 +74,12 @@ struct v2f
{ {
float4 positionCS : SV_POSITION; float4 positionCS : SV_POSITION;
float2 uv0 : TEXCOORD0; float2 uv0 : TEXCOORD0;
#if defined(LIL_V2F_POSITION_WS)
float3 positionWS : TEXCOORD1; float3 positionWS : TEXCOORD1;
#endif
#if defined(LIL_V2F_NORMAL_WS)
LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD2; LIL_VECTOR_INTERPOLATION float3 normalWS : TEXCOORD2;
#endif
float furLayer : TEXCOORD3; float furLayer : TEXCOORD3;
LIL_LIGHTCOLOR_COORDS(4) LIL_LIGHTCOLOR_COORDS(4)
LIL_LIGHTDIRECTION_COORDS(5) LIL_LIGHTDIRECTION_COORDS(5)
@ -142,14 +155,12 @@ float4 frag(v2f input) : SV_Target
clip(fd.col.a - _Cutoff); clip(fd.col.a - _Cutoff);
#endif #endif
fd.origN = normalize(input.normalWS);
fd.N = normalize(input.normalWS);
BEFORE_SHADOW BEFORE_SHADOW
#ifndef LIL_PASS_FORWARDADD #ifndef LIL_PASS_FORWARDADD
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Lighting // Lighting
#if defined(LIL_FEATURE_SHADOW) #if defined(LIL_FEATURE_SHADOW)
fd.N = normalize(input.normalWS);
fd.ln = dot(fd.L, fd.N); fd.ln = dot(fd.L, fd.N);
OVERRIDE_SHADOW OVERRIDE_SHADOW
fd.col.rgb += fd.albedo * fd.addLightColor; fd.col.rgb += fd.albedo * fd.addLightColor;
@ -159,6 +170,7 @@ float4 frag(v2f input) : SV_Target
#endif #endif
#else #else
#if defined(LIL_FEATURE_SHADOW) && defined(LIL_OPTIMIZE_APPLY_SHADOW_FA) #if defined(LIL_FEATURE_SHADOW) && defined(LIL_OPTIMIZE_APPLY_SHADOW_FA)
fd.N = normalize(input.normalWS);
fd.ln = dot(fd.L, fd.N); fd.ln = dot(fd.L, fd.N);
OVERRIDE_SHADOW OVERRIDE_SHADOW
#else #else
@ -170,15 +182,6 @@ float4 frag(v2f input) : SV_Target
#endif #endif
#endif #endif
//------------------------------------------------------------------------------------------------------------------------------
// Rim Shade
BEFORE_RIMSHADE
#if defined(LIL_FEATURE_RIMSHADE)
OVERRIDE_RIMSHADE
#endif
fd.col.rgb += input.furLayer * pow((1-abs(dot(normalize(fd.N), fd.V))), _FurRimFresnelPower) * lerp(1,lilGray(fd.invLighting), _FurRimAntiLight) * _FurRimColor.rgb * fd.lightColor;
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Distance Fade // Distance Fade
BEFORE_DISTANCE_FADE BEFORE_DISTANCE_FADE

View File

@ -258,50 +258,6 @@ float4 frag(v2f input LIL_VFACE(facing)) : SV_Target
BEFORE_MAIN BEFORE_MAIN
OVERRIDE_MAIN OVERRIDE_MAIN
//------------------------------------------------------------------------------------------------------------------------------
// Normal
#if defined(LIL_V2F_NORMAL_WS)
#if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND)
float3 normalmap = float3(0.0,0.0,1.0);
// 1st
BEFORE_NORMAL_1ST
#if defined(LIL_FEATURE_NORMAL_1ST)
OVERRIDE_NORMAL_1ST
#endif
// 2nd
BEFORE_NORMAL_2ND
#if defined(LIL_FEATURE_NORMAL_2ND)
OVERRIDE_NORMAL_2ND
#endif
fd.N = normalize(mul(normalmap, fd.TBN));
fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N;
#else
fd.N = normalize(input.normalWS);
fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N;
#endif
fd.ln = dot(fd.L, fd.N);
#if defined(LIL_V2F_POSITION_WS)
fd.nv = saturate(dot(fd.N, fd.V));
fd.nvabs = abs(dot(fd.N, fd.V));
fd.uvRim = float2(fd.nvabs,fd.nvabs);
#endif
fd.origN = normalize(input.normalWS);
fd.uvMat = mul(fd.cameraMatrix, fd.N).xy * 0.5 + 0.5;
#endif
fd.reflectionN = fd.N;
fd.matcapN = fd.N;
fd.matcap2ndN = fd.N;
//------------------------------------------------------------------------------------------------------------------------------
// AudioLink
BEFORE_AUDIOLINK
#if defined(LIL_FEATURE_AUDIOLINK)
OVERRIDE_AUDIOLINK
#endif
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Layer Color // Layer Color
#if defined(LIL_V2F_TANGENT_WS) #if defined(LIL_V2F_TANGENT_WS)
@ -398,6 +354,43 @@ float4 frag(v2f input LIL_VFACE(facing)) : SV_Target
fd.col.rgb *= 1.0-furAO; fd.col.rgb *= 1.0-furAO;
#endif #endif
//------------------------------------------------------------------------------------------------------------------------------
// Normal
#if defined(LIL_V2F_NORMAL_WS)
#if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND)
float3 normalmap = float3(0.0,0.0,1.0);
// 1st
BEFORE_NORMAL_1ST
#if defined(LIL_FEATURE_NORMAL_1ST)
OVERRIDE_NORMAL_1ST
#endif
// 2nd
BEFORE_NORMAL_2ND
#if defined(LIL_FEATURE_NORMAL_2ND)
OVERRIDE_NORMAL_2ND
#endif
fd.N = normalize(mul(normalmap, fd.TBN));
fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N;
#else
fd.N = normalize(input.normalWS);
fd.N = fd.facing < (_FlipNormal-1.0) ? -fd.N : fd.N;
#endif
fd.ln = dot(fd.L, fd.N);
#if defined(LIL_V2F_POSITION_WS)
fd.nv = saturate(dot(fd.N, fd.V));
fd.nvabs = abs(dot(fd.N, fd.V));
fd.uvRim = float2(fd.nvabs,fd.nvabs);
#endif
fd.origN = normalize(input.normalWS);
fd.uvMat = mul(fd.cameraMatrix, fd.N).xy * 0.5 + 0.5;
#endif
fd.reflectionN = fd.N;
fd.matcapN = fd.N;
fd.matcap2ndN = fd.N;
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Anisotropy // Anisotropy
BEFORE_ANISOTROPY BEFORE_ANISOTROPY
@ -405,6 +398,13 @@ float4 frag(v2f input LIL_VFACE(facing)) : SV_Target
OVERRIDE_ANISOTROPY OVERRIDE_ANISOTROPY
#endif #endif
//------------------------------------------------------------------------------------------------------------------------------
// AudioLink
BEFORE_AUDIOLINK
#if defined(LIL_FEATURE_AUDIOLINK)
OVERRIDE_AUDIOLINK
#endif
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// Copy // Copy
fd.albedo = fd.col.rgb; fd.albedo = fd.col.rgb;

View File

@ -10,7 +10,7 @@
#define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7) #define LIL_CUSTOM_V2F_MEMBER(id0,id1,id2,id3,id4,id5,id6,id7)
#endif #endif
#if defined(LIL_V2F_FORCE_TEXCOORD0) || (LIL_RENDER > 0) || defined(LIL_FEATURE_UDIMDISCARD) #if defined(LIL_V2F_FORCE_TEXCOORD0) || (LIL_RENDER > 0)
#if defined(LIL_FUR) #if defined(LIL_FUR)
#define LIL_V2F_TEXCOORD0 #define LIL_V2F_TEXCOORD0
#else #else

View File

@ -602,7 +602,7 @@ Shader "lilToon"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonCutout"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonCutoutOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonOutlineOnlyCutout"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -85,7 +85,7 @@ Shader "_lil/[Optional] lilToonFakeShadow"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
} }
SubShader SubShader

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonFur"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced
@ -652,9 +652,6 @@ Shader "Hidden/lilToonFur"
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonFurCutout"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced
@ -652,9 +652,6 @@ Shader "Hidden/lilToonFurCutout"
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonFurTwoPass"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced
@ -652,9 +652,6 @@ Shader "Hidden/lilToonFurTwoPass"
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonFurOnlyTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced
@ -652,9 +652,6 @@ Shader "_lil/[Optional] lilToonFurOnlyTransparent"
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonFurOnlyCutout"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced
@ -652,9 +652,6 @@ Shader "_lil/[Optional] lilToonFurOnlyCutout"
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonFurOnlyTwoPass"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced
@ -652,9 +652,6 @@ Shader "_lil/[Optional] lilToonFurOnlyTwoPass"
_FurRootOffset ("sRootWidth", Range(-1,0)) = 0 _FurRootOffset ("sRootWidth", Range(-1,0)) = 0
_FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8 _FurCutoutLength ("sLength+ (Cutout)", Float) = 0.8
_FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0 _FurTouchStrength ("sTouchStrength", Range(0, 1)) = 0
_FurRimColor ("sColor", Color) = (0.0,0.0,0.0,1.0)
[PowerSlider(3.0)]_FurRimFresnelPower ("sFresnelPower", Range(0.01, 50)) = 3.0
_FurRimAntiLight ("sAntiLight", Range(0, 1)) = 0.5
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Fur Advanced // Fur Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonGem"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonOnePassTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonOnePassTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonOutlineOnly"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonOverlay"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonOverlayOnePass"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonRefraction"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonRefractionBlur"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellation"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationCutout"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationCutoutOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/[Optional] lilToonOutlineOnlyTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTwoPassTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "Hidden/lilToonTwoPassTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLite"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteCutout"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteCutoutOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteOnePassTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteOnePassTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "_lil/[Optional] lilToonLiteOverlay"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "_lil/[Optional] lilToonLiteOverlayOnePass"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteTwoPassTransparent"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -87,7 +87,7 @@ Shader "Hidden/lilToonLiteTwoPassTransparentOutline"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

View File

@ -602,7 +602,7 @@ Shader "_lil/lilToonMulti"
[HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1) [HideInInspector] _BaseColor ("sColor", Color) = (1,1,1,1)
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {} [HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
[HideInInspector] _lilToonVersion ("Version", Int) = 45 [HideInInspector] _lilToonVersion ("Version", Int) = 43
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// Advanced // Advanced

Some files were not shown because too many files have changed in this diff Show More