From cfbdba4e0ae12ccd59136dcfed290da402779c54 Mon Sep 17 00:00:00 2001 From: lilxyzw Date: Wed, 1 Dec 2021 14:48:36 +0900 Subject: [PATCH] 1.2.6 --- Assets/lilToon/CHANGELOG.md | 24 +- Assets/lilToon/CHANGELOG_JP.md | 24 +- Assets/lilToon/Editor/lang.txt | 4 + Assets/lilToon/Editor/lilInspector.cs | 808 +++++++++++++----- Assets/lilToon/Editor/lilToonEditorUtils.cs | 1 + .../lilToon/Editor/lilToonPropertyDrawer.cs | 53 +- Assets/lilToon/Editor/lilToonSetting.cs | 3 - Assets/lilToon/MANUAL.md | 15 +- Assets/lilToon/MANUAL_JP.md | 17 +- Assets/lilToon/README.md | 10 +- Assets/lilToon/README_JP.md | 10 +- ...tom Pass Shader-custom_ltsmulti.shader.txt | 150 +++- ...ss Shader-custom_ltspass_opaque.shader.txt | 109 ++- .../lilToon/Shader/Includes/lil_common.hlsl | 2 + .../Shader/Includes/lil_common_frag.hlsl | 561 +++++++----- .../Shader/Includes/lil_common_functions.hlsl | 7 +- .../Shader/Includes/lil_common_input.hlsl | 117 ++- .../Shader/Includes/lil_common_macro.hlsl | 23 +- .../Shader/Includes/lil_common_vert.hlsl | 4 +- .../Shader/Includes/lil_pass_forward_gem.hlsl | 4 +- .../Includes/lil_pass_forward_normal.hlsl | 5 +- .../Includes/lil_pass_forward_refblur.hlsl | 2 +- .../Shader/Includes/lil_tessellation.hlsl | 12 +- .../Shader/Includes/lil_vert_audiolink.hlsl | 12 +- Assets/lilToon/Shader/lts.shader | 38 +- Assets/lilToon/Shader/lts_cutout.shader | 38 +- Assets/lilToon/Shader/lts_cutout_o.shader | 39 +- Assets/lilToon/Shader/lts_fakeshadow.shader | 7 + Assets/lilToon/Shader/lts_fur.shader | 53 +- Assets/lilToon/Shader/lts_fur_cutout.shader | 56 +- Assets/lilToon/Shader/lts_gem.shader | 65 +- Assets/lilToon/Shader/lts_o.shader | 39 +- Assets/lilToon/Shader/lts_onetrans.shader | 38 +- Assets/lilToon/Shader/lts_onetrans_o.shader | 39 +- Assets/lilToon/Shader/lts_overlay.shader | 38 +- Assets/lilToon/Shader/lts_overlay_one.shader | 38 +- Assets/lilToon/Shader/lts_ref.shader | 67 +- Assets/lilToon/Shader/lts_ref_blur.shader | 67 +- Assets/lilToon/Shader/lts_tess.shader | 38 +- Assets/lilToon/Shader/lts_tess_cutout.shader | 38 +- .../lilToon/Shader/lts_tess_cutout_o.shader | 39 +- Assets/lilToon/Shader/lts_tess_o.shader | 39 +- .../lilToon/Shader/lts_tess_onetrans.shader | 38 +- .../lilToon/Shader/lts_tess_onetrans_o.shader | 39 +- Assets/lilToon/Shader/lts_tess_trans.shader | 38 +- Assets/lilToon/Shader/lts_tess_trans_o.shader | 39 +- .../lilToon/Shader/lts_tess_twotrans.shader | 38 +- .../lilToon/Shader/lts_tess_twotrans_o.shader | 39 +- Assets/lilToon/Shader/lts_trans.shader | 38 +- Assets/lilToon/Shader/lts_trans_o.shader | 39 +- Assets/lilToon/Shader/lts_twotrans.shader | 38 +- Assets/lilToon/Shader/lts_twotrans_o.shader | 39 +- Assets/lilToon/Shader/ltsl.shader | 1 + Assets/lilToon/Shader/ltsl_cutout.shader | 1 + Assets/lilToon/Shader/ltsl_cutout_o.shader | 2 + Assets/lilToon/Shader/ltsl_o.shader | 2 + Assets/lilToon/Shader/ltsl_onetrans.shader | 1 + Assets/lilToon/Shader/ltsl_onetrans_o.shader | 2 + Assets/lilToon/Shader/ltsl_overlay.shader | 1 + Assets/lilToon/Shader/ltsl_overlay_one.shader | 1 + Assets/lilToon/Shader/ltsl_trans.shader | 1 + Assets/lilToon/Shader/ltsl_trans_o.shader | 2 + Assets/lilToon/Shader/ltsl_twotrans.shader | 1 + Assets/lilToon/Shader/ltsl_twotrans_o.shader | 2 + Assets/lilToon/Shader/ltsmulti.shader | 75 +- Assets/lilToon/Shader/ltsmulti_fur.shader | 53 +- Assets/lilToon/Shader/ltsmulti_gem.shader | 65 +- Assets/lilToon/Shader/ltsmulti_ref.shader | 68 +- Assets/lilToon/Shader/ltspass_baker.shader | 59 +- Assets/lilToon/Shader/ltspass_cutout.shader | 38 +- .../lilToon/Shader/ltspass_lite_cutout.shader | 38 +- .../lilToon/Shader/ltspass_lite_opaque.shader | 38 +- .../Shader/ltspass_lite_transparent.shader | 39 +- Assets/lilToon/Shader/ltspass_opaque.shader | 38 +- .../lilToon/Shader/ltspass_tess_cutout.shader | 60 +- .../lilToon/Shader/ltspass_tess_opaque.shader | 60 +- .../Shader/ltspass_tess_transparent.shader | 63 +- .../lilToon/Shader/ltspass_transparent.shader | 39 +- Assets/lilToon/Third Party Notices.md | 1 + Assets/lilToon/package.json | 2 +- version.json | 2 +- 81 files changed, 2939 insertions(+), 954 deletions(-) diff --git a/Assets/lilToon/CHANGELOG.md b/Assets/lilToon/CHANGELOG.md index 5fb52b73..c5f9b0d7 100644 --- a/Assets/lilToon/CHANGELOG.md +++ b/Assets/lilToon/CHANGELOG.md @@ -4,13 +4,35 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.6] - 2021-12-01 +### Added +- Custom UV for some textures +- `Normal Map Strength` to each function +- `Blur` properties for MatCap +- Adjustment properties to alpha mask and AO mask +- Properties for non-AudioLink compatible worlds +- Spectrum display for AudioLink +- A feature to customize shader safety fallback in VRChat + +### Changed +- Changed to use G channel of AO map as range of 2nd shadow color +- Changed to use each RGB channel of a MatCap mask +- Changed to remove custom UVs that had little impact on performance from shader settings and always enable them +- Changed sampler to trilinear + +### Fixed +- Fixed an issue where the ForwardAdd path did not reflect the transparency of the refraction shader +- Fixed refraction / gem shader rendering +- Fixed an issue where the tessellation shader wasn't handling fogs well +- Fixed an issue where MatCap uv calculation of lite version wasn't working well in HDRP + ## [1.2.5] - 2021-11-21 ### Fixed - Fixed an issue where the fur shader wasn't handling fogs well ## [1.2.4] - 2021-11-20 ### Added -- `Border` and` Blur` properties for toon specular +- `Border` and `Blur` properties for toon specular - UV Mode in Emission - `uint vertexID : SV_VertexID` to the input of the appdata structure - Support for Light Layers (URP) diff --git a/Assets/lilToon/CHANGELOG_JP.md b/Assets/lilToon/CHANGELOG_JP.md index 3f90e2f1..b241ff9c 100644 --- a/Assets/lilToon/CHANGELOG_JP.md +++ b/Assets/lilToon/CHANGELOG_JP.md @@ -4,13 +4,35 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.6] - 2021-12-01 +### 追加 +- いくつかのテクスチャにカスタムUVを追加 +- 各機能に`ノーマルマップ強度`プロパティを追加 +- マットキャップに`ぼかし`プロパティの追加 +- アルファマスク、AOマスクに調整用プロパティを追加 +- AudioLink非対応ワールドでの挙動調整用のプロパティの追加 +- AudioLinkにスペクトラム表示を追加 +- VRChatでセーフティー発動時のシェーダーのフォールバック先をカスタマイズする機能の追加 + +### 変更 +- AOマップでGチャンネルを影色2の範囲として使えるように変更 +- マットキャップのマスクでRGBチャンネルそれぞれを使えるように変更 +- シェーダー設定から負荷に影響がほぼなかったカスタムUVを削除し常に有効化するように変更 +- 汎用サンプラーをTrilinear化 + +### 修正 +- 屈折シェーダーのForwardAddパスで透明度が反映されていなかったのを修正 +- 屈折・宝石シェーダーの描画を修正 +- テッセレーションシェーダーでフォグの処理がうまくできていなかったのを修正 +- HDRPでのLiteバージョンのMatCapのUVのプロジェクションを修正 + ## [1.2.5] - 2021-11-21 ### 修正 - ファーシェーダーでフォグの処理がうまくできていなかったのを修正 ## [1.2.4] - 2021-11-20 ### 追加 -- 光沢のタイプのトゥーンに`範囲`と`ぼかし`パラメーターを追加 +- 光沢のタイプのトゥーンに`範囲`と`ぼかし`プロパティを追加 - 発光に様々なUVモードを追加 - カスタムシェーダー作成時のappdata構造体の入力に`uint vertexID : SV_VertexID`を追加 - Light Layersに対応 (URP) diff --git a/Assets/lilToon/Editor/lang.txt b/Assets/lilToon/Editor/lang.txt index efc1944f..197a7541 100644 --- a/Assets/lilToon/Editor/lang.txt +++ b/Assets/lilToon/Editor/lang.txt @@ -69,6 +69,8 @@ sScaleY Scale Y Y軸サイズ Y축 크기 Y尺度 Y尺度 sVector Vector 向き 방향 向量 向量 sLength Length 長さ 길이 长度 長度 sVertex Vertex 頂点 꼭짓점 顶点 頂點 +sThreshold Threshold 閾値 임계값 阈值 閾值 +sNormalStrength Normal Map Strength ノーマルマップ強度 노멀 맵 강도 法线贴图强度 法線貼圖強度 sColorAlphaZeroWarn To enable the property, increase the alpha value. プロパティを有効にするには透明度の値を上げて下さい。 속성을 유효하게 하려면 알파 값을 올려 주십시오. 增加 Alpha 值以启用该属性。 增加 Alpha 值以啟用該屬性。 sApplyTransparency Apply Transparency 透明度を適用 투명도 적용 应用透明度 應用透明度 sVRParallaxStrength VR Parallax Strength VR時の視差の強さ VR Parallax Strength VR Parallax Strength VR Parallax Strength @@ -226,6 +228,7 @@ sAudioLinkAsLocal As Local ローカル化 로컬 当地 當地 sAudioLinkLocalMap Local Map ローカルマップ Local Map Local Map Local Map sAudioLinkLocalMapBPM BPM BPM BPM BPM BPM sAudioLinkLocalMapNotes Notes 拍数 Notes Notes Notes +sAudioLinkDefaultValue Default value for no AudioLink AudioLink無効時の初期値 AudioLink 비활성화 시 기본값 无 AudioLink 的默认值 無 AudioLink 的默認值 sDissolve Dissolve Dissolve Dissolve Dissolve Dissolve sDissolveTips Settings for dissolving a material マテリアルが溶けるような表現ができます 머티리얼이 녹는듯한 표현을 할 수 있습니다 用于溶解材料的设置 用於溶解材料的設置 sDissolveWarnOpaque If you want to use Dissolve, you need to change the "Rendering Mode" to Cutout or Transparent. Dissolveを使う場合は"描画モード"をカットアウトか半透明に変更する必要があります。 Dissolve를 사용하는 경우 "렌더링 모드"를 컷아웃이나 투명한으로 변경해야 합니다 如果要使用Dissolve,则需要将“Rendering Mode”更改为镂空或透明。 如果要使用Dissolve,則需要將“Rendering Mode”更改為鏤空或透明。 @@ -290,6 +293,7 @@ sStencilTips You can set the Stencil ステンシル(眉毛を髪の上に表示 sAdvanced Advanced 拡張設定 확장 설정 扩展设置 擴展設置 sRenderingSetting Rendering レンダリング設定 렌더링 설정 渲染设置 渲染設置 sRenderingTips You can configure detailed rendering settings. 細かいレンダリングの設定ができます。 세세한 렌더링 설정을 할 수 있습니다. 你可以配置详细的渲染设置。 你可以配置詳細的渲染設置。 +sZClip ZClip ZClip ZClip ZClip ZClip sZWrite ZWrite ZWrite ZWrite ZWrite ZWrite sZTest ZTest ZTest ZTest ZTest ZTest sOffsetFactor Offset Factor Offset Factor Offset Factor Offset Factor Offset Factor diff --git a/Assets/lilToon/Editor/lilInspector.cs b/Assets/lilToon/Editor/lilInspector.cs index 5a16585c..b4941ac4 100644 --- a/Assets/lilToon/Editor/lilInspector.cs +++ b/Assets/lilToon/Editor/lilInspector.cs @@ -137,12 +137,12 @@ public enum lilLightingPreset //------------------------------------------------------------------------------------------------------------------------------ // Constant - private const string currentVersionName = "1.2.5"; - private const int currentVersionValue = 18; + private const string currentVersionName = "1.2.6"; + private const int currentVersionValue = 19; private const string boothURL = "https://lilxyzw.booth.pm/"; private const string githubURL = "https://github.com/lilxyzw/lilToon"; - internal const string versionInfoURL = "https://raw.githubusercontent.com/lilxyzw/lilToon/master/version.json"; + public const string versionInfoURL = "https://raw.githubusercontent.com/lilxyzw/lilToon/master/version.json"; private const string mainFolderGUID = "05d1d116436047941ad97d1b9064ee05"; // "Assets/lilToon" private const string editorFolderGUID = "3e73d675b9c1adc4f8b6b8ef01bce51c"; // "Assets/lilToon/Editor" private const string presetsFolderGUID = "35817d21af2f3134182c4a7e4c07786b"; // "Assets/lilToon/Presets" @@ -152,75 +152,75 @@ public enum lilLightingPreset private const string shaderCommonGUID = "5520e766422958546bbe885a95d5a67e"; // "Assets/lilToon/Shader/Includes/lil_common.hlsl"; private const string avatarEncryptionGUID = "f9787bf8ed5154f4b931278945ac8ca1"; // "Assets/AvaterEncryption"; private const string editorSettingTempPath = "Temp/lilToonEditorSetting"; - internal const string versionInfoTempPath = "Temp/lilToonVersion"; - internal const string packageListTempPath = "Temp/lilToonPackageList"; + public const string versionInfoTempPath = "Temp/lilToonVersion"; + public const string packageListTempPath = "Temp/lilToonPackageList"; private static readonly string[] mainTexCheckWords = new[] {"mask", "shadow", "shade", "outline", "normal", "bumpmap", "matcap", "rimlight", "emittion", "reflection", "specular", "roughness", "smoothness", "metallic", "metalness", "opacity", "parallax", "displacement", "height", "ambient", "occlusion"}; - internal static string GetMainFolderPath() + public static string GetMainFolderPath() { return AssetDatabase.GUIDToAssetPath(mainFolderGUID); } - internal static string GetEditorFolderPath() + public static string GetEditorFolderPath() { return AssetDatabase.GUIDToAssetPath(editorFolderGUID); } - internal static string GetPresetsFolderPath() + public static string GetPresetsFolderPath() { return AssetDatabase.GUIDToAssetPath(presetsFolderGUID); } - internal static string GetEditorPath() + public static string GetEditorPath() { return AssetDatabase.GUIDToAssetPath(editorGUID); } - internal static string GetShaderFolderPath() + public static string GetShaderFolderPath() { return AssetDatabase.GUIDToAssetPath(shaderFolderGUID); } - internal static string[] GetShaderFolderPaths() + public static string[] GetShaderFolderPaths() { return new[] {GetShaderFolderPath()}; } - internal static string GetShaderPipelinePath() + public static string GetShaderPipelinePath() { return AssetDatabase.GUIDToAssetPath(shaderPipelineGUID); } - internal static string GetShaderCommonPath() + public static string GetShaderCommonPath() { return AssetDatabase.GUIDToAssetPath(shaderCommonGUID); } - internal static string GetSettingFolderPath() + public static string GetSettingFolderPath() { if(isUPM) return "Assets/lilToonSetting"; return GetMainFolderPath() + "Setting"; } - internal static string GetShaderSettingPath() + public static string GetShaderSettingPath() { return GetSettingFolderPath() + "/ShaderSetting.asset"; } - internal static string GetShaderSettingHLSLPath() + public static string GetShaderSettingHLSLPath() { return GetSettingFolderPath() + "/lil_setting.hlsl"; } - internal static string GetAvatarEncryptionPath() + public static string GetAvatarEncryptionPath() { return AssetDatabase.GUIDToAssetPath(avatarEncryptionGUID); } #if NET_4_6 - internal const string rspPath = "Assets/csc.rsp"; + public const string rspPath = "Assets/csc.rsp"; #else - internal const string rspPath = "Assets/mcs.rsp"; + public const string rspPath = "Assets/mcs.rsp"; #endif - internal static readonly Vector2 defaultTextureOffset = new Vector2(0.0f,0.0f); - internal static readonly Vector2 defaultTextureScale = new Vector2(1.0f,1.0f); - internal static readonly Vector4 defaultScrollRotate = new Vector4(0.0f,0.0f,0.0f,0.0f); - internal static readonly Vector4 defaultHSVG = new Vector4(0.0f,1.0f,1.0f,1.0f); - internal static readonly Vector4 defaultKeys = new Vector4(0.0f,0.0f,0.0f,0.0f); - internal static readonly Vector4 defaultDecalAnim = new Vector4(1.0f,1.0f,1.0f,30.0f); - internal static readonly Vector4 defaultDissolveParams = new Vector4(0.0f,0.0f,0.5f,0.1f); - internal static readonly Vector4 defaultDistanceFadeParams = new Vector4(0.1f,0.01f,0.0f,0.0f); - internal static readonly Color lineColor = EditorGUIUtility.isProSkin ? new Color(0.35f,0.35f,0.35f,1.0f) : new Color(0.4f,0.4f,0.4f,1.0f); + public static readonly Vector2 defaultTextureOffset = new Vector2(0.0f,0.0f); + public static readonly Vector2 defaultTextureScale = new Vector2(1.0f,1.0f); + public static readonly Vector4 defaultScrollRotate = new Vector4(0.0f,0.0f,0.0f,0.0f); + public static readonly Vector4 defaultHSVG = new Vector4(0.0f,1.0f,1.0f,1.0f); + public static readonly Vector4 defaultKeys = new Vector4(0.0f,0.0f,0.0f,0.0f); + public static readonly Vector4 defaultDecalAnim = new Vector4(1.0f,1.0f,1.0f,30.0f); + public static readonly Vector4 defaultDissolveParams = new Vector4(0.0f,0.0f,0.5f,0.1f); + public static readonly Vector4 defaultDistanceFadeParams = new Vector4(0.1f,0.01f,0.0f,0.0f); + public static readonly Color lineColor = EditorGUIUtility.isProSkin ? new Color(0.35f,0.35f,0.35f,1.0f) : new Color(0.4f,0.4f,0.4f,1.0f); //------------------------------------------------------------------------------------------------------------------------------ // Shader @@ -286,7 +286,7 @@ internal static string GetAvatarEncryptionPath() //------------------------------------------------------------------------------------------------------------------------------ // Editor - internal static bool isUPM = false; + public static bool isUPM = false; private static Dictionary loc = new Dictionary(); private static lilToonSetting shaderSetting; private static lilToonPreset[] presets; @@ -299,48 +299,64 @@ public class lilToonEditorSetting public int languageNum = -1; public string languageNames = ""; public string languageName = "English"; - public bool isShowMainUV = false; - public bool isShowMain = false; - public bool isShowShadow = false; - public bool isShowBump = false; - public bool isShowReflections = false; - public bool isShowEmission = false; - public bool isShowEmissionMap = false; - public bool isShowEmissionBlendMask = false; - public bool isShowEmission2ndMap = false; - public bool isShowEmission2ndBlendMask = false; - public bool isShowMatCapUV = false; - public bool isShowMatCap2ndUV = false; - public bool isShowParallax = false; - public bool isShowDistanceFade = false; - public bool isShowAudioLink = false; - public bool isShowDissolve = false; - public bool isShowMain2ndDissolveMask = false; + public bool isShowMainUV = false; + public bool isShowMain = false; + public bool isShowShadow = false; + public bool isShowBump = false; + public bool isShowReflections = false; + public bool isShowEmission = false; + public bool isShowEmissionMap = false; + public bool isShowEmissionBlendMask = false; + public bool isShowEmission2ndMap = false; + public bool isShowEmission2ndBlendMask = false; + public bool isShowMatCapUV = false; + public bool isShowMatCap2ndUV = false; + public bool isShowParallax = false; + public bool isShowDistanceFade = false; + public bool isShowAudioLink = false; + public bool isShowDissolve = false; + public bool isShowMain2ndDissolveMask = false; public bool isShowMain2ndDissolveNoiseMask = false; - public bool isShowMain3rdDissolveMask = false; + public bool isShowMain3rdDissolveMask = false; public bool isShowMain3rdDissolveNoiseMask = false; - public bool isShowDissolveMask = false; + public bool isShowBumpMap = false; + public bool isShowBump2ndMap = false; + public bool isShowBump2ndScaleMask = false; + public bool isShowAnisotropyTangentMap = false; + public bool isShowAnisotropyScaleMask = false; + public bool isShowSmoothnessTex = false; + public bool isShowMetallicGlossMap = false; + public bool isShowReflectionColorTex = false; + public bool isShowMatCapBlendMask = false; + public bool isShowMatCapBumpMap = false; + public bool isShowMatCap2ndBlendMask = false; + public bool isShowMatCap2ndBumpMap = false; + public bool isShowRimColorTex = false; + public bool isShowGlitterColorTex = false; + public bool isShowBacklightColorTex = false; + public bool isShowDissolveMask = false; public bool isShowDissolveNoiseMask = false; - public bool isShowEncryption = false; - public bool isShowStencil = false; - public bool isShowOutline = false; - public bool isShowOutlineMap = false; - public bool isShowRefraction = false; - public bool isShowFur = false; - public bool isShowTess = false; - public bool isShowRendering = false; - public bool isShowOptimization = false; - public bool isShowBlend = false; - public bool isShowBlendAdd = false; - public bool isShowBlendOutline = false; - public bool isShowBlendAddOutline = false; - public bool isShowBlendFur = false; - public bool isShowBlendAddFur = false; - public bool isShowWebPages = false; - public bool isShowHelpPages = false; - public bool isShowLightingSettings = false; - public bool isShowShaderSetting = false; - public bool isShaderSettingChanged = false; + public bool isShowEncryption = false; + public bool isShowStencil = false; + public bool isShowOutline = false; + public bool isShowOutlineMap = false; + public bool isShowRefraction = false; + public bool isShowFur = false; + public bool isShowTess = false; + public bool isShowRendering = false; + public bool isShowOptimization = false; + public bool isShowBlend = false; + public bool isShowBlendAdd = false; + public bool isShowBlendOutline = false; + public bool isShowBlendAddOutline = false; + public bool isShowBlendFur = false; + public bool isShowBlendAddFur = false; + public bool isShowWebPages = false; + public bool isShowHelpPages = false; + public bool isShowLightingSettings = false; + public bool isShowShaderSetting = false; + public bool isShowVRChat = false; + public bool isShaderSettingChanged = false; public bool[] isShowCategorys = new bool[(int)lilPresetCategory.Other+1]{false,false,false,false,false,false,false}; } @@ -418,6 +434,7 @@ public struct lilPropertyBlockData MaterialProperty dstBlendAlphaFA; MaterialProperty blendOpFA; MaterialProperty blendOpAlphaFA; + MaterialProperty zclip; MaterialProperty zwrite; MaterialProperty ztest; MaterialProperty stencilRef; @@ -489,20 +506,24 @@ public struct lilPropertyBlockData MaterialProperty main3rdDistanceFade; MaterialProperty alphaMaskMode; MaterialProperty alphaMask; + MaterialProperty alphaMaskScale; MaterialProperty alphaMaskValue; MaterialProperty useShadow; - MaterialProperty shadowBorder; - MaterialProperty shadowBorderMask; - MaterialProperty shadowBlur; - MaterialProperty shadowBlurMask; MaterialProperty shadowStrength; MaterialProperty shadowStrengthMask; + MaterialProperty shadowAOShift; MaterialProperty shadowColor; MaterialProperty shadowColorTex; - MaterialProperty shadow2ndBorder; - MaterialProperty shadow2ndBlur; + MaterialProperty shadowNormalStrength; + MaterialProperty shadowBorder; + MaterialProperty shadowBorderMask; + MaterialProperty shadowBlur; + MaterialProperty shadowBlurMask; MaterialProperty shadow2ndColor; MaterialProperty shadow2ndColorTex; + MaterialProperty shadow2ndNormalStrength; + MaterialProperty shadow2ndBorder; + MaterialProperty shadow2ndBlur; MaterialProperty shadowMainStrength; MaterialProperty shadowEnvStrength; MaterialProperty shadowBorderColor; @@ -511,6 +532,7 @@ public struct lilPropertyBlockData MaterialProperty useBacklight; MaterialProperty backlightColor; MaterialProperty backlightColorTex; + MaterialProperty backlightNormalStrength; MaterialProperty backlightBorder; MaterialProperty backlightBlur; MaterialProperty backlightDirectivity; @@ -552,10 +574,12 @@ public struct lilPropertyBlockData MaterialProperty reflectionColorTex; MaterialProperty applySpecular; MaterialProperty applySpecularFA; + MaterialProperty specularNormalStrength; MaterialProperty specularToon; MaterialProperty specularBorder; MaterialProperty specularBlur; MaterialProperty applyReflection; + MaterialProperty reflectionNormalStrength; MaterialProperty reflectionApplyTransparency; MaterialProperty useMatCap; MaterialProperty matcapTex; @@ -569,9 +593,11 @@ public struct lilPropertyBlockData MaterialProperty matcapEnableLighting; MaterialProperty matcapShadowMask; MaterialProperty matcapBackfaceMask; + MaterialProperty matcapLod; MaterialProperty matcapBlendMode; MaterialProperty matcapMul; MaterialProperty matcapApplyTransparency; + MaterialProperty matcapNormalStrength; MaterialProperty matcapCustomNormal; MaterialProperty matcapBumpMap; MaterialProperty matcapBumpScale; @@ -587,15 +613,18 @@ public struct lilPropertyBlockData MaterialProperty matcap2ndEnableLighting; MaterialProperty matcap2ndShadowMask; MaterialProperty matcap2ndBackfaceMask; + MaterialProperty matcap2ndLod; MaterialProperty matcap2ndBlendMode; MaterialProperty matcap2ndMul; MaterialProperty matcap2ndApplyTransparency; + MaterialProperty matcap2ndNormalStrength; MaterialProperty matcap2ndCustomNormal; MaterialProperty matcap2ndBumpMap; MaterialProperty matcap2ndBumpScale; MaterialProperty useRim; MaterialProperty rimColor; MaterialProperty rimColorTex; + MaterialProperty rimNormalStrength; MaterialProperty rimBorder; MaterialProperty rimBlur; MaterialProperty rimFresnelPower; @@ -621,6 +650,7 @@ public struct lilPropertyBlockData MaterialProperty glitterBackfaceMask; MaterialProperty glitterApplyTransparency; MaterialProperty glitterVRParallaxStrength; + MaterialProperty glitterNormalStrength; MaterialProperty useEmission; MaterialProperty emissionColor; MaterialProperty emissionMap; @@ -672,6 +702,7 @@ public struct lilPropertyBlockData MaterialProperty outlineDstBlendAlphaFA; MaterialProperty outlineBlendOpFA; MaterialProperty outlineBlendOpAlphaFA; + MaterialProperty outlineZclip; MaterialProperty outlineZwrite; MaterialProperty outlineZtest; MaterialProperty outlineStencilRef; @@ -695,13 +726,17 @@ public struct lilPropertyBlockData MaterialProperty distanceFade; MaterialProperty useClippingCanceller; MaterialProperty useAudioLink; + MaterialProperty audioLinkDefaultValue; MaterialProperty audioLinkUVMode; MaterialProperty audioLinkUVParams; + MaterialProperty audioLinkStart; MaterialProperty audioLinkMask; MaterialProperty audioLink2Main2nd; MaterialProperty audioLink2Main3rd; MaterialProperty audioLink2Emission; + MaterialProperty audioLink2EmissionGrad; MaterialProperty audioLink2Emission2nd; + MaterialProperty audioLink2Emission2ndGrad; MaterialProperty audioLink2Vertex; MaterialProperty audioLinkVertexUVMode; MaterialProperty audioLinkVertexUVParams; @@ -751,6 +786,7 @@ public struct lilPropertyBlockData MaterialProperty furDstBlendAlphaFA; MaterialProperty furBlendOpFA; MaterialProperty furBlendOpAlphaFA; + MaterialProperty furZclip; MaterialProperty furZwrite; MaterialProperty furZtest; MaterialProperty furStencilRef; @@ -1033,6 +1069,10 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material, customToggleFont, boxOuter, boxInnerHalf); + //------------------------------------------------------------------------------------------------------------------------------ // Custom Properties if(isCustomShader) @@ -1461,6 +1501,10 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.EndVertical(); } + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material, customToggleFont, boxOuter, boxInnerHalf); + //------------------------------------------------------------------------------------------------------------------------------ // Custom Properties if(isCustomShader) @@ -1566,10 +1610,8 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useMatCap.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sMatCap"), GetLoc("sTextureRGBA")), matcapTex); + MatCapTextureGUI(materialEditor, ref edSet.isShowMatCapUV, new GUIContent(GetLoc("sMatCap"), GetLoc("sTextureRGBA")), matcapTex, matcapBlendUV1, matcapZRotCancel, matcapPerspective, matcapVRParallaxStrength); materialEditor.ShaderProperty(matcapMul, GetLoc("sBlendModeMul")); - materialEditor.ShaderProperty(matcapZRotCancel, GetLoc("sMatCapZRotCancel")); - materialEditor.ShaderProperty(matcapVRParallaxStrength, GetLoc("sVRParallaxStrength")); EditorGUILayout.EndVertical(); } EditorGUILayout.EndVertical(); @@ -1781,6 +1823,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro materialEditor.ShaderProperty(subpassCutoff, GetLoc("sSubpassCutoff")); } materialEditor.ShaderProperty(cull, sCullModes); + materialEditor.ShaderProperty(zclip, GetLoc("sZClip")); materialEditor.ShaderProperty(zwrite, GetLoc("sZWrite")); materialEditor.ShaderProperty(ztest, GetLoc("sZTest")); materialEditor.ShaderProperty(offsetFactor, GetLoc("sOffsetFactor")); @@ -1812,6 +1855,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.LabelField(GetLoc("sOutline"), customToggleFont); EditorGUILayout.BeginVertical(boxInner); materialEditor.ShaderProperty(outlineCull, sCullModes); + materialEditor.ShaderProperty(outlineZclip, GetLoc("sZClip")); materialEditor.ShaderProperty(outlineZwrite, GetLoc("sZWrite")); materialEditor.ShaderProperty(outlineZtest, GetLoc("sZTest")); materialEditor.ShaderProperty(outlineOffsetFactor, GetLoc("sOffsetFactor")); @@ -1873,6 +1917,10 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.EndVertical(); } + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material, customToggleFont, boxOuter, boxInnerHalf); + //------------------------------------------------------------------------------------------------------------------------------ // Custom Properties if(isCustomShader) @@ -2031,6 +2079,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.LabelField(GetLoc("sRenderingSetting"), customToggleFont); EditorGUILayout.BeginVertical(boxInner); materialEditor.ShaderProperty(cull, sCullModes); + materialEditor.ShaderProperty(zclip, GetLoc("sZClip")); materialEditor.ShaderProperty(zwrite, GetLoc("sZWrite")); materialEditor.ShaderProperty(ztest, GetLoc("sZTest")); materialEditor.ShaderProperty(offsetFactor, GetLoc("sOffsetFactor")); @@ -2166,6 +2215,10 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.EndVertical(); } + //------------------------------------------------------------------------------------------------------------------------------ + // VRChat + DrawVRCFallbackGUI(material, customToggleFont, boxOuter, boxInnerHalf); + //------------------------------------------------------------------------------------------------------------------------------ // Custom Properties if(isCustomShader) @@ -2261,7 +2314,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro DrawLine(); if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_LAYER_MASK)) materialEditor.TexturePropertySingleLine(maskBlendContent, main2ndBlendMask); EditorGUILayout.LabelField(GetLoc("sDistanceFade")); + EditorGUI.indentLevel++; materialEditor.ShaderProperty(main2ndDistanceFade, sDistanceFadeSetting); + EditorGUI.indentLevel--; materialEditor.ShaderProperty(main2ndEnableLighting, GetLoc("sEnableLighting")); materialEditor.ShaderProperty(main2ndTexBlendMode, sBlendModes); if(CheckFeature(shaderSetting.LIL_FEATURE_LAYER_DISSOLVE)) @@ -2303,7 +2358,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro DrawLine(); if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_LAYER_MASK)) materialEditor.TexturePropertySingleLine(maskBlendContent, main3rdBlendMask); EditorGUILayout.LabelField(GetLoc("sDistanceFade")); + EditorGUI.indentLevel++; materialEditor.ShaderProperty(main3rdDistanceFade, sDistanceFadeSetting); + EditorGUI.indentLevel--; materialEditor.ShaderProperty(main3rdEnableLighting, GetLoc("sEnableLighting")); materialEditor.ShaderProperty(main3rdTexBlendMode, sBlendModes); if(CheckFeature(shaderSetting.LIL_FEATURE_LAYER_DISSOLVE)) @@ -2344,7 +2401,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(alphaMaskMode.floatValue != 0) { EditorGUILayout.BeginVertical(boxInnerHalf); - materialEditor.TexturePropertySingleLine(alphaMaskContent, alphaMask, alphaMaskValue); + materialEditor.TexturePropertySingleLine(alphaMaskContent, alphaMask); + materialEditor.ShaderProperty(alphaMaskScale, "Scale"); + materialEditor.ShaderProperty(alphaMaskValue, "Offset"); materialEditor.ShaderProperty(cutoff, GetLoc("sCutoff")); AlphamaskToTextureGUI(material); EditorGUILayout.EndVertical(); @@ -2374,10 +2433,10 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro DrawLine(); if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_SHADOW_1ST)) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sShadow1stColor"), GetLoc("sTextureRGBA")), shadowColorTex, shadowColor); else materialEditor.ShaderProperty(shadowColor, GetLoc("sShadow1stColor")); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_SHADOW_BORDER)) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sBorderAO"), GetLoc("sBorderR")), shadowBorderMask, shadowBorder); - else materialEditor.ShaderProperty(shadowBorder, GetLoc("sBorder")); + materialEditor.ShaderProperty(shadowBorder, GetLoc("sBorder")); if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_SHADOW_BLUR)) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sBlur"), GetLoc("sBlurR")), shadowBlurMask, shadowBlur); else materialEditor.ShaderProperty(shadowBlur, GetLoc("sBlur")); + materialEditor.ShaderProperty(shadowNormalStrength, GetLoc("sNormalStrength")); DrawLine(); if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_SHADOW_2ND)) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sShadow2ndColor"), GetLoc("sTextureRGBA")), shadow2ndColorTex, shadow2ndColor); else materialEditor.ShaderProperty(shadow2ndColor, GetLoc("sShadow2ndColor")); @@ -2387,11 +2446,21 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro } materialEditor.ShaderProperty(shadow2ndBorder, GetLoc("sBorder")); materialEditor.ShaderProperty(shadow2ndBlur, GetLoc("sBlur")); + materialEditor.ShaderProperty(shadow2ndNormalStrength, GetLoc("sNormalStrength")); DrawLine(); - materialEditor.ShaderProperty(shadowMainStrength, GetLoc("sContrast")); - materialEditor.ShaderProperty(shadowEnvStrength, GetLoc("sShadowEnvStrength")); materialEditor.ShaderProperty(shadowBorderColor, GetLoc("sShadowBorderColor")); materialEditor.ShaderProperty(shadowBorderRange, GetLoc("sShadowBorderRange")); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_SHADOW_BORDER)) + { + DrawLine(); + materialEditor.TexturePropertySingleLine(new GUIContent("AO Map", GetLoc("sBorderR")), shadowBorderMask); + EditorGUI.indentLevel++; + materialEditor.ShaderProperty(shadowAOShift, "1st Scale|1st Offset|2nd Scale|2nd Offset"); + EditorGUI.indentLevel--; + } + DrawLine(); + materialEditor.ShaderProperty(shadowMainStrength, GetLoc("sContrast")); + materialEditor.ShaderProperty(shadowEnvStrength, GetLoc("sShadowEnvStrength")); if(CheckFeature(shaderSetting.LIL_FEATURE_RECEIVE_SHADOW)) materialEditor.ShaderProperty(shadowReceive, GetLoc("sReceiveShadow")); EditorGUILayout.EndVertical(); } @@ -2416,7 +2485,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useEmission.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - TextureGUI(materialEditor, ref edSet.isShowEmissionMap, colorRGBAContent, emissionMap, emissionColor, emissionMap_ScrollRotate, emissionMap_UVMode, CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_UV), CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV)); + TextureGUI(materialEditor, ref edSet.isShowEmissionMap, colorRGBAContent, emissionMap, emissionColor, emissionMap_ScrollRotate, emissionMap_UVMode, true, CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV)); if(emissionColor.colorValue.a == 0 && AutoFixHelpBox(GetLoc("sColorAlphaZeroWarn"))) { emissionColor.colorValue = new Color(emissionColor.colorValue.r, emissionColor.colorValue.g, emissionColor.colorValue.b, 1.0f); @@ -2424,7 +2493,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro DrawLine(); if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_EMISSION_MASK)) { - TextureGUI(materialEditor, ref edSet.isShowEmissionBlendMask, maskBlendContent, emissionBlendMask, emissionBlend, emissionBlendMask_ScrollRotate, CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_MASK_UV), CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV)); + TextureGUI(materialEditor, ref edSet.isShowEmissionBlendMask, maskBlendContent, emissionBlendMask, emissionBlend, emissionBlendMask_ScrollRotate, true, CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV)); DrawLine(); } materialEditor.ShaderProperty(emissionBlink, blinkSetting); @@ -2455,7 +2524,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useEmission2nd.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - TextureGUI(materialEditor, ref edSet.isShowEmission2ndMap, colorRGBAContent, emission2ndMap, emission2ndColor, emission2ndMap_ScrollRotate, emission2ndMap_UVMode, CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_UV), CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV)); + TextureGUI(materialEditor, ref edSet.isShowEmission2ndMap, colorRGBAContent, emission2ndMap, emission2ndColor, emission2ndMap_ScrollRotate, emission2ndMap_UVMode, true, CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV)); if(emission2ndColor.colorValue.a == 0 && AutoFixHelpBox(GetLoc("sColorAlphaZeroWarn"))) { emission2ndColor.colorValue = new Color(emission2ndColor.colorValue.r, emission2ndColor.colorValue.g, emission2ndColor.colorValue.b, 1.0f); @@ -2463,7 +2532,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro DrawLine(); if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_EMISSION_MASK)) { - TextureGUI(materialEditor, ref edSet.isShowEmission2ndBlendMask, maskBlendContent, emission2ndBlendMask, emission2ndBlend, emission2ndBlendMask_ScrollRotate, CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_MASK_UV), CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV)); + TextureGUI(materialEditor, ref edSet.isShowEmission2ndBlendMask, maskBlendContent, emission2ndBlendMask, emission2ndBlend, emission2ndBlendMask_ScrollRotate, true, CheckFeature(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV)); DrawLine(); } materialEditor.ShaderProperty(emission2ndBlink, blinkSetting); @@ -2516,8 +2585,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useBumpMap.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - materialEditor.TexturePropertySingleLine(normalMapContent, bumpMap, bumpScale); - materialEditor.TextureScaleOffsetProperty(bumpMap); + TextureGUI(materialEditor, ref edSet.isShowBumpMap, normalMapContent, bumpMap, bumpScale); EditorGUILayout.EndVertical(); } EditorGUILayout.EndVertical(); @@ -2533,9 +2601,12 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useBump2ndMap.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - materialEditor.TexturePropertySingleLine(normalMapContent, bump2ndMap, bump2ndScale); - materialEditor.TextureScaleOffsetProperty(bump2ndMap); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_NORMAL_MASK)) materialEditor.TexturePropertySingleLine(maskStrengthContent, bump2ndScaleMask); + TextureGUI(materialEditor, ref edSet.isShowBump2ndMap, normalMapContent, bump2ndMap, bump2ndScale); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_NORMAL_MASK)) + { + DrawLine(); + TextureGUI(materialEditor, ref edSet.isShowBump2ndScaleMask, maskStrengthContent, bump2ndScaleMask); + } EditorGUILayout.EndVertical(); } EditorGUILayout.EndVertical(); @@ -2551,9 +2622,10 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useAnisotropy.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - materialEditor.TexturePropertySingleLine(normalMapContent, anisotropyTangentMap); - materialEditor.TextureScaleOffsetProperty(anisotropyTangentMap); - materialEditor.TexturePropertySingleLine(maskStrengthContent, anisotropyScaleMask, anisotropyScale); + TextureGUI(materialEditor, ref edSet.isShowAnisotropyTangentMap, normalMapContent, anisotropyTangentMap); + DrawLine(); + TextureGUI(materialEditor, ref edSet.isShowAnisotropyScaleMask, maskStrengthContent, anisotropyScaleMask, anisotropyScale); + DrawLine(); GUILayout.Label(GetLoc("sApplyTo"), EditorStyles.boldLabel); EditorGUI.indentLevel++; materialEditor.ShaderProperty(anisotropy2Reflection, GetLoc("sReflection")); @@ -2605,13 +2677,16 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useReflection.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_REFLECTION_SMOOTHNESS)) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sSmoothness"), GetLoc("sSmoothnessR")), smoothnessTex, smoothness); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_REFLECTION_SMOOTHNESS)) TextureGUI(materialEditor, ref edSet.isShowSmoothnessTex, new GUIContent(GetLoc("sSmoothness"), GetLoc("sSmoothnessR")), smoothnessTex, smoothness); else materialEditor.ShaderProperty(smoothness, GetLoc("sSmoothness")); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_REFLECTION_METALLIC)) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sMetallic"), GetLoc("sMetallicR")), metallicGlossMap, metallic); + DrawLine(); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_REFLECTION_METALLIC)) TextureGUI(materialEditor, ref edSet.isShowMetallicGlossMap, new GUIContent(GetLoc("sMetallic"), GetLoc("sMetallicR")), metallicGlossMap, metallic); else materialEditor.ShaderProperty(metallic, GetLoc("sMetallic")); - materialEditor.ShaderProperty(reflectance, GetLoc("sReflectance")); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_REFLECTION_COLOR)) materialEditor.TexturePropertySingleLine(colorRGBAContent, reflectionColorTex, reflectionColor); + DrawLine(); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_REFLECTION_COLOR)) TextureGUI(materialEditor, ref edSet.isShowReflectionColorTex, colorRGBAContent, reflectionColorTex, reflectionColor); else materialEditor.ShaderProperty(reflectionColor, GetLoc("sColor")); + DrawLine(); + materialEditor.ShaderProperty(reflectance, GetLoc("sReflectance")); if(reflectionColor.colorValue.a == 0 && AutoFixHelpBox(GetLoc("sColorAlphaZeroWarn"))) { reflectionColor.colorValue = new Color(reflectionColor.colorValue.r, reflectionColor.colorValue.g, reflectionColor.colorValue.b, 1.0f); @@ -2630,6 +2705,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro applySpecular.floatValue = 1.0f; specularToon.floatValue = 0.0f; EditorGUI.indentLevel++; + materialEditor.ShaderProperty(specularNormalStrength, GetLoc("sNormalStrength")); materialEditor.ShaderProperty(applySpecularFA, GetLoc("sMultiLightSpecular")); EditorGUI.indentLevel--; } @@ -2638,12 +2714,19 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro applySpecular.floatValue = 1.0f; specularToon.floatValue = 1.0f; EditorGUI.indentLevel++; + materialEditor.ShaderProperty(specularNormalStrength, GetLoc("sNormalStrength")); materialEditor.ShaderProperty(specularBorder, GetLoc("sBorder")); materialEditor.ShaderProperty(specularBlur, GetLoc("sBlur")); materialEditor.ShaderProperty(applySpecularFA, GetLoc("sMultiLightSpecular")); EditorGUI.indentLevel--; } materialEditor.ShaderProperty(applyReflection, GetLoc("sApplyReflection")); + if(applyReflection.floatValue == 1.0f) + { + EditorGUI.indentLevel++; + materialEditor.ShaderProperty(reflectionNormalStrength, GetLoc("sNormalStrength")); + EditorGUI.indentLevel--; + } if(isTransparent) materialEditor.ShaderProperty(reflectionApplyTransparency, GetLoc("sApplyTransparency")); EditorGUILayout.EndVertical(); } @@ -2665,12 +2748,14 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro { matcapColor.colorValue = new Color(matcapColor.colorValue.r, matcapColor.colorValue.g, matcapColor.colorValue.b, 1.0f); } + materialEditor.ShaderProperty(matcapNormalStrength, GetLoc("sNormalStrength")); DrawLine(); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK)) materialEditor.TexturePropertySingleLine(maskBlendContent, matcapBlendMask, matcapBlend); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK)) TextureGUI(materialEditor, ref edSet.isShowMatCapBlendMask, maskBlendContent, matcapBlendMask, matcapBlend); else materialEditor.ShaderProperty(matcapBlend, GetLoc("sBlend")); materialEditor.ShaderProperty(matcapEnableLighting, GetLoc("sEnableLighting")); materialEditor.ShaderProperty(matcapShadowMask, GetLoc("sShadowMask")); materialEditor.ShaderProperty(matcapBackfaceMask, GetLoc("sBackfaceMask")); + materialEditor.ShaderProperty(matcapLod, GetLoc("sBlur")); materialEditor.ShaderProperty(matcapBlendMode, sBlendModes); if(matcapEnableLighting.floatValue != 0.0f && matcapBlendMode.floatValue == 3.0f && AutoFixHelpBox(GetLoc("sHelpMatCapBlending"))) { @@ -2683,8 +2768,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro materialEditor.ShaderProperty(matcapCustomNormal, GetLoc("sMatCapCustomNormal")); if(matcapCustomNormal.floatValue == 1) { - materialEditor.TexturePropertySingleLine(normalMapContent, matcapBumpMap, matcapBumpScale); - materialEditor.TextureScaleOffsetProperty(matcapBumpMap); + TextureGUI(materialEditor, ref edSet.isShowMatCapBumpMap, normalMapContent, matcapBumpMap, matcapBumpScale); } } EditorGUILayout.EndVertical(); @@ -2707,12 +2791,14 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro { matcap2ndColor.colorValue = new Color(matcap2ndColor.colorValue.r, matcap2ndColor.colorValue.g, matcap2ndColor.colorValue.b, 1.0f); } + materialEditor.ShaderProperty(matcap2ndNormalStrength, GetLoc("sNormalStrength")); DrawLine(); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK)) materialEditor.TexturePropertySingleLine(maskBlendContent, matcap2ndBlendMask, matcap2ndBlend); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK)) TextureGUI(materialEditor, ref edSet.isShowMatCap2ndBlendMask, maskBlendContent, matcap2ndBlendMask, matcap2ndBlend); else materialEditor.ShaderProperty(matcap2ndBlend, GetLoc("sBlend")); materialEditor.ShaderProperty(matcap2ndEnableLighting, GetLoc("sEnableLighting")); materialEditor.ShaderProperty(matcap2ndShadowMask, GetLoc("sShadowMask")); materialEditor.ShaderProperty(matcap2ndBackfaceMask, GetLoc("sBackfaceMask")); + materialEditor.ShaderProperty(matcap2ndLod, GetLoc("sBlur")); materialEditor.ShaderProperty(matcap2ndBlendMode, sBlendModes); if(matcap2ndEnableLighting.floatValue != 0.0f && matcap2ndBlendMode.floatValue == 3.0f && AutoFixHelpBox(GetLoc("sHelpMatCapBlending"))) { @@ -2725,8 +2811,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro materialEditor.ShaderProperty(matcap2ndCustomNormal, GetLoc("sMatCapCustomNormal")); if(matcap2ndCustomNormal.floatValue == 1) { - materialEditor.TexturePropertySingleLine(normalMapContent, matcap2ndBumpMap, matcap2ndBumpScale); - materialEditor.TextureScaleOffsetProperty(matcap2ndBumpMap); + TextureGUI(materialEditor, ref edSet.isShowMatCap2ndBumpMap, normalMapContent, matcap2ndBumpMap, matcap2ndBumpScale); } } EditorGUILayout.EndVertical(); @@ -2744,7 +2829,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useRim.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR)) materialEditor.TexturePropertySingleLine(colorRGBAContent, rimColorTex, rimColor); + if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR)) TextureGUI(materialEditor, ref edSet.isShowRimColorTex, colorRGBAContent, rimColorTex, rimColor); else materialEditor.ShaderProperty(rimColor, GetLoc("sColor")); if(rimColor.colorValue.a == 0 && AutoFixHelpBox(GetLoc("sColorAlphaZeroWarn"))) { @@ -2771,21 +2856,20 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro materialEditor.ShaderProperty(rimIndirBlur, GetLoc("sBlur")); EditorGUI.indentLevel--; DrawLine(); - materialEditor.ShaderProperty(rimFresnelPower, GetLoc("sFresnelPower")); } else { rimBorder.floatValue = 1.0f - EditorGUILayout.Slider(GetLoc("sBorder"), 1.0f - rimBorder.floatValue, 0.0f, 1.0f); materialEditor.ShaderProperty(rimBlur, GetLoc("sBlur")); - materialEditor.ShaderProperty(rimFresnelPower, GetLoc("sFresnelPower")); } } else { rimBorder.floatValue = 1.0f - EditorGUILayout.Slider(GetLoc("sBorder"), 1.0f - rimBorder.floatValue, 0.0f, 1.0f); materialEditor.ShaderProperty(rimBlur, GetLoc("sBlur")); - materialEditor.ShaderProperty(rimFresnelPower, GetLoc("sFresnelPower")); } + materialEditor.ShaderProperty(rimNormalStrength, GetLoc("sNormalStrength")); + materialEditor.ShaderProperty(rimFresnelPower, GetLoc("sFresnelPower")); EditorGUILayout.EndVertical(); } EditorGUILayout.EndVertical(); @@ -2802,7 +2886,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro { EditorGUILayout.BeginVertical(boxInnerHalf); materialEditor.ShaderProperty(glitterUVMode, "UV Mode|UV0|UV1"); - materialEditor.TexturePropertySingleLine(colorRGBAContent, glitterColorTex, glitterColor); + TextureGUI(materialEditor, ref edSet.isShowGlitterColorTex, colorRGBAContent, glitterColorTex, glitterColor); if(glitterColor.colorValue.a == 0 && AutoFixHelpBox(GetLoc("sColorAlphaZeroWarn"))) { glitterColor.colorValue = new Color(glitterColor.colorValue.r, glitterColor.colorValue.g, glitterColor.colorValue.b, 1.0f); @@ -2816,6 +2900,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro materialEditor.ShaderProperty(glitterParams1, sGlitterParams1); materialEditor.ShaderProperty(glitterParams2, sGlitterParams2); materialEditor.ShaderProperty(glitterVRParallaxStrength, GetLoc("sVRParallaxStrength")); + materialEditor.ShaderProperty(glitterNormalStrength, GetLoc("sNormalStrength")); EditorGUILayout.EndVertical(); } EditorGUILayout.EndVertical(); @@ -2831,11 +2916,12 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useBacklight.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - materialEditor.TexturePropertySingleLine(colorRGBAContent, backlightColorTex, backlightColor); + TextureGUI(materialEditor, ref edSet.isShowBacklightColorTex, colorRGBAContent, backlightColorTex, backlightColor); if(backlightColor.colorValue.a == 0 && AutoFixHelpBox(GetLoc("sColorAlphaZeroWarn"))) { backlightColor.colorValue = new Color(backlightColor.colorValue.r, backlightColor.colorValue.g, backlightColor.colorValue.b, 1.0f); } + materialEditor.ShaderProperty(backlightNormalStrength, GetLoc("sNormalStrength")); backlightBorder.floatValue = 1.0f - EditorGUILayout.Slider(GetLoc("sBorder"), 1.0f - backlightBorder.floatValue, 0.0f, 1.0f); materialEditor.ShaderProperty(backlightBlur, GetLoc("sBlur")); materialEditor.ShaderProperty(backlightDirectivity, GetLoc("sDirectivity")); @@ -2969,7 +3055,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro DrawMenuButton(GetLoc("sAnchorDistanceFade"), lilPropertyBlock.DistanceFade); EditorGUILayout.BeginVertical(boxInnerHalf); materialEditor.ShaderProperty(distanceFadeColor, GetLoc("sColor")); + EditorGUI.indentLevel++; materialEditor.ShaderProperty(distanceFade, sDistanceFadeSetting); + EditorGUI.indentLevel--; EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); } @@ -2989,43 +3077,55 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(useAudioLink.floatValue == 1) { EditorGUILayout.BeginVertical(boxInnerHalf); - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK)) + materialEditor.ShaderProperty(audioLinkUVMode, GetLoc("sAudioLinkUVMode") + "|" + GetLoc("sAudioLinkUVModeNone") + "|" + GetLoc("sAudioLinkUVModeRim") + "|" + GetLoc("sAudioLinkUVModeUV") + "|" + GetLoc("sAudioLinkUVModeMask") + "|" + GetLoc("sAudioLinkUVModeMask") + " (Spectrum)" + "|" + GetLoc("sAudioLinkUVModePosition")); + if(audioLinkUVMode.floatValue == 0) materialEditor.ShaderProperty(audioLinkUVParams, GetLoc("sOffset") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); + if(audioLinkUVMode.floatValue == 1) materialEditor.ShaderProperty(audioLinkUVParams, GetLoc("sScale") + "|" + GetLoc("sOffset") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); + if(audioLinkUVMode.floatValue == 2) materialEditor.ShaderProperty(audioLinkUVParams, GetLoc("sScale") + "|" + GetLoc("sOffset") + "|" + GetLoc("sAngle") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); + if(audioLinkUVMode.floatValue == 3) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sMask"), ""), audioLinkMask); + if(audioLinkUVMode.floatValue == 4) { - materialEditor.ShaderProperty(audioLinkUVMode, GetLoc("sAudioLinkUVMode") + "|" + GetLoc("sAudioLinkUVModeNone") + "|" + GetLoc("sAudioLinkUVModeRim") + "|" + GetLoc("sAudioLinkUVModeUV") + "|" + GetLoc("sAudioLinkUVModeMask")); - if(audioLinkUVMode.floatValue == 3) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sMask"), ""), audioLinkMask); + materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sMask"), ""), audioLinkMask); + DrawVectorAs4Float(audioLinkUVParams, "Volume", "Base Boost", "Treble Boost", "Line Width"); } - else + if(audioLinkUVMode.floatValue == 5) { - materialEditor.ShaderProperty(audioLinkUVMode, GetLoc("sAudioLinkUVMode") + "|" + GetLoc("sAudioLinkUVModeNone") + "|" + GetLoc("sAudioLinkUVModeRim") + "|" + GetLoc("sAudioLinkUVModeUV")); + materialEditor.ShaderProperty(audioLinkUVParams, GetLoc("sScale") + "|" + GetLoc("sOffset") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); + materialEditor.ShaderProperty(audioLinkStart, GetLoc("sAudioLinkStartPosition")); } - if(audioLinkUVMode.floatValue == 0) materialEditor.ShaderProperty(audioLinkUVParams, GetLoc("sOffset") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); - if(audioLinkUVMode.floatValue == 1) materialEditor.ShaderProperty(audioLinkUVParams, GetLoc("sScale") + "|" + GetLoc("sOffset") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); - if(audioLinkUVMode.floatValue == 2) materialEditor.ShaderProperty(audioLinkUVParams, GetLoc("sScale") + "|" + GetLoc("sOffset") + "|" + GetLoc("sAngle") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); + DrawLine(); + GUILayout.Label(GetLoc("sAudioLinkDefaultValue"), EditorStyles.boldLabel); + EditorGUI.indentLevel++; + if(audioLinkUVMode.floatValue == 4) DrawVectorAs4Float(audioLinkDefaultValue, GetLoc("sStrength"), "Detail", "Speed", GetLoc("sThreshold")); + else materialEditor.ShaderProperty(audioLinkDefaultValue, GetLoc("sStrength") + "|" + GetLoc("sBlinkStrength") + "|" + GetLoc("sBlinkSpeed") + "|" + GetLoc("sThreshold")); + EditorGUI.indentLevel--; + DrawLine(); GUILayout.Label(GetLoc("sApplyTo"), EditorStyles.boldLabel); EditorGUI.indentLevel++; if(CheckFeature(shaderSetting.LIL_FEATURE_MAIN2ND)) materialEditor.ShaderProperty(audioLink2Main2nd, GetLoc("sMainColor2nd")); if(CheckFeature(shaderSetting.LIL_FEATURE_MAIN3RD)) materialEditor.ShaderProperty(audioLink2Main3rd, GetLoc("sMainColor3rd")); - if(CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_1ST)) materialEditor.ShaderProperty(audioLink2Emission, GetLoc("sEmission")); - if(CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_2ND)) materialEditor.ShaderProperty(audioLink2Emission2nd, GetLoc("sEmission2nd")); + if(CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_1ST)) + { + materialEditor.ShaderProperty(audioLink2Emission, GetLoc("sEmission")); + materialEditor.ShaderProperty(audioLink2EmissionGrad, GetLoc("sEmission") + GetLoc("sGradation")); + } + if(CheckFeature(shaderSetting.LIL_FEATURE_EMISSION_2ND)) + { + materialEditor.ShaderProperty(audioLink2Emission2nd, GetLoc("sEmission2nd")); + materialEditor.ShaderProperty(audioLink2Emission2ndGrad, GetLoc("sEmission2nd") + GetLoc("sGradation")); + } if(CheckFeature(shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX)) { materialEditor.ShaderProperty(audioLink2Vertex, GetLoc("sVertex")); if(audioLink2Vertex.floatValue == 1) { EditorGUI.indentLevel++; - if(CheckFeature(shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK)) - { - materialEditor.ShaderProperty(audioLinkVertexUVMode, GetLoc("sAudioLinkUVMode") + "|" + GetLoc("sAudioLinkUVModeNone") + "|" + GetLoc("sAudioLinkUVModePosition") + "|" + GetLoc("sAudioLinkUVModeUV") + "|" + GetLoc("sAudioLinkUVModeMask")); - if(audioLinkVertexUVMode.floatValue == 3) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sMask"), ""), audioLinkMask); - } - else - { - materialEditor.ShaderProperty(audioLinkVertexUVMode, GetLoc("sAudioLinkUVMode") + "|" + GetLoc("sAudioLinkUVModeNone") + "|" + GetLoc("sAudioLinkUVModePosition") + "|" + GetLoc("sAudioLinkUVModeUV")); - } + materialEditor.ShaderProperty(audioLinkVertexUVMode, GetLoc("sAudioLinkUVMode") + "|" + GetLoc("sAudioLinkUVModeNone") + "|" + GetLoc("sAudioLinkUVModePosition") + "|" + GetLoc("sAudioLinkUVModeUV") + "|" + GetLoc("sAudioLinkUVModeMask")); if(audioLinkVertexUVMode.floatValue == 0) materialEditor.ShaderProperty(audioLinkVertexUVParams, GetLoc("sOffset") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); if(audioLinkVertexUVMode.floatValue == 1) materialEditor.ShaderProperty(audioLinkVertexUVParams, GetLoc("sScale") + "|" + GetLoc("sOffset") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); if(audioLinkVertexUVMode.floatValue == 2) materialEditor.ShaderProperty(audioLinkVertexUVParams, GetLoc("sScale") + "|" + GetLoc("sOffset") + "|" + GetLoc("sAngle") + "|" + GetLoc("sAudioLinkBand") + "|" + GetLoc("sAudioLinkBandBass") + "|" + GetLoc("sAudioLinkBandLowMid") + "|" + GetLoc("sAudioLinkBandHighMid") + "|" + GetLoc("sAudioLinkBandTreble")); + if(audioLinkVertexUVMode.floatValue == 3) materialEditor.TexturePropertySingleLine(new GUIContent(GetLoc("sMask"), ""), audioLinkMask); if(audioLinkVertexUVMode.floatValue == 1) materialEditor.ShaderProperty(audioLinkVertexStart, GetLoc("sAudioLinkStartPosition")); + DrawLine(); materialEditor.ShaderProperty(audioLinkVertexStrength, GetLoc("sAudioLinkMovingVector") + "|" + GetLoc("sAudioLinkNormalStrength")); EditorGUI.indentLevel--; } @@ -3359,6 +3459,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro materialEditor.ShaderProperty(subpassCutoff, GetLoc("sSubpassCutoff")); } materialEditor.ShaderProperty(cull, sCullModes); + materialEditor.ShaderProperty(zclip, GetLoc("sZClip")); materialEditor.ShaderProperty(zwrite, GetLoc("sZWrite")); materialEditor.ShaderProperty(ztest, GetLoc("sZTest")); materialEditor.ShaderProperty(offsetFactor, GetLoc("sOffsetFactor")); @@ -3390,6 +3491,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.LabelField(GetLoc("sOutline"), customToggleFont); EditorGUILayout.BeginVertical(boxInner); materialEditor.ShaderProperty(outlineCull, sCullModes); + materialEditor.ShaderProperty(outlineZclip, GetLoc("sZClip")); materialEditor.ShaderProperty(outlineZwrite, GetLoc("sZWrite")); materialEditor.ShaderProperty(outlineZtest, GetLoc("sZTest")); materialEditor.ShaderProperty(outlineOffsetFactor, GetLoc("sOffsetFactor")); @@ -3412,6 +3514,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.LabelField(GetLoc("sFur"), customToggleFont); EditorGUILayout.BeginVertical(boxInner); materialEditor.ShaderProperty(furCull, sCullModes); + materialEditor.ShaderProperty(furZclip, GetLoc("sZClip")); materialEditor.ShaderProperty(furZwrite, GetLoc("sZWrite")); materialEditor.ShaderProperty(furZtest, GetLoc("sZTest")); materialEditor.ShaderProperty(furOffsetFactor, GetLoc("sOffsetFactor")); @@ -3638,20 +3741,24 @@ private void ResetProperties() main3rdDistanceFade = null; alphaMaskMode = null; alphaMask = null; + alphaMaskScale = null; alphaMaskValue = null; useShadow = null; - shadowBorder = null; - shadowBorderMask = null; - shadowBlur = null; - shadowBlurMask = null; shadowStrength = null; shadowStrengthMask = null; + shadowAOShift = null; shadowColor = null; shadowColorTex = null; - shadow2ndBorder = null; - shadow2ndBlur = null; + shadowNormalStrength = null; + shadowBorder = null; + shadowBorderMask = null; + shadowBlur = null; + shadowBlurMask = null; shadow2ndColor = null; shadow2ndColorTex = null; + shadow2ndNormalStrength = null; + shadow2ndBorder = null; + shadow2ndBlur = null; shadowMainStrength = null; shadowEnvStrength = null; shadowBorderColor = null; @@ -3660,6 +3767,7 @@ private void ResetProperties() useBacklight = null; backlightColor = null; backlightColorTex = null; + backlightNormalStrength = null; backlightBorder = null; backlightBlur = null; backlightDirectivity = null; @@ -3702,10 +3810,12 @@ private void ResetProperties() reflectionColorTex = null; applySpecular = null; applySpecularFA = null; + specularNormalStrength = null; specularToon = null; specularBorder = null; specularBlur = null; applyReflection = null; + reflectionNormalStrength = null; reflectionApplyTransparency = null; useMatCap = null; matcapTex = null; @@ -3715,12 +3825,14 @@ private void ResetProperties() matcapEnableLighting = null; matcapShadowMask = null; matcapBackfaceMask = null; + matcapLod = null; matcapBlendUV1 = null; matcapVRParallaxStrength = null; matcapBlendMode = null; matcapMul = null; matcapApplyTransparency = null; matcapZRotCancel = null; + matcapNormalStrength = null; matcapCustomNormal = null; matcapBumpMap = null; matcapBumpScale = null; @@ -3732,18 +3844,21 @@ private void ResetProperties() matcap2ndEnableLighting = null; matcap2ndShadowMask = null; matcap2ndBackfaceMask = null; + matcap2ndLod = null; matcap2ndBlendUV1 = null; matcap2ndVRParallaxStrength = null; matcap2ndBlendMode = null; matcap2ndMul = null; matcap2ndApplyTransparency = null; matcap2ndZRotCancel = null; + matcap2ndNormalStrength = null; matcap2ndCustomNormal = null; matcap2ndBumpMap = null; matcap2ndBumpScale = null; useRim = null; rimColor = null; rimColorTex = null; + rimNormalStrength = null; rimBorder = null; rimBlur = null; rimFresnelPower = null; @@ -3769,6 +3884,7 @@ private void ResetProperties() glitterBackfaceMask = null; glitterApplyTransparency = null; glitterVRParallaxStrength = null; + glitterNormalStrength = null; useEmission = null; emissionColor = null; emissionMap = null; @@ -3820,6 +3936,7 @@ private void ResetProperties() outlineDstBlendAlphaFA = null; outlineBlendOpFA = null; outlineBlendOpAlphaFA = null; + outlineZclip = null; outlineZwrite = null; outlineZtest = null; outlineStencilRef = null; @@ -3841,13 +3958,17 @@ private void ResetProperties() distanceFadeColor = null; distanceFade = null; useAudioLink = null; + audioLinkDefaultValue = null; audioLinkUVMode = null; audioLinkUVParams = null; + audioLinkStart = null; audioLinkMask = null; audioLink2Main2nd = null; audioLink2Main3rd = null; audioLink2Emission = null; + audioLink2EmissionGrad = null; audioLink2Emission2nd = null; + audioLink2Emission2ndGrad = null; audioLink2Vertex = null; audioLinkVertexUVMode = null; audioLinkVertexUVParams = null; @@ -3893,6 +4014,7 @@ private void ResetProperties() furDstBlendAlphaFA = null; furBlendOpFA = null; furBlendOpAlphaFA = null; + furZclip = null; furZwrite = null; furZtest = null; furStencilRef = null; @@ -3952,6 +4074,7 @@ private void LoadProperties(MaterialProperty[] props) dstBlendAlphaFA = FindProperty("_DstBlendAlphaFA", props); blendOpFA = FindProperty("_BlendOpFA", props); blendOpAlphaFA = FindProperty("_BlendOpAlphaFA", props); + zclip = FindProperty("_ZClip", props); zwrite = FindProperty("_ZWrite", props); ztest = FindProperty("_ZTest", props); stencilRef = FindProperty("_StencilRef", props); @@ -4024,21 +4147,25 @@ private void LoadProperties(MaterialProperty[] props) // Alpha Mask alphaMaskMode = FindProperty("_AlphaMaskMode", props); alphaMask = FindProperty("_AlphaMask", props); + alphaMaskScale = FindProperty("_AlphaMaskScale", props); alphaMaskValue = FindProperty("_AlphaMaskValue", props); // Shadow useShadow = FindProperty("_UseShadow", props); - shadowBorder = FindProperty("_ShadowBorder", props); - shadowBorderMask = FindProperty("_ShadowBorderMask", props); - shadowBlur = FindProperty("_ShadowBlur", props); - shadowBlurMask = FindProperty("_ShadowBlurMask", props); shadowStrength = FindProperty("_ShadowStrength", props); shadowStrengthMask = FindProperty("_ShadowStrengthMask", props); + shadowAOShift = FindProperty("_ShadowAOShift", props); shadowColor = FindProperty("_ShadowColor", props); shadowColorTex = FindProperty("_ShadowColorTex", props); - shadow2ndBorder = FindProperty("_Shadow2ndBorder", props); - shadow2ndBlur = FindProperty("_Shadow2ndBlur", props); + shadowNormalStrength = FindProperty("_ShadowNormalStrength", props); + shadowBorder = FindProperty("_ShadowBorder", props); + shadowBorderMask = FindProperty("_ShadowBorderMask", props); + shadowBlur = FindProperty("_ShadowBlur", props); + shadowBlurMask = FindProperty("_ShadowBlurMask", props); shadow2ndColor = FindProperty("_Shadow2ndColor", props); shadow2ndColorTex = FindProperty("_Shadow2ndColorTex", props); + shadow2ndNormalStrength = FindProperty("_Shadow2ndNormalStrength", props); + shadow2ndBorder = FindProperty("_Shadow2ndBorder", props); + shadow2ndBlur = FindProperty("_Shadow2ndBlur", props); shadowMainStrength = FindProperty("_ShadowMainStrength", props); shadowEnvStrength = FindProperty("_ShadowEnvStrength", props); shadowBorderColor = FindProperty("_ShadowBorderColor", props); @@ -4047,6 +4174,7 @@ private void LoadProperties(MaterialProperty[] props) useBacklight = FindProperty("_UseBacklight", props); backlightColor = FindProperty("_BacklightColor", props); backlightColorTex = FindProperty("_BacklightColorTex", props); + backlightNormalStrength = FindProperty("_BacklightNormalStrength", props); backlightBorder = FindProperty("_BacklightBorder", props); backlightBlur = FindProperty("_BacklightBlur", props); backlightDirectivity = FindProperty("_BacklightDirectivity", props); @@ -4078,6 +4206,7 @@ private void LoadProperties(MaterialProperty[] props) outlineDstBlendAlphaFA = FindProperty("_OutlineDstBlendAlphaFA", props); outlineBlendOpFA = FindProperty("_OutlineBlendOpFA", props); outlineBlendOpAlphaFA = FindProperty("_OutlineBlendOpAlphaFA", props); + outlineZclip = FindProperty("_OutlineZClip", props); outlineZwrite = FindProperty("_OutlineZWrite", props); outlineZtest = FindProperty("_OutlineZTest", props); outlineStencilRef = FindProperty("_OutlineStencilRef", props); @@ -4128,10 +4257,12 @@ private void LoadProperties(MaterialProperty[] props) reflectionColorTex = FindProperty("_ReflectionColorTex", props); applySpecular = FindProperty("_ApplySpecular", props); applySpecularFA = FindProperty("_ApplySpecularFA", props); + specularNormalStrength = FindProperty("_SpecularNormalStrength", props); specularToon = FindProperty("_SpecularToon", props); specularBorder = FindProperty("_SpecularBorder", props); specularBlur = FindProperty("_SpecularBlur", props); applyReflection = FindProperty("_ApplyReflection", props); + reflectionNormalStrength = FindProperty("_ReflectionNormalStrength", props); reflectionApplyTransparency = FindProperty("_ReflectionApplyTransparency", props); useMatCap = FindProperty("_UseMatCap", props); matcapTex = FindProperty("_MatCapTex", props); @@ -4145,8 +4276,10 @@ private void LoadProperties(MaterialProperty[] props) matcapEnableLighting = FindProperty("_MatCapEnableLighting", props); matcapShadowMask = FindProperty("_MatCapShadowMask", props); matcapBackfaceMask = FindProperty("_MatCapBackfaceMask", props); + matcapLod = FindProperty("_MatCapLod", props); matcapBlendMode = FindProperty("_MatCapBlendMode", props); matcapApplyTransparency = FindProperty("_MatCapApplyTransparency", props); + matcapNormalStrength = FindProperty("_MatCapNormalStrength", props); matcapCustomNormal = FindProperty("_MatCapCustomNormal", props); matcapBumpMap = FindProperty("_MatCapBumpMap", props); matcapBumpScale = FindProperty("_MatCapBumpScale", props); @@ -4162,14 +4295,17 @@ private void LoadProperties(MaterialProperty[] props) matcap2ndEnableLighting = FindProperty("_MatCap2ndEnableLighting", props); matcap2ndShadowMask = FindProperty("_MatCap2ndShadowMask", props); matcap2ndBackfaceMask = FindProperty("_MatCap2ndBackfaceMask", props); + matcap2ndLod = FindProperty("_MatCap2ndLod", props); matcap2ndBlendMode = FindProperty("_MatCap2ndBlendMode", props); matcap2ndApplyTransparency = FindProperty("_MatCap2ndApplyTransparency", props); + matcap2ndNormalStrength = FindProperty("_MatCap2ndNormalStrength", props); matcap2ndCustomNormal = FindProperty("_MatCap2ndCustomNormal", props); matcap2ndBumpMap = FindProperty("_MatCap2ndBumpMap", props); matcap2ndBumpScale = FindProperty("_MatCap2ndBumpScale", props); useRim = FindProperty("_UseRim", props); rimColor = FindProperty("_RimColor", props); rimColorTex = FindProperty("_RimColorTex", props); + rimNormalStrength = FindProperty("_RimNormalStrength", props); rimBorder = FindProperty("_RimBorder", props); rimBlur = FindProperty("_RimBlur", props); rimFresnelPower = FindProperty("_RimFresnelPower", props); @@ -4195,6 +4331,7 @@ private void LoadProperties(MaterialProperty[] props) glitterParams1 = FindProperty("_GlitterParams1", props); glitterParams2 = FindProperty("_GlitterParams2", props); glitterVRParallaxStrength = FindProperty("_GlitterVRParallaxStrength", props); + glitterNormalStrength = FindProperty("_GlitterNormalStrength", props); useEmission = FindProperty("_UseEmission", props); emissionColor = FindProperty("_EmissionColor", props); emissionMap = FindProperty("_EmissionMap", props); @@ -4230,13 +4367,17 @@ private void LoadProperties(MaterialProperty[] props) distanceFade = FindProperty("_DistanceFade", props); distanceFadeColor = FindProperty("_DistanceFadeColor", props); useAudioLink = FindProperty("_UseAudioLink", props); + audioLinkDefaultValue = FindProperty("_AudioLinkDefaultValue", props); audioLinkUVMode = FindProperty("_AudioLinkUVMode", props); audioLinkUVParams = FindProperty("_AudioLinkUVParams", props); + audioLinkStart = FindProperty("_AudioLinkStart", props); audioLinkMask = FindProperty("_AudioLinkMask", props); audioLink2Main2nd = FindProperty("_AudioLink2Main2nd", props); audioLink2Main3rd = FindProperty("_AudioLink2Main3rd", props); audioLink2Emission = FindProperty("_AudioLink2Emission", props); + audioLink2EmissionGrad = FindProperty("_AudioLink2EmissionGrad", props); audioLink2Emission2nd = FindProperty("_AudioLink2Emission2nd", props); + audioLink2Emission2ndGrad = FindProperty("_AudioLink2Emission2ndGrad", props); audioLink2Vertex = FindProperty("_AudioLink2Vertex", props); audioLinkVertexUVMode = FindProperty("_AudioLinkVertexUVMode", props); audioLinkVertexUVParams = FindProperty("_AudioLinkVertexUVParams", props); @@ -4307,6 +4448,7 @@ private void LoadFurProperties(MaterialProperty[] props) dstBlendAlphaFA = FindProperty("_DstBlendAlphaFA", props); blendOpFA = FindProperty("_BlendOpFA", props); blendOpAlphaFA = FindProperty("_BlendOpAlphaFA", props); + zclip = FindProperty("_ZClip", props); zwrite = FindProperty("_ZWrite", props); ztest = FindProperty("_ZTest", props); stencilRef = FindProperty("_StencilRef", props); @@ -4327,18 +4469,21 @@ private void LoadFurProperties(MaterialProperty[] props) mainTexHSVG = FindProperty("_MainTexHSVG", props); // Shadow useShadow = FindProperty("_UseShadow", props); - shadowBorder = FindProperty("_ShadowBorder", props); - shadowBorderMask = FindProperty("_ShadowBorderMask", props); - shadowBlur = FindProperty("_ShadowBlur", props); - shadowBlurMask = FindProperty("_ShadowBlurMask", props); shadowStrength = FindProperty("_ShadowStrength", props); shadowStrengthMask = FindProperty("_ShadowStrengthMask", props); + shadowAOShift = FindProperty("_ShadowAOShift", props); shadowColor = FindProperty("_ShadowColor", props); shadowColorTex = FindProperty("_ShadowColorTex", props); - shadow2ndBorder = FindProperty("_Shadow2ndBorder", props); - shadow2ndBlur = FindProperty("_Shadow2ndBlur", props); + shadowNormalStrength = FindProperty("_ShadowNormalStrength", props); + shadowBorder = FindProperty("_ShadowBorder", props); + shadowBorderMask = FindProperty("_ShadowBorderMask", props); + shadowBlur = FindProperty("_ShadowBlur", props); + shadowBlurMask = FindProperty("_ShadowBlurMask", props); shadow2ndColor = FindProperty("_Shadow2ndColor", props); shadow2ndColorTex = FindProperty("_Shadow2ndColorTex", props); + shadow2ndNormalStrength = FindProperty("_Shadow2ndNormalStrength", props); + shadow2ndBorder = FindProperty("_Shadow2ndBorder", props); + shadow2ndBlur = FindProperty("_Shadow2ndBlur", props); shadowMainStrength = FindProperty("_ShadowMainStrength", props); shadowEnvStrength = FindProperty("_ShadowEnvStrength", props); shadowBorderColor = FindProperty("_ShadowBorderColor", props); @@ -4374,6 +4519,7 @@ private void LoadFurProperties(MaterialProperty[] props) furDstBlendAlphaFA = FindProperty("_FurDstBlendAlphaFA", props); furBlendOpFA = FindProperty("_FurBlendOpFA", props); furBlendOpAlphaFA = FindProperty("_FurBlendOpAlphaFA", props); + furZclip = FindProperty("_FurZClip", props); furZwrite = FindProperty("_FurZWrite", props); furZtest = FindProperty("_FurZTest", props); furStencilRef = FindProperty("_FurStencilRef", props); @@ -4414,6 +4560,7 @@ private void LoadGemProperties(MaterialProperty[] props) dstBlendAlpha = FindProperty("_DstBlendAlpha", props); blendOp = FindProperty("_BlendOp", props); blendOpAlpha = FindProperty("_BlendOpAlpha", props); + zclip = FindProperty("_ZClip", props); zwrite = FindProperty("_ZWrite", props); ztest = FindProperty("_ZTest", props); stencilRef = FindProperty("_StencilRef", props); @@ -4468,8 +4615,10 @@ private void LoadGemProperties(MaterialProperty[] props) matcapEnableLighting = FindProperty("_MatCapEnableLighting", props); matcapShadowMask = FindProperty("_MatCapShadowMask", props); matcapBackfaceMask = FindProperty("_MatCapBackfaceMask", props); + matcapLod = FindProperty("_MatCapLod", props); matcapBlendMode = FindProperty("_MatCapBlendMode", props); matcapApplyTransparency = FindProperty("_MatCapApplyTransparency", props); + matcapNormalStrength = FindProperty("_MatCapNormalStrength", props); matcapCustomNormal = FindProperty("_MatCapCustomNormal", props); matcapBumpMap = FindProperty("_MatCapBumpMap", props); matcapBumpScale = FindProperty("_MatCapBumpScale", props); @@ -4485,14 +4634,17 @@ private void LoadGemProperties(MaterialProperty[] props) matcap2ndEnableLighting = FindProperty("_MatCap2ndEnableLighting", props); matcap2ndShadowMask = FindProperty("_MatCap2ndShadowMask", props); matcap2ndBackfaceMask = FindProperty("_MatCap2ndBackfaceMask", props); + matcap2ndLod = FindProperty("_MatCap2ndLod", props); matcap2ndBlendMode = FindProperty("_MatCap2ndBlendMode", props); matcap2ndApplyTransparency = FindProperty("_MatCap2ndApplyTransparency", props); + matcap2ndNormalStrength = FindProperty("_MatCap2ndNormalStrength", props); matcap2ndCustomNormal = FindProperty("_MatCap2ndCustomNormal", props); matcap2ndBumpMap = FindProperty("_MatCap2ndBumpMap", props); matcap2ndBumpScale = FindProperty("_MatCap2ndBumpScale", props); useRim = FindProperty("_UseRim", props); rimColor = FindProperty("_RimColor", props); rimColorTex = FindProperty("_RimColorTex", props); + rimNormalStrength = FindProperty("_RimNormalStrength", props); rimBorder = FindProperty("_RimBorder", props); rimBlur = FindProperty("_RimBlur", props); rimFresnelPower = FindProperty("_RimFresnelPower", props); @@ -4518,6 +4670,7 @@ private void LoadGemProperties(MaterialProperty[] props) glitterParams1 = FindProperty("_GlitterParams1", props); glitterParams2 = FindProperty("_GlitterParams2", props); glitterVRParallaxStrength = FindProperty("_GlitterVRParallaxStrength", props); + glitterNormalStrength = FindProperty("_GlitterNormalStrength", props); ignoreEncryption = FindProperty("_IgnoreEncryption", props); keys = FindProperty("_Keys", props); refractionStrength = FindProperty("_RefractionStrength", props); @@ -4551,13 +4704,17 @@ private void LoadGemProperties(MaterialProperty[] props) emission2ndParallaxDepth = FindProperty("_Emission2ndParallaxDepth", props); emission2ndFluorescence = FindProperty("_Emission2ndFluorescence", props); useAudioLink = FindProperty("_UseAudioLink", props); + audioLinkDefaultValue = FindProperty("_AudioLinkDefaultValue", props); audioLinkUVMode = FindProperty("_AudioLinkUVMode", props); audioLinkUVParams = FindProperty("_AudioLinkUVParams", props); + audioLinkStart = FindProperty("_AudioLinkStart", props); audioLinkMask = FindProperty("_AudioLinkMask", props); audioLink2Main2nd = FindProperty("_AudioLink2Main2nd", props); audioLink2Main3rd = FindProperty("_AudioLink2Main3rd", props); audioLink2Emission = FindProperty("_AudioLink2Emission", props); + audioLink2EmissionGrad = FindProperty("_AudioLink2EmissionGrad", props); audioLink2Emission2nd = FindProperty("_AudioLink2Emission2nd", props); + audioLink2Emission2ndGrad = FindProperty("_AudioLink2Emission2ndGrad", props); audioLink2Vertex = FindProperty("_AudioLink2Vertex", props); audioLinkVertexUVMode = FindProperty("_AudioLinkVertexUVMode", props); audioLinkVertexUVParams = FindProperty("_AudioLinkVertexUVParams", props); @@ -4599,6 +4756,7 @@ private void LoadFakeShadowProperties(MaterialProperty[] props) dstBlendAlpha = FindProperty("_DstBlendAlpha", props); blendOp = FindProperty("_BlendOp", props); blendOpAlpha = FindProperty("_BlendOpAlpha", props); + zclip = FindProperty("_ZClip", props); zwrite = FindProperty("_ZWrite", props); ztest = FindProperty("_ZTest", props); stencilRef = FindProperty("_StencilRef", props); @@ -4654,6 +4812,7 @@ private void LoadLiteProperties(MaterialProperty[] props) dstBlendAlphaFA = FindProperty("_DstBlendAlphaFA", props); blendOpFA = FindProperty("_BlendOpFA", props); blendOpAlphaFA = FindProperty("_BlendOpAlphaFA", props); + zclip = FindProperty("_ZClip", props); zwrite = FindProperty("_ZWrite", props); ztest = FindProperty("_ZTest", props); stencilRef = FindProperty("_StencilRef", props); @@ -4706,6 +4865,7 @@ private void LoadLiteProperties(MaterialProperty[] props) outlineDstBlendAlphaFA = FindProperty("_OutlineDstBlendAlphaFA", props); outlineBlendOpFA = FindProperty("_OutlineBlendOpFA", props); outlineBlendOpAlphaFA = FindProperty("_OutlineBlendOpAlphaFA", props); + outlineZclip = FindProperty("_OutlineZClip", props); outlineZwrite = FindProperty("_OutlineZWrite", props); outlineZtest = FindProperty("_OutlineZTest", props); outlineStencilRef = FindProperty("_OutlineStencilRef", props); @@ -4723,9 +4883,10 @@ private void LoadLiteProperties(MaterialProperty[] props) useMatCap = FindProperty("_UseMatCap", props); matcapTex = FindProperty("_MatCapTex", props); matcapBlendUV1 = FindProperty("_MatCapBlendUV1", props); + matcapZRotCancel = FindProperty("_MatCapZRotCancel", props); + matcapPerspective = FindProperty("_MatCapPerspective", props); matcapVRParallaxStrength = FindProperty("_MatCapVRParallaxStrength", props); matcapMul = FindProperty("_MatCapMul", props); - matcapZRotCancel = FindProperty("_MatCapZRotCancel", props); useRim = FindProperty("_UseRim", props); rimColor = FindProperty("_RimColor", props); rimBorder = FindProperty("_RimBorder", props); @@ -4736,7 +4897,7 @@ private void LoadLiteProperties(MaterialProperty[] props) emissionColor = FindProperty("_EmissionColor", props); emissionMap = FindProperty("_EmissionMap", props); emissionMap_ScrollRotate = FindProperty("_EmissionMap_ScrollRotate", props); - emissionMap_UVMode = FindProperty("_Emission2ndMap_UVMode", props); + emissionMap_UVMode = FindProperty("_EmissionMap_UVMode", props); emissionBlink = FindProperty("_EmissionBlink", props); } @@ -4748,7 +4909,7 @@ private void LoadMultiProperties(MaterialProperty[] props) useClippingCanceller = FindProperty("_UseClippingCanceller", props); asOverlay = FindProperty("_AsOverlay", props); } - + private void CopyMainColorProperties() { if(mainColor != null && baseColor != null) baseColor.colorValue = mainColor.colorValue; @@ -4758,18 +4919,18 @@ private void CopyMainColorProperties() //------------------------------------------------------------------------------------------------------------------------------ // Language - internal static string GetLoc(string value) + public static string GetLoc(string value) { if(loc.ContainsKey(value)) return loc[value]; return value; } - internal static void InitializeLanguage() + public static void InitializeLanguage() { edSet.languageNum = InitializeLanguage(edSet.languageNum); } - internal static void LoadCustomLanguage(string langFileGUID) + public static void LoadCustomLanguage(string langFileGUID) { int lnum = edSet.languageNum; if(loc.Count == 0) @@ -4858,7 +5019,7 @@ private static int InitializeLanguage(int lnum) //------------------------------------------------------------------------------------------------------------------------------ // Rendering Pipeline - internal static void RewriteShaderRP() + public static void RewriteShaderRP() { string[] shaderFolderPaths = GetShaderFolderPaths(); string[] shaderGuids = AssetDatabase.FindAssets("t:shader", shaderFolderPaths); @@ -5005,7 +5166,7 @@ private static lilRenderPipeline CheckRP() //------------------------------------------------------------------------------------------------------------------------------ // Shader Setting - internal static void InitializeShaderSetting(ref lilToonSetting shaderSetting) + public static void InitializeShaderSetting(ref lilToonSetting shaderSetting) { if(shaderSetting != null) return; string shaderSettingPath = GetShaderSettingPath(); @@ -5029,9 +5190,7 @@ internal static void InitializeShaderSetting(ref lilToonSetting shaderSetting) shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = false; shaderSetting.LIL_FEATURE_EMISSION_1ST = true; shaderSetting.LIL_FEATURE_EMISSION_2ND = false; - shaderSetting.LIL_FEATURE_EMISSION_UV = false; shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = false; - shaderSetting.LIL_FEATURE_EMISSION_MASK_UV = false; shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = false; shaderSetting.LIL_FEATURE_EMISSION_GRADATION = false; shaderSetting.LIL_FEATURE_NORMAL_1ST = true; @@ -5070,7 +5229,6 @@ internal static void InitializeShaderSetting(ref lilToonSetting shaderSetting) shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK = true; shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP = false; shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR = true; - shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK = false; shaderSetting.LIL_FEATURE_TEX_DISSOLVE_NOISE = false; shaderSetting.LIL_FEATURE_TEX_OUTLINE_COLOR = true; shaderSetting.LIL_FEATURE_TEX_OUTLINE_WIDTH = true; @@ -5086,7 +5244,7 @@ internal static void InitializeShaderSetting(ref lilToonSetting shaderSetting) } } - internal static void TurnOffAllShaderSetting(ref lilToonSetting shaderSetting) + public static void TurnOffAllShaderSetting(ref lilToonSetting shaderSetting) { if(shaderSetting == null || shaderSetting.isLocked) return; shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV = false; @@ -5102,9 +5260,7 @@ internal static void TurnOffAllShaderSetting(ref lilToonSetting shaderSetting) shaderSetting.LIL_FEATURE_RECEIVE_SHADOW = false; shaderSetting.LIL_FEATURE_EMISSION_1ST = false; shaderSetting.LIL_FEATURE_EMISSION_2ND = false; - shaderSetting.LIL_FEATURE_EMISSION_UV = false; shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = false; - shaderSetting.LIL_FEATURE_EMISSION_MASK_UV = false; shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = false; shaderSetting.LIL_FEATURE_EMISSION_GRADATION = false; shaderSetting.LIL_FEATURE_NORMAL_1ST = false; @@ -5143,7 +5299,6 @@ internal static void TurnOffAllShaderSetting(ref lilToonSetting shaderSetting) shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK = false; shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP = false; shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR = false; - shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK = false; shaderSetting.LIL_FEATURE_TEX_DISSOLVE_NOISE = false; shaderSetting.LIL_FEATURE_TEX_OUTLINE_COLOR = false; shaderSetting.LIL_FEATURE_TEX_OUTLINE_WIDTH = false; @@ -5156,7 +5311,7 @@ internal static void TurnOffAllShaderSetting(ref lilToonSetting shaderSetting) AssetDatabase.Refresh(); } - internal static void InitializeSettingHLSL(ref lilToonSetting shaderSetting) + public static void InitializeSettingHLSL(ref lilToonSetting shaderSetting) { string[] shaderFolderPaths = GetShaderFolderPaths(); string shaderSettingHLSLPath = GetShaderSettingHLSLPath(); @@ -5204,7 +5359,7 @@ internal static void InitializeSettingHLSL(ref lilToonSetting shaderSetting) } } - internal static void ApplyShaderSetting(lilToonSetting shaderSetting) + public static void ApplyShaderSetting(lilToonSetting shaderSetting) { StringBuilder sb = new StringBuilder(); sb.Append("#ifndef LIL_SETTING_INCLUDED\r\n#define LIL_SETTING_INCLUDED\r\n\r\n"); @@ -5242,12 +5397,10 @@ internal static void ApplyShaderSetting(lilToonSetting shaderSetting) if(shaderSetting.LIL_FEATURE_EMISSION_2ND) sb.Append("#define LIL_FEATURE_EMISSION_2ND\r\n"); if(shaderSetting.LIL_FEATURE_EMISSION_1ST || shaderSetting.LIL_FEATURE_EMISSION_2ND) { - if(shaderSetting.LIL_FEATURE_EMISSION_UV) sb.Append("#define LIL_FEATURE_EMISSION_UV\r\n"); if(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV) sb.Append("#define LIL_FEATURE_ANIMATE_EMISSION_UV\r\n"); if(shaderSetting.LIL_FEATURE_TEX_EMISSION_MASK) { sb.Append("#define LIL_FEATURE_TEX_EMISSION_MASK\r\n"); - if(shaderSetting.LIL_FEATURE_EMISSION_MASK_UV) sb.Append("#define LIL_FEATURE_EMISSION_MASK_UV\r\n"); if(shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) sb.Append("#define LIL_FEATURE_ANIMATE_EMISSION_MASK_UV\r\n"); } if(shaderSetting.LIL_FEATURE_EMISSION_GRADATION) sb.Append("#define LIL_FEATURE_EMISSION_GRADATION\r\n"); @@ -5292,7 +5445,6 @@ internal static void ApplyShaderSetting(lilToonSetting shaderSetting) { sb.Append("#define LIL_FEATURE_AUDIOLINK\r\n"); if(shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX) sb.Append("#define LIL_FEATURE_AUDIOLINK_VERTEX\r\n"); - if(shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK) sb.Append("#define LIL_FEATURE_TEX_AUDIOLINK_MASK\r\n"); if(shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL) sb.Append("#define LIL_FEATURE_AUDIOLINK_LOCAL\r\n"); } if(shaderSetting.LIL_FEATURE_DISSOLVE) @@ -5342,7 +5494,7 @@ internal static void ApplyShaderSetting(lilToonSetting shaderSetting) } } - internal static bool EqualsShaderSetting(lilToonSetting ssA, lilToonSetting ssB) + public static bool EqualsShaderSetting(lilToonSetting ssA, lilToonSetting ssB) { if((ssA == null && ssB != null) || (ssA != null && ssB == null)) return false; if(ssA == null && ssB == null) return true; @@ -5359,7 +5511,7 @@ internal static bool EqualsShaderSetting(lilToonSetting ssA, lilToonSetting ssB) return true; } - internal static void CopyShaderSetting(ref lilToonSetting ssA, lilToonSetting ssB) + public static void CopyShaderSetting(ref lilToonSetting ssA, lilToonSetting ssB) { if(ssA == null || ssB == null) return; @@ -5436,13 +5588,11 @@ private static void ShaderSettingGUI() if(shaderSetting.LIL_FEATURE_EMISSION_1ST || shaderSetting.LIL_FEATURE_EMISSION_2ND) { EditorGUI.indentLevel++; - lilToggleGUI(GetLoc("sSettingEmissionUV"), ref shaderSetting.LIL_FEATURE_EMISSION_UV); lilToggleGUI(GetLoc("sSettingAnimateEmissionUV"), ref shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV); lilToggleGUI(GetLoc("sSettingTexEmissionMask"), ref shaderSetting.LIL_FEATURE_TEX_EMISSION_MASK); if(shaderSetting.LIL_FEATURE_TEX_EMISSION_MASK) { EditorGUI.indentLevel++; - lilToggleGUI(GetLoc("sSettingEmissionMaskUV"), ref shaderSetting.LIL_FEATURE_EMISSION_MASK_UV); lilToggleGUI(GetLoc("sSettingAnimateEmissionMaskUV"), ref shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV); EditorGUI.indentLevel--; } @@ -5522,7 +5672,6 @@ private static void ShaderSettingGUI() { EditorGUI.indentLevel++; lilToggleGUI(GetLoc("sSettingAudioLinkVertex"), ref shaderSetting.LIL_FEATURE_AUDIOLINK_VERTEX); - lilToggleGUI(GetLoc("sSettingAudioLinkMask"), ref shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK); lilToggleGUI(GetLoc("sSettingAudioLinkLocal"), ref shaderSetting.LIL_FEATURE_AUDIOLINK_LOCAL); EditorGUI.indentLevel--; } @@ -5577,7 +5726,7 @@ private static void ShaderSettingGUI() //------------------------------------------------------------------------------------------------------------------------------ // Initialize Editor Variable - internal static void InitializeShaders() + public static void InitializeShaders() { lts = Shader.Find("lilToon"); ltsc = Shader.Find("Hidden/lilToonCutout"); @@ -5630,7 +5779,7 @@ internal static void InitializeShaders() //------------------------------------------------------------------------------------------------------------------------------ // Shader Rewriter - internal static void ReimportPassShaders() + public static void ReimportPassShaders() { string[] shaderFolderPaths = GetShaderFolderPaths(); string[] shaderGuids = AssetDatabase.FindAssets("t:shader", shaderFolderPaths); @@ -5646,7 +5795,7 @@ internal static void ReimportPassShaders() } } - internal static void RewriteReceiveShadow(string path, bool enable) + public static void RewriteReceiveShadow(string path, bool enable) { if(String.IsNullOrEmpty(path) || !File.Exists(path)) return; StreamReader sr = new StreamReader(path); @@ -5687,15 +5836,41 @@ internal static void RewriteReceiveShadow(string path, bool enable) sw.Close(); } - internal static void RewriteReceiveShadow(Shader shader, bool enable) + public static void RewriteReceiveShadow(Shader shader, bool enable) { string path = AssetDatabase.GetAssetPath(shader); RewriteReceiveShadow(path, enable); } + public static void RewriteZClip(string path) + { + if(String.IsNullOrEmpty(path) || !File.Exists(path)) return; + StreamReader sr = new StreamReader(path); + string s = sr.ReadToEnd(); + sr.Close(); + #if UNITY_2018_1_OR_NEWER + s = s.Replace( + " //ZClip", + " ZClip"); + #else + s = s.Replace( + " ZClip", + " //ZClip"); + #endif + StreamWriter sw = new StreamWriter(path,false); + sw.Write(s); + sw.Close(); + } + + public static void RewriteZClip(Shader shader) + { + string path = AssetDatabase.GetAssetPath(shader); + RewriteZClip(path); + } + //------------------------------------------------------------------------------------------------------------------------------ // GUI - internal static bool Foldout(string title, string help, bool display) + public static bool Foldout(string title, string help, bool display) { GUIStyle style = new GUIStyle("ShurikenModuleTitle"); #if UNITY_2019_1_OR_NEWER @@ -5725,12 +5900,12 @@ internal static bool Foldout(string title, string help, bool display) return display; } - internal static void DrawLine() + public static void DrawLine() { EditorGUI.DrawRect(EditorGUI.IndentedRect(EditorGUILayout.GetControlRect(false, 1)), lineColor); } - internal static void DrawWebButton(string text, string URL) + public static void DrawWebButton(string text, string URL) { Rect position = EditorGUI.IndentedRect(EditorGUILayout.GetControlRect()); GUIContent icon = EditorGUIUtility.IconContent("BuildSettings.Web.Small"); @@ -5742,7 +5917,7 @@ internal static void DrawWebButton(string text, string URL) } } - internal static bool CheckFeature(bool feature) + public static bool CheckFeature(bool feature) { return isMulti || feature; } @@ -5869,9 +6044,84 @@ private void OpenHelpPage(object helpAnchor) Application.OpenURL(GetLoc("sManualURL") + helpAnchor); } + private void DrawVRCFallbackGUI(Material material, GUIStyle customToggleFont, GUIStyle boxOuter, GUIStyle boxInnerHalf) + { + #if VRC_SDK_VRCSDK2 || VRC_SDK_VRCSDK3 + edSet.isShowVRChat = Foldout("VRChat", "VRChat", edSet.isShowVRChat); + if(edSet.isShowVRChat) + { + EditorGUILayout.BeginVertical(boxOuter); + string tag = material.GetTag("VRCFallBack", false); + bool shouldSetTag = EditorGUI.ToggleLeft(EditorGUILayout.GetControlRect(), "Custom Safety Fallback", !String.IsNullOrEmpty(tag), customToggleFont); + if(shouldSetTag) + { + EditorGUILayout.BeginVertical(boxInnerHalf); + string[] sFallbackShaderTypes = {"Unlit", "Standard", "VertexLit", "Toon", "Particle", "Sprite", "Matcap", "MobileToon", "Hidden"}; + string[] sFallbackRenderTypes = {"Opaque", "Cutout", "Transparent", "Fade"}; + string[] sFallbackCullTypes = {"Default", "DoubleSided"}; + + int fallbackShaderType = tag.Contains("Standard") ? 1 : 0; + fallbackShaderType = tag.Contains("VertexLit") ? 2 : fallbackShaderType; + fallbackShaderType = tag.Contains("Toon") ? 3 : fallbackShaderType; + fallbackShaderType = tag.Contains("Particle") ? 4 : fallbackShaderType; + fallbackShaderType = tag.Contains("Sprite") ? 5 : fallbackShaderType; + fallbackShaderType = tag.Contains("Matcap") ? 6 : fallbackShaderType; + fallbackShaderType = tag.Contains("MobileToon") ? 7 : fallbackShaderType; + fallbackShaderType = tag.Contains("Hidden") ? 8 : fallbackShaderType; + + int fallbackRenderType = tag.Contains("Cutout") ? 1 : 0; + fallbackRenderType = tag.Contains("Transparent") ? 2 : fallbackRenderType; + fallbackRenderType = tag.Contains("Fade") ? 3 : fallbackRenderType; + + int fallbackCullType = tag.Contains("DoubleSided") ? 1 : 0; + + fallbackShaderType = EditorGUILayout.Popup("Shader Type", fallbackShaderType, sFallbackShaderTypes); + fallbackRenderType = EditorGUILayout.Popup("Rendering Mode", fallbackRenderType, sFallbackRenderTypes); + fallbackCullType = EditorGUILayout.Popup("Facing", fallbackCullType, sFallbackCullTypes); + + switch(fallbackShaderType) + { + case 0: tag = "Unlit"; break; + case 1: tag = "Standard"; break; + case 2: tag = "VertexLit"; break; + case 3: tag = "Toon"; break; + case 4: tag = "Particle"; break; + case 5: tag = "Sprite"; break; + case 6: tag = "Matcap"; break; + case 7: tag = "MobileToon"; break; + case 8: tag = "Hidden"; break; + default: tag = "Unlit"; break; + } + switch(fallbackRenderType) + { + case 0: break; + case 1: tag += "Cutout"; break; + case 2: tag += "Transparent"; break; + case 3: tag += "Fade"; break; + default: break; + } + switch(fallbackCullType) + { + case 0: break; + case 1: tag += "DoubleSided"; break; + default: break; + } + EditorGUILayout.LabelField("Result:", '"' + tag + '"'); + material.SetOverrideTag("VRCFallBack", tag); + EditorGUILayout.EndVertical(); + } + else + { + material.SetOverrideTag("VRCFallBack", ""); + } + EditorGUILayout.EndVertical(); + } + #endif + } + //------------------------------------------------------------------------------------------------------------------------------ // Editor - internal static void ApplyEditorSettingTemp() + public static void ApplyEditorSettingTemp() { if(String.IsNullOrEmpty(edSet.languageNames)) { @@ -5922,12 +6172,12 @@ private static void VersionCheck() } } - internal void CopyProperty(MaterialProperty property) + public void CopyProperty(MaterialProperty property) { if(property != null) copiedProperties[property.name] = property; } - internal void PasteProperty(ref MaterialProperty property) + public void PasteProperty(ref MaterialProperty property) { if(property != null && copiedProperties.ContainsKey(property.name) && copiedProperties[property.name] != null) { @@ -5940,7 +6190,7 @@ internal void PasteProperty(ref MaterialProperty property) } } - internal void ResetProperty(ref MaterialProperty property) + public void ResetProperty(ref MaterialProperty property) { #if UNITY_2019_3_OR_NEWER if(property != null && property.targets[0] is Material && ((Material)property.targets[0]).shader != null) @@ -6057,6 +6307,7 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(main3rdDissolvePos); CopyProperty(main3rdDistanceFade); CopyProperty(alphaMaskMode); + CopyProperty(alphaMaskScale); CopyProperty(alphaMaskValue); CopyProperty(mainTex); CopyProperty(mainColorAdjustMask); @@ -6134,18 +6385,21 @@ private void CopyProperties(lilPropertyBlock propertyBlock) break; case lilPropertyBlock.AlphaMask: CopyProperty(alphaMaskMode); + CopyProperty(alphaMaskScale); CopyProperty(alphaMaskValue); CopyProperty(alphaMask); break; case lilPropertyBlock.Shadow: CopyProperty(useShadow); + CopyProperty(shadowColor); + CopyProperty(shadowNormalStrength); CopyProperty(shadowBorder); CopyProperty(shadowBlur); CopyProperty(shadowStrength); - CopyProperty(shadowColor); + CopyProperty(shadow2ndColor); + CopyProperty(shadow2ndNormalStrength); CopyProperty(shadow2ndBorder); CopyProperty(shadow2ndBlur); - CopyProperty(shadow2ndColor); CopyProperty(shadowMainStrength); CopyProperty(shadowEnvStrength); CopyProperty(shadowBorderColor); @@ -6285,10 +6539,12 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(reflectionColor); CopyProperty(applySpecular); CopyProperty(applySpecularFA); + CopyProperty(specularNormalStrength); CopyProperty(specularToon); CopyProperty(specularBorder); CopyProperty(specularBlur); CopyProperty(applyReflection); + CopyProperty(reflectionNormalStrength); CopyProperty(reflectionApplyTransparency); CopyProperty(useMatCap); CopyProperty(matcapColor); @@ -6300,9 +6556,11 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(matcapEnableLighting); CopyProperty(matcapShadowMask); CopyProperty(matcapBackfaceMask); + CopyProperty(matcapLod); CopyProperty(matcapBlendMode); CopyProperty(matcapMul); CopyProperty(matcapApplyTransparency); + CopyProperty(matcapNormalStrength); CopyProperty(matcapCustomNormal); CopyProperty(matcapBumpScale); CopyProperty(useMatCap2nd); @@ -6315,13 +6573,16 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(matcap2ndEnableLighting); CopyProperty(matcap2ndShadowMask); CopyProperty(matcap2ndBackfaceMask); + CopyProperty(matcap2ndLod); CopyProperty(matcap2ndBlendMode); CopyProperty(matcap2ndMul); + CopyProperty(matcap2ndNormalStrength); CopyProperty(matcap2ndApplyTransparency); CopyProperty(matcap2ndCustomNormal); CopyProperty(matcap2ndBumpScale); CopyProperty(useRim); CopyProperty(rimColor); + CopyProperty(rimNormalStrength); CopyProperty(rimBorder); CopyProperty(rimBlur); CopyProperty(rimFresnelPower); @@ -6346,8 +6607,10 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(glitterBackfaceMask); CopyProperty(glitterApplyTransparency); CopyProperty(glitterVRParallaxStrength); + CopyProperty(glitterNormalStrength); CopyProperty(useBacklight); CopyProperty(backlightColor); + CopyProperty(backlightNormalStrength); CopyProperty(backlightBorder); CopyProperty(backlightBlur); CopyProperty(backlightDirectivity); @@ -6383,10 +6646,12 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(reflectionColor); CopyProperty(applySpecular); CopyProperty(applySpecularFA); + CopyProperty(specularNormalStrength); CopyProperty(specularToon); CopyProperty(specularBorder); CopyProperty(specularBlur); CopyProperty(applyReflection); + CopyProperty(reflectionNormalStrength); CopyProperty(reflectionApplyTransparency); CopyProperty(metallicGlossMap); CopyProperty(smoothnessTex); @@ -6403,9 +6668,11 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(matcapEnableLighting); CopyProperty(matcapShadowMask); CopyProperty(matcapBackfaceMask); + CopyProperty(matcapLod); CopyProperty(matcapBlendMode); CopyProperty(matcapMul); CopyProperty(matcapApplyTransparency); + CopyProperty(matcapNormalStrength); CopyProperty(matcapCustomNormal); CopyProperty(matcapBumpScale); CopyProperty(matcapTex); @@ -6423,9 +6690,11 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(matcap2ndEnableLighting); CopyProperty(matcap2ndShadowMask); CopyProperty(matcap2ndBackfaceMask); + CopyProperty(matcap2ndLod); CopyProperty(matcap2ndBlendMode); CopyProperty(matcap2ndMul); CopyProperty(matcap2ndApplyTransparency); + CopyProperty(matcap2ndNormalStrength); CopyProperty(matcap2ndCustomNormal); CopyProperty(matcap2ndBumpScale); CopyProperty(matcap2ndTex); @@ -6435,6 +6704,7 @@ private void CopyProperties(lilPropertyBlock propertyBlock) case lilPropertyBlock.RimLight: CopyProperty(useRim); CopyProperty(rimColor); + CopyProperty(rimNormalStrength); CopyProperty(rimBorder); CopyProperty(rimBlur); CopyProperty(rimFresnelPower); @@ -6462,11 +6732,13 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(glitterBackfaceMask); CopyProperty(glitterApplyTransparency); CopyProperty(glitterVRParallaxStrength); + CopyProperty(glitterNormalStrength); CopyProperty(glitterColorTex); break; case lilPropertyBlock.Backlight: CopyProperty(useBacklight); CopyProperty(backlightColor); + CopyProperty(backlightNormalStrength); CopyProperty(backlightBorder); CopyProperty(backlightBlur); CopyProperty(backlightDirectivity); @@ -6510,12 +6782,16 @@ private void CopyProperties(lilPropertyBlock propertyBlock) break; case lilPropertyBlock.AudioLink: CopyProperty(useAudioLink); + CopyProperty(audioLinkDefaultValue); CopyProperty(audioLinkUVMode); CopyProperty(audioLinkUVParams); + CopyProperty(audioLinkStart); CopyProperty(audioLink2Main2nd); CopyProperty(audioLink2Main3rd); CopyProperty(audioLink2Emission); + CopyProperty(audioLink2EmissionGrad); CopyProperty(audioLink2Emission2nd); + CopyProperty(audioLink2Emission2ndGrad); CopyProperty(audioLink2Vertex); CopyProperty(audioLinkVertexUVMode); CopyProperty(audioLinkVertexUVParams); @@ -6597,6 +6873,7 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(dstBlendAlphaFA); CopyProperty(blendOpFA); CopyProperty(blendOpAlphaFA); + CopyProperty(zclip); CopyProperty(zwrite); CopyProperty(ztest); CopyProperty(offsetFactor); @@ -6616,6 +6893,7 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(outlineDstBlendAlphaFA); CopyProperty(outlineBlendOpFA); CopyProperty(outlineBlendOpAlphaFA); + CopyProperty(outlineZclip); CopyProperty(outlineZwrite); CopyProperty(outlineZtest); CopyProperty(outlineOffsetFactor); @@ -6635,6 +6913,7 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(furDstBlendAlphaFA); CopyProperty(furBlendOpFA); CopyProperty(furBlendOpAlphaFA); + CopyProperty(furZclip); CopyProperty(furZwrite); CopyProperty(furZtest); CopyProperty(furOffsetFactor); @@ -6735,6 +7014,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref main3rdDissolvePos); PasteProperty(ref main3rdDistanceFade); PasteProperty(ref alphaMaskMode); + PasteProperty(ref alphaMaskScale); PasteProperty(ref alphaMaskValue); if(shouldCopyTex) { @@ -6824,6 +7104,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) break; case lilPropertyBlock.AlphaMask: PasteProperty(ref alphaMaskMode); + PasteProperty(ref alphaMaskScale); PasteProperty(ref alphaMaskValue); if(shouldCopyTex) { @@ -6832,13 +7113,15 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) break; case lilPropertyBlock.Shadow: PasteProperty(ref useShadow); + PasteProperty(ref shadowColor); + PasteProperty(ref shadowNormalStrength); PasteProperty(ref shadowBorder); PasteProperty(ref shadowBlur); PasteProperty(ref shadowStrength); - PasteProperty(ref shadowColor); + PasteProperty(ref shadow2ndColor); + PasteProperty(ref shadow2ndNormalStrength); PasteProperty(ref shadow2ndBorder); PasteProperty(ref shadow2ndBlur); - PasteProperty(ref shadow2ndColor); PasteProperty(ref shadowMainStrength); PasteProperty(ref shadowEnvStrength); PasteProperty(ref shadowBorderColor); @@ -7002,10 +7285,12 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref reflectionColor); PasteProperty(ref applySpecular); PasteProperty(ref applySpecularFA); + PasteProperty(ref specularNormalStrength); PasteProperty(ref specularToon); PasteProperty(ref specularBorder); PasteProperty(ref specularBlur); PasteProperty(ref applyReflection); + PasteProperty(ref reflectionNormalStrength); PasteProperty(ref reflectionApplyTransparency); PasteProperty(ref useMatCap); PasteProperty(ref matcapColor); @@ -7017,9 +7302,11 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref matcapEnableLighting); PasteProperty(ref matcapShadowMask); PasteProperty(ref matcapBackfaceMask); + PasteProperty(ref matcapLod); PasteProperty(ref matcapBlendMode); PasteProperty(ref matcapMul); PasteProperty(ref matcapApplyTransparency); + PasteProperty(ref matcapNormalStrength); PasteProperty(ref matcapCustomNormal); PasteProperty(ref matcapBumpScale); PasteProperty(ref useMatCap2nd); @@ -7032,13 +7319,16 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref matcap2ndEnableLighting); PasteProperty(ref matcap2ndShadowMask); PasteProperty(ref matcap2ndBackfaceMask); + PasteProperty(ref matcap2ndLod); PasteProperty(ref matcap2ndBlendMode); PasteProperty(ref matcap2ndMul); + PasteProperty(ref matcap2ndNormalStrength); PasteProperty(ref matcap2ndApplyTransparency); PasteProperty(ref matcap2ndCustomNormal); PasteProperty(ref matcap2ndBumpScale); PasteProperty(ref useRim); PasteProperty(ref rimColor); + PasteProperty(ref rimNormalStrength); PasteProperty(ref rimBorder); PasteProperty(ref rimBlur); PasteProperty(ref rimFresnelPower); @@ -7063,8 +7353,10 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref glitterBackfaceMask); PasteProperty(ref glitterApplyTransparency); PasteProperty(ref glitterVRParallaxStrength); + PasteProperty(ref glitterNormalStrength); PasteProperty(ref useBacklight); PasteProperty(ref backlightColor); + PasteProperty(ref backlightNormalStrength); PasteProperty(ref backlightBorder); PasteProperty(ref backlightBlur); PasteProperty(ref backlightDirectivity); @@ -7103,10 +7395,12 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref reflectionColor); PasteProperty(ref applySpecular); PasteProperty(ref applySpecularFA); + PasteProperty(ref specularNormalStrength); PasteProperty(ref specularToon); PasteProperty(ref specularBorder); PasteProperty(ref specularBlur); PasteProperty(ref applyReflection); + PasteProperty(ref reflectionNormalStrength); PasteProperty(ref reflectionApplyTransparency); if(shouldCopyTex) { @@ -7126,9 +7420,11 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref matcapEnableLighting); PasteProperty(ref matcapShadowMask); PasteProperty(ref matcapBackfaceMask); + PasteProperty(ref matcapLod); PasteProperty(ref matcapBlendMode); PasteProperty(ref matcapMul); PasteProperty(ref matcapApplyTransparency); + PasteProperty(ref matcapNormalStrength); PasteProperty(ref matcapCustomNormal); PasteProperty(ref matcapBumpScale); if(shouldCopyTex) @@ -7149,9 +7445,11 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref matcap2ndEnableLighting); PasteProperty(ref matcap2ndShadowMask); PasteProperty(ref matcap2ndBackfaceMask); + PasteProperty(ref matcap2ndLod); PasteProperty(ref matcap2ndBlendMode); PasteProperty(ref matcap2ndMul); PasteProperty(ref matcap2ndApplyTransparency); + PasteProperty(ref matcap2ndNormalStrength); PasteProperty(ref matcap2ndCustomNormal); PasteProperty(ref matcap2ndBumpScale); if(shouldCopyTex) @@ -7164,6 +7462,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) case lilPropertyBlock.RimLight: PasteProperty(ref useRim); PasteProperty(ref rimColor); + PasteProperty(ref rimNormalStrength); PasteProperty(ref rimBorder); PasteProperty(ref rimBlur); PasteProperty(ref rimFresnelPower); @@ -7194,6 +7493,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref glitterBackfaceMask); PasteProperty(ref glitterApplyTransparency); PasteProperty(ref glitterVRParallaxStrength); + PasteProperty(ref glitterNormalStrength); if(shouldCopyTex) { PasteProperty(ref glitterColorTex); @@ -7202,6 +7502,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) case lilPropertyBlock.Backlight: PasteProperty(ref useBacklight); PasteProperty(ref backlightColor); + PasteProperty(ref backlightNormalStrength); PasteProperty(ref backlightBorder); PasteProperty(ref backlightBlur); PasteProperty(ref backlightDirectivity); @@ -7257,12 +7558,16 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) break; case lilPropertyBlock.AudioLink: PasteProperty(ref useAudioLink); + PasteProperty(ref audioLinkDefaultValue); PasteProperty(ref audioLinkUVMode); PasteProperty(ref audioLinkUVParams); + PasteProperty(ref audioLinkStart); PasteProperty(ref audioLink2Main2nd); PasteProperty(ref audioLink2Main3rd); PasteProperty(ref audioLink2Emission); + PasteProperty(ref audioLink2EmissionGrad); PasteProperty(ref audioLink2Emission2nd); + PasteProperty(ref audioLink2Emission2ndGrad); PasteProperty(ref audioLink2Vertex); PasteProperty(ref audioLinkVertexUVMode); PasteProperty(ref audioLinkVertexUVParams); @@ -7353,6 +7658,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref dstBlendAlphaFA); PasteProperty(ref blendOpFA); PasteProperty(ref blendOpAlphaFA); + PasteProperty(ref zclip); PasteProperty(ref zwrite); PasteProperty(ref ztest); PasteProperty(ref offsetFactor); @@ -7372,6 +7678,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref outlineDstBlendAlphaFA); PasteProperty(ref outlineBlendOpFA); PasteProperty(ref outlineBlendOpAlphaFA); + PasteProperty(ref outlineZclip); PasteProperty(ref outlineZwrite); PasteProperty(ref outlineZtest); PasteProperty(ref outlineOffsetFactor); @@ -7391,6 +7698,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref furDstBlendAlphaFA); PasteProperty(ref furBlendOpFA); PasteProperty(ref furBlendOpAlphaFA); + PasteProperty(ref furZclip); PasteProperty(ref furZwrite); PasteProperty(ref furZtest); PasteProperty(ref furOffsetFactor); @@ -7488,6 +7796,7 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref main3rdDissolvePos); ResetProperty(ref main3rdDistanceFade); ResetProperty(ref alphaMaskMode); + ResetProperty(ref alphaMaskScale); ResetProperty(ref alphaMaskValue); ResetProperty(ref mainTex); ResetProperty(ref mainColorAdjustMask); @@ -7565,18 +7874,21 @@ private void ResetProperties(lilPropertyBlock propertyBlock) break; case lilPropertyBlock.AlphaMask: ResetProperty(ref alphaMaskMode); + ResetProperty(ref alphaMaskScale); ResetProperty(ref alphaMaskValue); ResetProperty(ref alphaMask); break; case lilPropertyBlock.Shadow: ResetProperty(ref useShadow); + ResetProperty(ref shadowColor); + ResetProperty(ref shadowNormalStrength); ResetProperty(ref shadowBorder); ResetProperty(ref shadowBlur); ResetProperty(ref shadowStrength); - ResetProperty(ref shadowColor); + ResetProperty(ref shadow2ndColor); + ResetProperty(ref shadow2ndNormalStrength); ResetProperty(ref shadow2ndBorder); ResetProperty(ref shadow2ndBlur); - ResetProperty(ref shadow2ndColor); ResetProperty(ref shadowMainStrength); ResetProperty(ref shadowEnvStrength); ResetProperty(ref shadowBorderColor); @@ -7716,10 +8028,12 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref reflectionColor); ResetProperty(ref applySpecular); ResetProperty(ref applySpecularFA); + ResetProperty(ref specularNormalStrength); ResetProperty(ref specularToon); ResetProperty(ref specularBorder); ResetProperty(ref specularBlur); ResetProperty(ref applyReflection); + ResetProperty(ref reflectionNormalStrength); ResetProperty(ref reflectionApplyTransparency); ResetProperty(ref useMatCap); ResetProperty(ref matcapColor); @@ -7731,9 +8045,11 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref matcapEnableLighting); ResetProperty(ref matcapShadowMask); ResetProperty(ref matcapBackfaceMask); + ResetProperty(ref matcapLod); ResetProperty(ref matcapBlendMode); ResetProperty(ref matcapMul); ResetProperty(ref matcapApplyTransparency); + ResetProperty(ref matcapNormalStrength); ResetProperty(ref matcapCustomNormal); ResetProperty(ref matcapBumpScale); ResetProperty(ref useMatCap2nd); @@ -7745,14 +8061,17 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref matcap2ndBlend); ResetProperty(ref matcap2ndEnableLighting); ResetProperty(ref matcap2ndShadowMask); - ResetProperty(ref matcapBackfaceMask); + ResetProperty(ref matcap2ndBackfaceMask); + ResetProperty(ref matcap2ndLod); ResetProperty(ref matcap2ndBlendMode); ResetProperty(ref matcap2ndMul); + ResetProperty(ref matcap2ndNormalStrength); ResetProperty(ref matcap2ndApplyTransparency); ResetProperty(ref matcap2ndCustomNormal); ResetProperty(ref matcap2ndBumpScale); ResetProperty(ref useRim); ResetProperty(ref rimColor); + ResetProperty(ref rimNormalStrength); ResetProperty(ref rimBorder); ResetProperty(ref rimBlur); ResetProperty(ref rimFresnelPower); @@ -7777,8 +8096,10 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref glitterBackfaceMask); ResetProperty(ref glitterApplyTransparency); ResetProperty(ref glitterVRParallaxStrength); + ResetProperty(ref glitterNormalStrength); ResetProperty(ref useBacklight); ResetProperty(ref backlightColor); + ResetProperty(ref backlightNormalStrength); ResetProperty(ref backlightBorder); ResetProperty(ref backlightBlur); ResetProperty(ref backlightDirectivity); @@ -7814,10 +8135,12 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref reflectionColor); ResetProperty(ref applySpecular); ResetProperty(ref applySpecularFA); + ResetProperty(ref specularNormalStrength); ResetProperty(ref specularToon); ResetProperty(ref specularBorder); ResetProperty(ref specularBlur); ResetProperty(ref applyReflection); + ResetProperty(ref reflectionNormalStrength); ResetProperty(ref reflectionApplyTransparency); ResetProperty(ref metallicGlossMap); ResetProperty(ref smoothnessTex); @@ -7834,9 +8157,11 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref matcapEnableLighting); ResetProperty(ref matcapShadowMask); ResetProperty(ref matcapBackfaceMask); + ResetProperty(ref matcapLod); ResetProperty(ref matcapBlendMode); ResetProperty(ref matcapMul); ResetProperty(ref matcapApplyTransparency); + ResetProperty(ref matcapNormalStrength); ResetProperty(ref matcapCustomNormal); ResetProperty(ref matcapBumpScale); ResetProperty(ref matcapTex); @@ -7854,9 +8179,11 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref matcap2ndEnableLighting); ResetProperty(ref matcap2ndShadowMask); ResetProperty(ref matcap2ndBackfaceMask); + ResetProperty(ref matcap2ndLod); ResetProperty(ref matcap2ndBlendMode); ResetProperty(ref matcap2ndMul); ResetProperty(ref matcap2ndApplyTransparency); + ResetProperty(ref matcap2ndNormalStrength); ResetProperty(ref matcap2ndCustomNormal); ResetProperty(ref matcap2ndBumpScale); ResetProperty(ref matcap2ndTex); @@ -7866,6 +8193,7 @@ private void ResetProperties(lilPropertyBlock propertyBlock) case lilPropertyBlock.RimLight: ResetProperty(ref useRim); ResetProperty(ref rimColor); + ResetProperty(ref rimNormalStrength); ResetProperty(ref rimBorder); ResetProperty(ref rimBlur); ResetProperty(ref rimFresnelPower); @@ -7893,11 +8221,13 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref glitterBackfaceMask); ResetProperty(ref glitterApplyTransparency); ResetProperty(ref glitterVRParallaxStrength); + ResetProperty(ref glitterNormalStrength); ResetProperty(ref glitterColorTex); break; case lilPropertyBlock.Backlight: ResetProperty(ref useBacklight); ResetProperty(ref backlightColor); + ResetProperty(ref backlightNormalStrength); ResetProperty(ref backlightBorder); ResetProperty(ref backlightBlur); ResetProperty(ref backlightDirectivity); @@ -7941,12 +8271,16 @@ private void ResetProperties(lilPropertyBlock propertyBlock) break; case lilPropertyBlock.AudioLink: ResetProperty(ref useAudioLink); + ResetProperty(ref audioLinkDefaultValue); ResetProperty(ref audioLinkUVMode); ResetProperty(ref audioLinkUVParams); + ResetProperty(ref audioLinkStart); ResetProperty(ref audioLink2Main2nd); ResetProperty(ref audioLink2Main3rd); ResetProperty(ref audioLink2Emission); + ResetProperty(ref audioLink2EmissionGrad); ResetProperty(ref audioLink2Emission2nd); + ResetProperty(ref audioLink2Emission2ndGrad); ResetProperty(ref audioLink2Vertex); ResetProperty(ref audioLinkVertexUVMode); ResetProperty(ref audioLinkVertexUVParams); @@ -8028,6 +8362,7 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref dstBlendAlphaFA); ResetProperty(ref blendOpFA); ResetProperty(ref blendOpAlphaFA); + ResetProperty(ref zclip); ResetProperty(ref zwrite); ResetProperty(ref ztest); ResetProperty(ref offsetFactor); @@ -8047,6 +8382,7 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref outlineDstBlendAlphaFA); ResetProperty(ref outlineBlendOpFA); ResetProperty(ref outlineBlendOpAlphaFA); + ResetProperty(ref outlineZclip); ResetProperty(ref outlineZwrite); ResetProperty(ref outlineZtest); ResetProperty(ref outlineOffsetFactor); @@ -8066,6 +8402,7 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref furDstBlendAlphaFA); ResetProperty(ref furBlendOpFA); ResetProperty(ref furBlendOpAlphaFA); + ResetProperty(ref furZclip); ResetProperty(ref furZwrite); ResetProperty(ref furZtest); ResetProperty(ref furOffsetFactor); @@ -8107,7 +8444,7 @@ private void ApplyLightingPreset(lilLightingPreset lightingPreset) //------------------------------------------------------------------------------------------------------------------------------ // Material Setup - internal static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool isstencil, bool istess) + public static void SetupMaterialWithRenderingMode(Material material, RenderingMode renderingMode, TransparentMode transparentMode, bool isoutl, bool islite, bool isstencil, bool istess) { if(isMulti) { @@ -8465,7 +8802,7 @@ internal static void SetupMaterialWithRenderingMode(Material material, Rendering } } - internal static void SetupShaderSettingFromMaterial(Material material, ref lilToonSetting shaderSetting) + public static void SetupShaderSettingFromMaterial(Material material, ref lilToonSetting shaderSetting) { if(shaderSetting.isLocked) return; if(!material.shader.name.Contains("lilToon") || material.shader.name.Contains("Lite") || material.shader.name.Contains("Multi")) return; @@ -8503,14 +8840,8 @@ internal static void SetupShaderSettingFromMaterial(Material material, ref lilTo if(material.HasProperty("_AlphaMaskMode")) shaderSetting.LIL_FEATURE_ALPHAMASK = shaderSetting.LIL_FEATURE_ALPHAMASK || material.GetFloat("_AlphaMaskMode") != 0.0f; if(material.HasProperty("_UseEmission")) shaderSetting.LIL_FEATURE_EMISSION_1ST = shaderSetting.LIL_FEATURE_EMISSION_1ST || material.GetFloat("_UseEmission") != 0.0f; if(material.HasProperty("_UseEmission2nd")) shaderSetting.LIL_FEATURE_EMISSION_2ND = shaderSetting.LIL_FEATURE_EMISSION_2ND || material.GetFloat("_UseEmission2nd") != 0.0f; - if(material.HasProperty("_EmissionMap")) shaderSetting.LIL_FEATURE_EMISSION_UV = shaderSetting.LIL_FEATURE_EMISSION_UV || CheckScaleOffsetChanged(material, "_EmissionMap"); - if(material.HasProperty("_Emission2ndMap")) shaderSetting.LIL_FEATURE_EMISSION_UV = shaderSetting.LIL_FEATURE_EMISSION_UV || CheckScaleOffsetChanged(material, "_Emission2ndMap"); - if(material.HasProperty("_EmissionMap_UVMode")) shaderSetting.LIL_FEATURE_EMISSION_UV = shaderSetting.LIL_FEATURE_EMISSION_UV || material.GetFloat("_EmissionMap_UVMode") != 0.0f; - if(material.HasProperty("_Emission2ndMap_UVMode")) shaderSetting.LIL_FEATURE_EMISSION_UV = shaderSetting.LIL_FEATURE_EMISSION_UV || material.GetFloat("_Emission2ndMap_UVMode") != 0.0f; if(material.HasProperty("_EmissionMap_ScrollRotate")) shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV || material.GetVector("_EmissionMap_ScrollRotate") != defaultScrollRotate; if(material.HasProperty("_Emission2ndMap_ScrollRotate")) shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV || material.GetVector("_Emission2ndMap_ScrollRotate") != defaultScrollRotate; - if(material.HasProperty("_EmissionBlendMask")) shaderSetting.LIL_FEATURE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_EMISSION_MASK_UV || CheckScaleOffsetChanged(material, "_EmissionBlendMask"); - if(material.HasProperty("_Emission2ndBlendMask")) shaderSetting.LIL_FEATURE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_EMISSION_MASK_UV || CheckScaleOffsetChanged(material, "_Emission2ndBlendMask"); if(material.HasProperty("_EmissionBlendMask_ScrollRotate")) shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV || material.GetVector("_EmissionBlendMask_ScrollRotate") != defaultScrollRotate; if(material.HasProperty("_Emission2ndBlendMask_ScrollRotate")) shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV || material.GetVector("_Emission2ndBlendMask_ScrollRotate") != defaultScrollRotate; if(material.HasProperty("_EmissionUseGrad")) shaderSetting.LIL_FEATURE_EMISSION_GRADATION = shaderSetting.LIL_FEATURE_EMISSION_GRADATION || material.GetFloat("_EmissionUseGrad") != 0.0f; @@ -8545,11 +8876,7 @@ internal static void SetupShaderSettingFromMaterial(Material material, ref lilTo if(material.HasProperty("_MatCapBumpMap")) shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP = shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP || material.GetTexture("_MatCapBumpMap") != null; if(material.HasProperty("_MatCap2ndBumpMap")) shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP = shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP || material.GetTexture("_MatCap2ndBumpMap") != null; if(material.HasProperty("_RimColorTex")) shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR = shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR || material.GetTexture("_RimColorTex") != null; - if(material.HasProperty("_AudioLinkMask")) shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK = shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK || material.GetTexture("_AudioLinkMask") != null; if(material.HasProperty("_DissolveNoiseMask")) shaderSetting.LIL_FEATURE_TEX_DISSOLVE_NOISE = shaderSetting.LIL_FEATURE_TEX_DISSOLVE_NOISE || material.GetTexture("_DissolveNoiseMask") != null; - - shaderSetting.LIL_FEATURE_EMISSION_UV = shaderSetting.LIL_FEATURE_EMISSION_UV || shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV; - shaderSetting.LIL_FEATURE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_EMISSION_MASK_UV || shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV; } // Outline @@ -8565,7 +8892,7 @@ internal static void SetupShaderSettingFromMaterial(Material material, ref lilTo shaderSetting.LIL_FEATURE_TEX_TESSELLATION = shaderSetting.LIL_FEATURE_TEX_TESSELLATION || material.shader.name.Contains("Tessellation"); } - internal static void SetupMaterialFromShaderSetting(Material material, lilToonSetting shaderSetting) + public static void SetupMaterialFromShaderSetting(Material material, lilToonSetting shaderSetting) { if(!material.shader.name.Contains("lilToon") || material.shader.name.Contains("Lite") || material.shader.name.Contains("Multi")) return; @@ -8576,7 +8903,11 @@ internal static void SetupMaterialFromShaderSetting(Material material, lilToonSe if(!shaderSetting.LIL_FEATURE_DISTANCE_FADE) material.SetVector("_DistanceFade", defaultDistanceFadeParams); if(!shaderSetting.LIL_FEATURE_ENCRYPTION) material.SetVector("_Keys", defaultKeys); if(!shaderSetting.LIL_FEATURE_SHADOW || !shaderSetting.LIL_FEATURE_TEX_SHADOW_BLUR) material.SetTexture("_ShadowBlurMask", null); - if(!shaderSetting.LIL_FEATURE_SHADOW || !shaderSetting.LIL_FEATURE_TEX_SHADOW_BORDER) material.SetTexture("_ShadowBorderMask", null); + if(!shaderSetting.LIL_FEATURE_SHADOW || !shaderSetting.LIL_FEATURE_TEX_SHADOW_BORDER) + { + material.SetTexture("_ShadowBorderMask", null); + material.SetVector("_ShadowAOShift", new Vector4(1.0f,0.0f,1.0f,0.0f)); + } if(!shaderSetting.LIL_FEATURE_SHADOW || !shaderSetting.LIL_FEATURE_TEX_SHADOW_STRENGTH) material.SetTexture("_ShadowStrengthMask", null); if(!shaderSetting.LIL_FEATURE_SHADOW || !shaderSetting.LIL_FEATURE_TEX_SHADOW_1ST) material.SetTexture("_ShadowColorTex", null); if(!shaderSetting.LIL_FEATURE_SHADOW || !shaderSetting.LIL_FEATURE_TEX_SHADOW_2ND) material.SetTexture("_Shadow2ndColorTex", null); @@ -8611,11 +8942,6 @@ internal static void SetupMaterialFromShaderSetting(Material material, lilToonSe if(!shaderSetting.LIL_FEATURE_ALPHAMASK) material.SetFloat("_AlphaMaskMode", 0.0f); if(!shaderSetting.LIL_FEATURE_EMISSION_1ST) material.SetFloat("_UseEmission", 0.0f); if(!shaderSetting.LIL_FEATURE_EMISSION_2ND) material.SetFloat("_UseEmission2nd", 0.0f); - if(!shaderSetting.LIL_FEATURE_EMISSION_UV) - { - ResetScaleOffset(material, "_EmissionMap"); - ResetScaleOffset(material, "_Emission2ndMap"); - } if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV) { material.SetFloat("_EmissionMap_UVMode", 0.0f); @@ -8623,11 +8949,6 @@ internal static void SetupMaterialFromShaderSetting(Material material, lilToonSe material.SetVector("_EmissionMap_ScrollRotate", defaultScrollRotate); material.SetVector("_Emission2ndMap_ScrollRotate", defaultScrollRotate); } - if(!shaderSetting.LIL_FEATURE_EMISSION_MASK_UV) - { - ResetScaleOffset(material, "_EmissionBlendMask"); - ResetScaleOffset(material, "_Emission2ndBlendMask"); - } if(!shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) { material.SetVector("_EmissionBlendMask_ScrollRotate", defaultScrollRotate); @@ -8680,7 +9001,6 @@ internal static void SetupMaterialFromShaderSetting(Material material, lilToonSe material.SetTexture("_MatCap2ndBumpMap", null); } if(!shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR) material.SetTexture("_RimColorTex", null); - if(!shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK) material.SetTexture("_AudioLinkMask", null); if(!shaderSetting.LIL_FEATURE_TEX_DISSOLVE_NOISE) material.SetTexture("_DissolveNoiseMask", null); } @@ -8697,7 +9017,7 @@ internal static void SetupMaterialFromShaderSetting(Material material, lilToonSe //if(!shaderSetting.LIL_FEATURE_TEX_TESSELLATION); } - internal static void SetupShaderSettingFromAnimationClip(AnimationClip clip, ref lilToonSetting shaderSetting) + public static void SetupShaderSettingFromAnimationClip(AnimationClip clip, ref lilToonSetting shaderSetting) { if(shaderSetting.isLocked) return; if(clip == null) return; @@ -8735,9 +9055,7 @@ internal static void SetupShaderSettingFromAnimationClip(AnimationClip clip, ref shaderSetting.LIL_FEATURE_ALPHAMASK = shaderSetting.LIL_FEATURE_ALPHAMASK || propname.Contains("_AlphaMaskMode"); shaderSetting.LIL_FEATURE_EMISSION_1ST = shaderSetting.LIL_FEATURE_EMISSION_1ST || propname.Contains("_UseEmission"); shaderSetting.LIL_FEATURE_EMISSION_2ND = shaderSetting.LIL_FEATURE_EMISSION_2ND || propname.Contains("_UseEmission2nd"); - shaderSetting.LIL_FEATURE_EMISSION_UV = shaderSetting.LIL_FEATURE_EMISSION_UV || propname.Contains("_EmissionMap_ST") || propname.Contains("_Emission2ndMap_ST") || propname.Contains("_EmissionMap_UVMode") || propname.Contains("_Emission2ndMap_UVMode"); shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_UV || propname.Contains("_EmissionMap_ScrollRotate") || propname.Contains("_Emission2ndMap_ScrollRotate"); - shaderSetting.LIL_FEATURE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_EMISSION_MASK_UV || propname.Contains("_EmissionBlendMask_ST") || propname.Contains("_Emission2ndBlendMask_ST"); shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV = shaderSetting.LIL_FEATURE_ANIMATE_EMISSION_MASK_UV || propname.Contains("_EmissionBlendMask_ScrollRotate") || propname.Contains("_Emission2ndBlendMask_ScrollRotate"); shaderSetting.LIL_FEATURE_EMISSION_GRADATION = shaderSetting.LIL_FEATURE_EMISSION_GRADATION || propname.Contains("_EmissionUseGrad"); shaderSetting.LIL_FEATURE_NORMAL_1ST = shaderSetting.LIL_FEATURE_NORMAL_1ST || propname.Contains("_UseBumpMap"); @@ -8766,7 +9084,6 @@ internal static void SetupShaderSettingFromAnimationClip(AnimationClip clip, ref shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK = shaderSetting.LIL_FEATURE_TEX_MATCAP_MASK || propname.Contains("_MatCapBlendMask") || propname.Contains("_MatCap2ndBlendMask"); shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP = shaderSetting.LIL_FEATURE_TEX_MATCAP_NORMALMAP || propname.Contains("_MatCapBumpMap") || propname.Contains("_MatCap2ndBumpMap"); shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR = shaderSetting.LIL_FEATURE_TEX_RIMLIGHT_COLOR || propname.Contains("_RimColorTex"); - shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK = shaderSetting.LIL_FEATURE_TEX_AUDIOLINK_MASK || propname.Contains("_AudioLinkMask"); shaderSetting.LIL_FEATURE_TEX_DISSOLVE_NOISE = shaderSetting.LIL_FEATURE_TEX_DISSOLVE_NOISE || propname.Contains("_DissolveNoiseMask"); shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV = shaderSetting.LIL_FEATURE_ANIMATE_OUTLINE_UV || propname.Contains("_OutlineTex_ScrollRotate"); @@ -8776,7 +9093,7 @@ internal static void SetupShaderSettingFromAnimationClip(AnimationClip clip, ref } } - internal static bool CheckMainTextureName(string name) + public static bool CheckMainTextureName(string name) { foreach(string word in mainTexCheckWords) { @@ -8785,7 +9102,7 @@ internal static bool CheckMainTextureName(string name) return true; } - internal static void RemoveUnusedTexture(Material material) + public static void RemoveUnusedTexture(Material material) { if(!material.shader.name.Contains("lilToon")) return; lilToonSetting shaderSetting = null; @@ -8793,13 +9110,13 @@ internal static void RemoveUnusedTexture(Material material) RemoveUnusedTexture(material, material.shader.name.Contains("Lite"), material.shader.name.Contains("Fur"), shaderSetting); } - internal static void SetShaderKeywords(Material material, string keyword, bool enable) + public static void SetShaderKeywords(Material material, string keyword, bool enable) { if(enable) material.EnableKeyword(keyword); else material.DisableKeyword(keyword); } - internal void SetupMultiMaterial(Material material) + public void SetupMultiMaterial(Material material) { SetShaderKeywords(material, "ETC1_EXTERNAL_ALPHA", material.GetFloat("_UseOutline") != 0.0f); SetShaderKeywords(material, "UNITY_UI_ALPHACLIP", material.GetFloat("_TransparentMode") == 1.0f); @@ -9053,7 +9370,7 @@ private static void ResetScaleOffset(Material material, string texname) //------------------------------------------------------------------------------------------------------------------------------ // Presets - internal static void ApplyPreset(Material material, lilToonPreset preset) + public static void ApplyPreset(Material material, lilToonPreset preset) { if(material == null || preset == null) return; for(int i = 0; i < preset.floats.Length; i++) @@ -9465,6 +9782,7 @@ private void CreateLiteMaterial(Material material) liteMaterial.SetFloat("_SrcBlendFA", srcBlendFA.floatValue); liteMaterial.SetFloat("_DstBlendFA", dstBlendFA.floatValue); liteMaterial.SetFloat("_BlendOpFA", blendOpFA.floatValue); + liteMaterial.SetFloat("_ZClip", zclip.floatValue); liteMaterial.SetFloat("_ZWrite", zwrite.floatValue); liteMaterial.SetFloat("_ZTest", ztest.floatValue); liteMaterial.SetFloat("_AlphaToMask", alphaToMask.floatValue); @@ -9731,6 +10049,25 @@ private void ToneCorrectionGUI(MaterialEditor materialEditor, Material material, } } + private void DrawVectorAs4Float(MaterialProperty prop, string label0, string label1, string label2, string label3) + { + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float param4 = prop.vectorValue.w; + + EditorGUI.BeginChangeCheck(); + param1 = EditorGUILayout.FloatField(label0, param1); + param2 = EditorGUILayout.FloatField(label1, param2); + param3 = EditorGUILayout.FloatField(label2, param3); + param4 = EditorGUILayout.FloatField(label3, param4); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, param4); + } + } + private void TextureBakeGUI(Material material, int bakeType) { // bakeType @@ -9921,6 +10258,26 @@ private void TextureGUI(MaterialEditor materialEditor, ref bool isShow, GUIConte } } + private void MatCapTextureGUI(MaterialEditor materialEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) + { + // Make space for foldout + EditorGUI.indentLevel++; + Rect rect = materialEditor.TexturePropertySingleLine(guiContent, textureName); + EditorGUI.indentLevel--; + rect.x += 10; + isShow = EditorGUI.Foldout(rect, isShow, ""); + if(isShow) + { + EditorGUI.indentLevel++; + materialEditor.TextureScaleOffsetProperty(textureName); + materialEditor.ShaderProperty(blendUV1, GetLoc("sBlendUV1")); + materialEditor.ShaderProperty(zRotCancel, GetLoc("sMatCapZRotCancel")); + materialEditor.ShaderProperty(perspective, GetLoc("sFixPerspective")); + materialEditor.ShaderProperty(vrParallaxStrength, GetLoc("sVRParallaxStrength")); + EditorGUI.indentLevel--; + } + } + private void MatCapTextureGUI(MaterialEditor materialEditor, ref bool isShow, GUIContent guiContent, MaterialProperty textureName, MaterialProperty rgba, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) { // Make space for foldout @@ -10578,6 +10935,7 @@ private Texture2D AutoBakeAlphaMask(Material material) hsvgMaterial.SetColor(mainColor.name, Color.white); hsvgMaterial.SetVector(mainTexHSVG.name, defaultHSVG); hsvgMaterial.SetFloat(alphaMaskMode.name, alphaMaskMode.floatValue); + hsvgMaterial.SetFloat(alphaMaskScale.name, alphaMaskScale.floatValue); hsvgMaterial.SetFloat(alphaMaskValue.name, alphaMaskValue.floatValue); path = AssetDatabase.GetAssetPath(bufMainTexture); diff --git a/Assets/lilToon/Editor/lilToonEditorUtils.cs b/Assets/lilToon/Editor/lilToonEditorUtils.cs index bf6c49e3..5592fc18 100644 --- a/Assets/lilToon/Editor/lilToonEditorUtils.cs +++ b/Assets/lilToon/Editor/lilToonEditorUtils.cs @@ -30,6 +30,7 @@ static void RefreshShaders() { string shaderPath = AssetDatabase.GUIDToAssetPath(shaderGuid); lilToonInspector.RewriteReceiveShadow(shaderPath, isShadowReceive); + lilToonInspector.RewriteZClip(shaderPath); } lilToonInspector.ReimportPassShaders(); diff --git a/Assets/lilToon/Editor/lilToonPropertyDrawer.cs b/Assets/lilToon/Editor/lilToonPropertyDrawer.cs index 3a328213..28837d4b 100644 --- a/Assets/lilToon/Editor/lilToonPropertyDrawer.cs +++ b/Assets/lilToon/Editor/lilToonPropertyDrawer.cs @@ -484,6 +484,34 @@ public override void OnGUI(Rect position, MaterialProperty prop, String label, M } } + public class lilFFFF : MaterialPropertyDrawer + { + // [lilFFFF] + public override void OnGUI(Rect position, MaterialProperty prop, String label, MaterialEditor editor) + { + string[] labels = label.Split('|'); + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float param4 = prop.vectorValue.w; + + Rect position1 = EditorGUILayout.GetControlRect(); + Rect position2 = EditorGUILayout.GetControlRect(); + Rect position3 = EditorGUILayout.GetControlRect(); + + EditorGUI.BeginChangeCheck(); + param1 = EditorGUI.FloatField(position, labels[0], param1); + param2 = EditorGUI.FloatField(position1, labels[1], param2); + param3 = EditorGUI.FloatField(position2, labels[2], param3); + param4 = EditorGUI.FloatField(position3, labels[3], param4); + + if(EditorGUI.EndChangeCheck()) + { + prop.vectorValue = new Vector4(param1, param2, param3, param4); + } + } + } + public class lilFFFB : MaterialPropertyDrawer { // [lilFFFB] @@ -495,7 +523,6 @@ public override void OnGUI(Rect position, MaterialProperty prop, String label, M float param3 = prop.vectorValue.z; bool param4 = (prop.vectorValue.w != 0.0f); - EditorGUI.indentLevel++; Rect position1 = EditorGUILayout.GetControlRect(); Rect position2 = EditorGUILayout.GetControlRect(); Rect position3 = EditorGUILayout.GetControlRect(); @@ -505,7 +532,6 @@ public override void OnGUI(Rect position, MaterialProperty prop, String label, M param2 = EditorGUI.FloatField(position1, labels[1], param2); param3 = EditorGUI.FloatField(position2, labels[2], param3); param4 = EditorGUI.Toggle(position3, labels[3], param4); - EditorGUI.indentLevel--; if(EditorGUI.EndChangeCheck()) { @@ -514,23 +540,30 @@ public override void OnGUI(Rect position, MaterialProperty prop, String label, M } } - public class lilALUVMode : MaterialPropertyDrawer + public class lilFRFR : MaterialPropertyDrawer { - // [lilALUVMode] + // [lilFRFR] public override void OnGUI(Rect position, MaterialProperty prop, String label, MaterialEditor editor) { string[] labels = label.Split('|'); - float value = prop.floatValue; + float param1 = prop.vectorValue.x; + float param2 = prop.vectorValue.y; + float param3 = prop.vectorValue.z; + float param4 = prop.vectorValue.w; + + Rect position1 = EditorGUILayout.GetControlRect(); + Rect position2 = EditorGUILayout.GetControlRect(); + Rect position3 = EditorGUILayout.GetControlRect(); EditorGUI.BeginChangeCheck(); - EditorGUI.showMixedValue = prop.hasMixedValue; - if(labels.Length == 5) value = (float)EditorGUI.Popup(position, labels[0], (int)prop.floatValue, new String[]{labels[1],labels[2],labels[3],labels[4]}); - if(labels.Length == 4) value = (float)EditorGUI.Popup(position, labels[0], (int)prop.floatValue, new String[]{labels[1],labels[2],labels[3]}); - EditorGUI.showMixedValue = false; + param1 = EditorGUI.FloatField(position, labels[0], param1); + param2 = EditorGUI.Slider(position1, labels[1], param2, 0.0f, 1.0f); + param3 = EditorGUI.FloatField(position2, labels[2], param3); + param4 = EditorGUI.Slider(position3, labels[3], param4, 0.0f, 1.0f); if(EditorGUI.EndChangeCheck()) { - prop.floatValue = value; + prop.vectorValue = new Vector4(param1, param2, param3, param4); } } } diff --git a/Assets/lilToon/Editor/lilToonSetting.cs b/Assets/lilToon/Editor/lilToonSetting.cs index d93b9e16..3c23be49 100644 --- a/Assets/lilToon/Editor/lilToonSetting.cs +++ b/Assets/lilToon/Editor/lilToonSetting.cs @@ -16,9 +16,7 @@ public class lilToonSetting : ScriptableObject public bool LIL_FEATURE_RECEIVE_SHADOW; public bool LIL_FEATURE_EMISSION_1ST; public bool LIL_FEATURE_EMISSION_2ND; - public bool LIL_FEATURE_EMISSION_UV; public bool LIL_FEATURE_ANIMATE_EMISSION_UV; - public bool LIL_FEATURE_EMISSION_MASK_UV; public bool LIL_FEATURE_ANIMATE_EMISSION_MASK_UV; public bool LIL_FEATURE_EMISSION_GRADATION; public bool LIL_FEATURE_NORMAL_1ST; @@ -57,7 +55,6 @@ public class lilToonSetting : ScriptableObject public bool LIL_FEATURE_TEX_MATCAP_MASK; public bool LIL_FEATURE_TEX_MATCAP_NORMALMAP; public bool LIL_FEATURE_TEX_RIMLIGHT_COLOR; - public bool LIL_FEATURE_TEX_AUDIOLINK_MASK; public bool LIL_FEATURE_TEX_DISSOLVE_NOISE; public bool LIL_FEATURE_TEX_OUTLINE_COLOR; public bool LIL_FEATURE_TEX_OUTLINE_WIDTH; diff --git a/Assets/lilToon/MANUAL.md b/Assets/lilToon/MANUAL.md index 2d40949a..9df5806e 100644 --- a/Assets/lilToon/MANUAL.md +++ b/Assets/lilToon/MANUAL.md @@ -217,6 +217,7 @@ You can blend colors into the main color. This is the layer function in painting |Name|Description| |-|-| |Alpha Mask|None: Disables the function / Replace: Replace the transparency of the main texture / Multiply: Multiplies the transparency of the main texture| +|Scale / Offset|Scale and offset amount of alpha mask. For example, you can invert alpha mask by setting Scale = -1 and Offset = 1.| |Bake Alphamask|Applies a mask with a specified transparency to the texture.|
@@ -224,14 +225,17 @@ You can blend colors into the main color. This is the layer function in painting ## Shadow |Name|Description| |-|-| -|AO & Border|Range of shadow. You can specify an AO texture to change the ease of shadows.| -|Blur|Amount of shadow blur.| |Mask & Strength|Strength of shadow. Shadows do not appear in the areas painted black by the mask.| |1st/2nd Color|Color of shadow. You can specify a texture to override the color.| -|Main Color Power|Multiply the Main Color to emphasize the shadows.| -|Environment strength on shadow color|The intensity with which environment light affects the color of the shadow.| +|Border|Range of shadow.| +|Blur|Amount of shadow blur.| +|Normal Map Strength|Strength of normal map.| |Border Color|Color of shadow border.| |Border Range|Range of Border Color.| +|AO Map|You can specify an AO texture to change the ease of shadows.| +|Scale / Offset|Scale and offset amount of AO Map. For example, you can invert AO Map by setting Scale = -1 and Offset = 1.| +|Contrast|Multiply the Main Color to emphasize the shadows.| +|Environment strength on shadow color|The intensity with which environment light affects the color of the shadow.| |Receive Shadow|Receive shadows from other objects. It can look unnatural under a roof and is often better to turn it off.|
@@ -406,7 +410,8 @@ You can blend colors into the main color. This is the layer function in painting |Offset|Amount of timing shift.| |Angle|The angle of UV.| |Band|Bandwidth (pitch) to be sampled.| -|Mask|Mask texture that change the AudioLink process. (R:Delay G:Band B:Strength)| +|Mask|Mask texture that change the AudioLink process.
Normal: RGB = Delay / Band / Strength
Spectrum: RGB = Volume / Band / Strength| +|Default value for no AudioLink|Default value in a world that does not support AudioLink.| |Apply to|Target to apply the effect to.| |-|-| |As Local|Use local texture instead of getting them from AudioLink.| diff --git a/Assets/lilToon/MANUAL_JP.md b/Assets/lilToon/MANUAL_JP.md index affc1768..3a489467 100644 --- a/Assets/lilToon/MANUAL_JP.md +++ b/Assets/lilToon/MANUAL_JP.md @@ -218,6 +218,7 @@ FakeShadowを使用する場合は以下のようにステンシル設定を変 |名前|説明| |-|-| |アルファマスク|Noneで無効、置き換えでメインテクスチャの透明度を置き換え、乗算でメインテクスチャの透明度に乗算します。| +|Scale・Offset|アルファマスクの倍率とオフセット量です。例えばScale=-1、Offset=1とすることでアルファマスクを反転することができます。| |アルファマスクを焼き込み|メインテクスチャにアルファマスクを適用できます。|
@@ -225,14 +226,17 @@ FakeShadowを使用する場合は以下のようにステンシル設定を変 ## 影設定 |名前|説明| |-|-| -|AOと影範囲|影になる範囲です。AO(陰影)テクスチャを指定すると暗い部分ほど影が出やすくなります。| -|ぼかし|影のぼかし量です。マスクを指定すると部分的にぼかし量を変更できます。| |マスクと強度|影の強さです。マスクを指定すると黒く塗った部分に影が出なくなります。| |影色1・2|影の色です。テクスチャを指定して色を上書きすることもできます。影色2の透明度を上げると影の中に影を追加できます。| -|メインカラーの強度|メインカラーを乗算して影の色を強調することができます。| -|影色への環境光影響度|周囲の光が影の色に影響する強さです。| +|影範囲|影になる範囲です。| +|ぼかし|影のぼかし量です。マスクを指定すると部分的にぼかし量を変更できます。| +|ノーマルマップ強度|ノーマルマップの強さです。| |境界の色|影をぼかした際に境界に色を乗せます。| |境界の幅|境界の色を乗せる範囲を広くします。| +|AO Map|AO(陰影)テクスチャを指定すると暗い部分ほど影が出やすくなります。| +|Scale・Offset|AO Mapの倍率とオフセット量です。例えばScale=-1、Offset=1とすることでAO Mapを反転することができます。| +|コントラスト|メインカラーを乗算して影の色を強調することができます。| +|影色への環境光影響度|周囲の光が影の色に影響する強さです。| |影を受け取る|他オブジェクトから影を受け取ります。屋根がある空間で違和感が出ることがあり、オフにしたほうが良い場合が多いです。|
@@ -407,9 +411,10 @@ FakeShadowを使用する場合は以下のようにステンシル設定を変 |Offset|タイミングのずらし量です。| |角度|UVの角度です。| |帯域|サンプリングする帯域(音の高さ)です。| -|マスク|AudioLinkの処理を変更するマスクテクスチャです。(R:遅延 G:帯域 B:強度)| -|適用先|エフェクトを適用する対象です。| +|マスク|AudioLinkの処理を変更するマスクテクスチャです。
通常時: RGB=遅延/帯域/強度
Spectrum: RGB=音量/帯域/強度| |-|-| +|AudioLink無効時の初期値|AudioLink非対応のワールドでの挙動を設定します。| +|適用先|エフェクトを適用する対象です。| |ローカル化|AudioLinkからテクスチャを取得せずにローカルのテクスチャを使用します。| |ローカルマップ|ローカルのテクスチャです。| |BPM|曲のテンポです。| diff --git a/Assets/lilToon/README.md b/Assets/lilToon/README.md index 18bfecd0..f0893330 100644 --- a/Assets/lilToon/README.md +++ b/Assets/lilToon/README.md @@ -1,5 +1,5 @@ # lilToon -Version 1.2.5 +Version 1.2.6 # Overview This shader is developed for services using avatars (VRChat, etc.) and has the following features. @@ -16,10 +16,12 @@ Supported Unity versions Tested version - Unity 2017.1.0f3 - Unity 2018.4.20f1 (Built-in RP / LWRP 4.0.0 / HDRP 4.0.0) +- Unity 2019.2.0f1 (Built-in RP / LWRP 6.9.0 / HDRP 6.9.0) - Unity 2019.3.0f6 (Built-in RP / URP 7.1.8 / HDRP 7.1.8) - Unity 2019.4.31f1 (Built-in RP / URP 7.7.1 / HDRP 7.7.1) - Unity 2020.3.20f1 (Built-in RP / URP 10.6.0 / HDRP 10.6.0) -- Unity 2021.1.24f1 (Built-in RP / URP 12.0.0 / HDRP 12.0.0) +- Unity 2021.1.24f1 (Built-in RP / URP 11.0.0 / HDRP 11.0.0) +- Unity 2021.2.2f1 (Built-in RP / URP 12.1.1 / HDRP 12.1.1) Supported Shader Models - Normal: SM4.0 / ES3.0 or later @@ -30,8 +32,8 @@ Supported Shader Models Supported Rendering Pipelines - Built-in Render Pipeline - Lightweight Render Pipeline 4.0.0 - 6.9.1 -- Universal Render Pipeline 7.0.0 - 12.0.0 -- High Definition Render Pipeline 4.0.0 - 12.0.0 +- Universal Render Pipeline 7.0.0 - 12.1.1 +- High Definition Render Pipeline 4.0.0 - 12.1.1 # Features - Main color x3 layers (Decal, Layer mask, Gif animation, Normal / Additive / Multiplicative / Screen blending) diff --git a/Assets/lilToon/README_JP.md b/Assets/lilToon/README_JP.md index 3333423d..8ae23c7c 100644 --- a/Assets/lilToon/README_JP.md +++ b/Assets/lilToon/README_JP.md @@ -1,5 +1,5 @@ # lilToon -Version 1.2.5 +Version 1.2.6 # 概要 アバターを用いたサービス(VRChat等)向けに開発したシェーダーで以下のような特徴があります。 @@ -16,10 +16,12 @@ Unityバージョン 動作確認環境 - Unity 2017.1.0f3 - Unity 2018.4.20f1 (Built-in RP / LWRP 4.0.0 / HDRP 4.0.0) +- Unity 2019.2.0f1 (Built-in RP / LWRP 6.9.0 / HDRP 6.9.0) - Unity 2019.3.0f6 (Built-in RP / URP 7.1.8 / HDRP 7.1.8) - Unity 2019.4.31f1 (Built-in RP / URP 7.7.1 / HDRP 7.7.1) - Unity 2020.3.20f1 (Built-in RP / URP 10.6.0 / HDRP 10.6.0) -- Unity 2021.1.24f1 (Built-in RP / URP 12.0.0 / HDRP 12.0.0) +- Unity 2021.1.24f1 (Built-in RP / URP 11.0.0 / HDRP 11.0.0) +- Unity 2021.2.2f1 (Built-in RP / URP 12.1.1 / HDRP 12.1.1) シェーダーモデル - 通常版: SM4.0・ES3.0以降 @@ -30,8 +32,8 @@ Unityバージョン レンダリングパイプライン - Built-in Render Pipeline - Lightweight Render Pipeline 4.0.0 - 6.9.1 -- Universal Render Pipeline 7.0.0 - 11.0.0 -- High Definition Render Pipeline 4.0.0 - 11.0.0 +- Universal Render Pipeline 7.0.0 - 12.1.1 +- High Definition Render Pipeline 4.0.0 - 12.1.1 # 主な機能 - メインカラーx3レイヤー(デカール、レイヤーマスク、Gifアニメーション、通常・加算・乗算・スクリーン合成対応) diff --git a/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltsmulti.shader.txt b/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltsmulti.shader.txt index c7e48660..037010c3 100644 --- a/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltsmulti.shader.txt +++ b/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltsmulti.shader.txt @@ -93,7 +93,8 @@ Shader "#NAME#" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -134,6 +135,7 @@ Shader "#NAME#" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -145,19 +147,22 @@ Shader "#NAME#" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -177,7 +182,11 @@ Shader "#NAME#" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _SpecularBorder ("Border", Range(0, 1)) = 0.5 + _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -196,8 +205,10 @@ Shader "#NAME#" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -216,8 +227,10 @@ Shader "#NAME#" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -227,6 +240,7 @@ Shader "#NAME#" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -248,6 +262,7 @@ Shader "#NAME#" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -262,6 +277,7 @@ Shader "#NAME#" [HDR][lilHDR] _EmissionColor ("Color", Color) = (1,1,1,1) _EmissionMap ("Texture", 2D) = "white" {} [lilUVAnim] _EmissionMap_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0) + [lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 _EmissionBlend ("Blend", Range(0,1)) = 1 _EmissionBlendMask ("Mask", 2D) = "white" {} [lilUVAnim] _EmissionBlendMask_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0) @@ -297,6 +313,7 @@ Shader "#NAME#" [HDR][lilHDR] _Emission2ndColor ("Color", Color) = (1,1,1,1) _Emission2ndMap ("Texture", 2D) = "white" {} [lilUVAnim] _Emission2ndMap_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0) + [lilEnum] _Emission2ndMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0 _Emission2ndBlend ("Blend", Range(0,1)) = 1 _Emission2ndBlendMask ("Mask", 2D) = "white" {} [lilUVAnim] _Emission2ndBlendMask_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0) @@ -341,15 +358,19 @@ Shader "#NAME#" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -387,6 +408,7 @@ Shader "#NAME#" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -428,6 +450,7 @@ Shader "#NAME#" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -514,7 +537,7 @@ Shader "#NAME#" // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- // float4 input.positionOS POSITION - // float2 input.uv TEXCOORD0 + // float2 input.uv0 TEXCOORD0 // float2 input.uv1 TEXCOORD1 // float2 input.uv2 TEXCOORD2 // float2 input.uv3 TEXCOORD3 @@ -525,6 +548,7 @@ Shader "#NAME#" // float4 input.color COLOR // float3 input.normalOS NORMAL // float4 input.tangentOS TANGENT + // uint vertexID SV_VertexID //---------------------------------------------------------------------------------------------------------------------- // Vertex shader outputs or pixel shader inputs (v2f structure) @@ -535,37 +559,60 @@ Shader "#NAME#" // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- // float4 output.positionCS SV_POSITION - // float2 output.uv TEXCOORD0 - // float2 output.uv1 TEXCOORD1 + // float2 output.uv01 TEXCOORD0 TEXCOORD1 + // float2 output.uv23 TEXCOORD2 TEXCOORD3 // float3 output.positionOS object space position // float3 output.positionWS world space position - // float4 output.positionSS screen space position // float3 output.normalWS world space normal // float4 output.tangentWS world space tangent - // float3 output.bitangentWS world space bitangent //---------------------------------------------------------------------------------------------------------------------- // Variables commonly used in the forward pass // + // These are members of `lilFragData fd` + // // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- - // float3 lightDirection direction of light + // float4 col lit color + // float3 albedo unlit color + // float3 emissionColor color of emission + // -------- ----------------------- -------------------------------------------------------------------- // float3 lightColor color of light + // float3 indLightColor color of indirectional light // float3 addLightColor color of additional light // float attenuation attenuation of light + // float3 invLighting saturate((1.0 - lightColor) * sqrt(lightColor)); // -------- ----------------------- -------------------------------------------------------------------- - // float4 col lit color - // float3 albedo unlit color - // float3 reflectionColor color of reflection - // float3 emissionColor color of emission + // float2 uv0 TEXCOORD0 + // float2 uv1 TEXCOORD1 + // float2 uv2 TEXCOORD2 + // float2 uv3 TEXCOORD3 + // float2 uvMain Main UV + // float2 uvMat MatCap UV + // float2 uvRim Rim Light UV + // float2 uvPanorama Panorama UV + // float2 uvScn Screen UV + // bool isRightHand input.tangentWS.w > 0.0; // -------- ----------------------- -------------------------------------------------------------------- - // float3 normalDirection world space normal - // float3 viewDirection normalize(LIL_GET_VIEWDIR_WS(input.positionWS.xyz)); - // float3 headDirection normalize(LIL_GET_HEADDIR_WS(input.positionWS.xyz)); - // float3x3 tbnWS float3x3(input.tangentWS.xyz, input.bitangentWS, input.normalWS); - // float depth length(LIL_GET_VIEWDIR_WS(input.positionWS.xyz)); - // float3 parallaxViewDirection mul(tbnWS, viewDirection); - // float2 parallaxOffset parallaxViewDirection.xy / (parallaxViewDirection.z+0.5); + // float3 positionOS object space position + // float3 positionWS world space position + // float4 positionCS clip space position + // float4 positionSS screen space position + // float depth distance from camera + // -------- ----------------------- -------------------------------------------------------------------- + // float3x3 TBN tangent / bitangent / normal matrix + // float3 T tangent direction + // float3 B bitangent direction + // float3 N normal direction + // float3 V view direction + // float3 L light direction + // float3 origN normal direction without normal map + // float3 origL light direction without sh light + // float3 headV middle view direction of 2 cameras + // float3 reflectionN normal direction for reflection + // float3 matcapN normal direction for reflection for MatCap + // float3 matcap2ndN normal direction for reflection for MatCap 2nd + // float facing VFACE // -------- ----------------------- -------------------------------------------------------------------- // float vl dot(viewDirection, lightDirection); // float hl dot(headDirection, lightDirection); @@ -573,25 +620,19 @@ Shader "#NAME#" // float nv saturate(dot(normalDirection, viewDirection)); // float nvabs abs(dot(normalDirection, viewDirection)); // -------- ----------------------- -------------------------------------------------------------------- - // bool isRightHand input.tangentWS.w > 0.0; + // float4 triMask TriMask (for lite version) + // float3 parallaxViewDirection mul(tbnWS, viewDirection); + // float2 parallaxOffset parallaxViewDirection.xy / (parallaxViewDirection.z+0.5); + // float anisotropy strength of anisotropy + // float smoothness smoothness + // float roughness roughness + // float perceptualRoughness perceptual roughness // float shadowmix this variable is 0 in the shadow area // float audioLinkValue volume acquired by AudioLink - // float3 invLighting saturate((1.0 - lightColor) * sqrt(lightColor)); - - //---------------------------------------------------------------------------------------------------------------------- - // Variables commonly used in the meta pass - // - // Type Name Description - // -------- ----------------------- -------------------------------------------------------------------- - // float4 col color - // float3 emissionColor color of emission - - //---------------------------------------------------------------------------------------------------------------------- - // Variables commonly used in other passes - // - // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- - // float4 col color (use only col.a) + // uint renderingLayers light layer of object (for URP / HDRP) + // uint featureFlags feature flags (for HDRP) + // uint2 tileIndex tile index (for HDRP) //---------------------------------------------------------------------------------------------------------------------- // Multi compile macro @@ -646,6 +687,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -732,6 +774,7 @@ Shader "#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -801,6 +844,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -970,6 +1014,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1061,6 +1106,7 @@ Shader "#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1160,6 +1206,7 @@ Shader "#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -1252,6 +1299,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1342,6 +1390,7 @@ Shader "#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1439,6 +1488,7 @@ Shader "#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -1535,6 +1585,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1634,6 +1685,7 @@ Shader "#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1736,6 +1788,7 @@ Shader "#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -1774,6 +1827,7 @@ Shader "#NAME#" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -1823,6 +1877,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1907,6 +1962,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -2005,6 +2061,7 @@ Shader "#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -2105,6 +2162,7 @@ Shader "#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -2142,6 +2200,7 @@ Shader "#NAME#" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -2190,6 +2249,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -2279,6 +2339,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -2371,6 +2432,7 @@ Shader "#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -2487,6 +2549,7 @@ Shader "#NAME#" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -2547,6 +2610,7 @@ Shader "#NAME#" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltspass_opaque.shader.txt b/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltspass_opaque.shader.txt index 7d38e888..95b3e3dc 100644 --- a/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltspass_opaque.shader.txt +++ b/Assets/lilToon/ScriptTemplates/99-lilToon__Custom Pass Shader-custom_ltspass_opaque.shader.txt @@ -65,7 +65,7 @@ Shader "Hidden/#NAME#" // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- // float4 input.positionOS POSITION - // float2 input.uv TEXCOORD0 + // float2 input.uv0 TEXCOORD0 // float2 input.uv1 TEXCOORD1 // float2 input.uv2 TEXCOORD2 // float2 input.uv3 TEXCOORD3 @@ -76,6 +76,7 @@ Shader "Hidden/#NAME#" // float4 input.color COLOR // float3 input.normalOS NORMAL // float4 input.tangentOS TANGENT + // uint vertexID SV_VertexID //---------------------------------------------------------------------------------------------------------------------- // Vertex shader outputs or pixel shader inputs (v2f structure) @@ -86,37 +87,60 @@ Shader "Hidden/#NAME#" // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- // float4 output.positionCS SV_POSITION - // float2 output.uv TEXCOORD0 - // float2 output.uv1 TEXCOORD1 + // float2 output.uv01 TEXCOORD0 TEXCOORD1 + // float2 output.uv23 TEXCOORD2 TEXCOORD3 // float3 output.positionOS object space position // float3 output.positionWS world space position - // float4 output.positionSS screen space position // float3 output.normalWS world space normal // float4 output.tangentWS world space tangent - // float3 output.bitangentWS world space bitangent //---------------------------------------------------------------------------------------------------------------------- // Variables commonly used in the forward pass // + // These are members of `lilFragData fd` + // // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- - // float3 lightDirection direction of light + // float4 col lit color + // float3 albedo unlit color + // float3 emissionColor color of emission + // -------- ----------------------- -------------------------------------------------------------------- // float3 lightColor color of light + // float3 indLightColor color of indirectional light // float3 addLightColor color of additional light // float attenuation attenuation of light + // float3 invLighting saturate((1.0 - lightColor) * sqrt(lightColor)); // -------- ----------------------- -------------------------------------------------------------------- - // float4 col lit color - // float3 albedo unlit color - // float3 reflectionColor color of reflection - // float3 emissionColor color of emission + // float2 uv0 TEXCOORD0 + // float2 uv1 TEXCOORD1 + // float2 uv2 TEXCOORD2 + // float2 uv3 TEXCOORD3 + // float2 uvMain Main UV + // float2 uvMat MatCap UV + // float2 uvRim Rim Light UV + // float2 uvPanorama Panorama UV + // float2 uvScn Screen UV + // bool isRightHand input.tangentWS.w > 0.0; // -------- ----------------------- -------------------------------------------------------------------- - // float3 normalDirection world space normal - // float3 viewDirection normalize(LIL_GET_VIEWDIR_WS(input.positionWS.xyz)); - // float3 headDirection normalize(LIL_GET_HEADDIR_WS(input.positionWS.xyz)); - // float3x3 tbnWS float3x3(input.tangentWS.xyz, input.bitangentWS, input.normalWS); - // float depth length(LIL_GET_VIEWDIR_WS(input.positionWS.xyz)); - // float3 parallaxViewDirection mul(tbnWS, viewDirection); - // float2 parallaxOffset parallaxViewDirection.xy / (parallaxViewDirection.z+0.5); + // float3 positionOS object space position + // float3 positionWS world space position + // float4 positionCS clip space position + // float4 positionSS screen space position + // float depth distance from camera + // -------- ----------------------- -------------------------------------------------------------------- + // float3x3 TBN tangent / bitangent / normal matrix + // float3 T tangent direction + // float3 B bitangent direction + // float3 N normal direction + // float3 V view direction + // float3 L light direction + // float3 origN normal direction without normal map + // float3 origL light direction without sh light + // float3 headV middle view direction of 2 cameras + // float3 reflectionN normal direction for reflection + // float3 matcapN normal direction for reflection for MatCap + // float3 matcap2ndN normal direction for reflection for MatCap 2nd + // float facing VFACE // -------- ----------------------- -------------------------------------------------------------------- // float vl dot(viewDirection, lightDirection); // float hl dot(headDirection, lightDirection); @@ -124,25 +148,19 @@ Shader "Hidden/#NAME#" // float nv saturate(dot(normalDirection, viewDirection)); // float nvabs abs(dot(normalDirection, viewDirection)); // -------- ----------------------- -------------------------------------------------------------------- - // bool isRightHand input.tangentWS.w > 0.0; + // float4 triMask TriMask (for lite version) + // float3 parallaxViewDirection mul(tbnWS, viewDirection); + // float2 parallaxOffset parallaxViewDirection.xy / (parallaxViewDirection.z+0.5); + // float anisotropy strength of anisotropy + // float smoothness smoothness + // float roughness roughness + // float perceptualRoughness perceptual roughness // float shadowmix this variable is 0 in the shadow area // float audioLinkValue volume acquired by AudioLink - // float3 invLighting saturate((1.0 - lightColor) * sqrt(lightColor)); - - //---------------------------------------------------------------------------------------------------------------------- - // Variables commonly used in the meta pass - // - // Type Name Description - // -------- ----------------------- -------------------------------------------------------------------- - // float4 col color - // float3 emissionColor color of emission - - //---------------------------------------------------------------------------------------------------------------------- - // Variables commonly used in other passes - // - // Type Name Description // -------- ----------------------- -------------------------------------------------------------------- - // float4 col color (use only col.a) + // uint renderingLayers light layer of object (for URP / HDRP) + // uint featureFlags feature flags (for HDRP) + // uint2 tileIndex tile index (for HDRP) ENDHLSL //---------------------------------------------------------------------------------------------------------------------- @@ -171,6 +189,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -221,6 +240,7 @@ Shader "Hidden/#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -269,6 +289,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -384,6 +405,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -437,6 +459,7 @@ Shader "Hidden/#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -504,6 +527,7 @@ Shader "Hidden/#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -575,6 +599,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -627,6 +652,7 @@ Shader "Hidden/#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -692,6 +718,7 @@ Shader "Hidden/#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -768,6 +795,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -829,6 +857,7 @@ Shader "Hidden/#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -899,6 +928,7 @@ Shader "Hidden/#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -926,6 +956,7 @@ Shader "Hidden/#NAME#" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -964,6 +995,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1038,6 +1070,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1098,6 +1131,7 @@ Shader "Hidden/#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1166,6 +1200,7 @@ Shader "Hidden/#NAME#" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -1192,6 +1227,7 @@ Shader "Hidden/#NAME#" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] HLSLPROGRAM @@ -1229,6 +1265,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1308,6 +1345,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1362,6 +1400,7 @@ Shader "Hidden/#NAME#" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1446,6 +1485,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1492,6 +1532,7 @@ Shader "Hidden/#NAME#" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1538,6 +1579,7 @@ Shader "Hidden/#NAME#" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1581,6 +1623,7 @@ Shader "Hidden/#NAME#" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/Includes/lil_common.hlsl b/Assets/lilToon/Shader/Includes/lil_common.hlsl index 9420bb09..36c431c9 100644 --- a/Assets/lilToon/Shader/Includes/lil_common.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common.hlsl @@ -92,6 +92,7 @@ struct lilFragData float3 N; float3 V; float3 L; + float3 origN; float3 origL; float3 headV; float3 reflectionN; @@ -163,6 +164,7 @@ lilFragData lilInitFragData() fd.N = 0.0; fd.V = 0.0; fd.L = float3(0.0, 1.0, 0.0); + fd.origN = 0.0; fd.origL = float3(0.0, 1.0, 0.0); fd.headV = 0.0; fd.reflectionN = 0.0; diff --git a/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl b/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl index e03c4648..ea385481 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl @@ -159,6 +159,12 @@ #define LIL_UNPACK_TEXCOORD3(i,o) #endif +#if defined(LIL_V2F_UVMAT) + #define LIL_UNPACK_TEXCOORD_MAT(i,o) o.uvMat = i.uvMat; +#else + #define LIL_UNPACK_TEXCOORD_MAT(i,o) +#endif + #if defined(LIL_V2F_POSITION_OS) #define LIL_UNPACK_POSITION_OS(i,o) o.positionOS = i.positionOS; #else @@ -172,10 +178,17 @@ #endif #if defined(LIL_V2F_POSITION_CS) + #if defined(UNITY_SINGLE_PASS_STEREO) + #define LIL_SCREEN_UV_STEREO_FIX(i,o) o.uvScn.x *= 0.5; + #else + #define LIL_SCREEN_UV_STEREO_FIX(i,o) + #endif + #define LIL_UNPACK_POSITION_CS(i,o) \ o.positionCS = i.positionCS; \ o.positionSS = lilTransformCStoSSFrag(i.positionCS); \ - o.uvScn = i.positionCS.xy / _ScreenParams.xy; + o.uvScn = i.positionCS.xy / _ScreenParams.xy; \ + LIL_SCREEN_UV_STEREO_FIX(i,o) #else #define LIL_UNPACK_POSITION_CS(i,o) #endif @@ -198,16 +211,24 @@ #define LIL_UNPACK_LIGHT_DIRECTION(i,o) #endif +#if defined(LIL_V2F_INDLIGHTCOLOR) + #define LIL_UNPACK_INDLIGHTCOLOR(i,o) LIL_GET_INDLIGHTCOLOR(i,o) +#else + #define LIL_UNPACK_INDLIGHTCOLOR(i,o) +#endif + #define OVERRIDE_UNPACK_V2F \ LIL_UNPACK_TEXCOORD0(input,fd); \ LIL_UNPACK_TEXCOORD1(input,fd); \ LIL_UNPACK_TEXCOORD2(input,fd); \ LIL_UNPACK_TEXCOORD3(input,fd); \ + LIL_UNPACK_TEXCOORD_MAT(input,fd); \ LIL_UNPACK_POSITION_OS(input,fd); \ LIL_UNPACK_POSITION_WS(input,fd); \ LIL_UNPACK_POSITION_CS(input,fd); \ LIL_UNPACK_POSITION_SS(input,fd); \ - LIL_UNPACK_LIGHT_DIRECTION(input,fd); + LIL_UNPACK_LIGHT_DIRECTION(input,fd); \ + LIL_UNPACK_INDLIGHTCOLOR(input,fd); //------------------------------------------------------------------------------------------------------------------------------ // UV Animation @@ -369,7 +390,7 @@ if(_AlphaMaskMode) \ { \ float alphaMask = LIL_SAMPLE_2D(_AlphaMask, sampler_MainTex, fd.uvMain).r; \ - alphaMask = saturate(alphaMask + _AlphaMaskValue); \ + alphaMask = saturate(alphaMask * _AlphaMaskScale + _AlphaMaskValue); \ fd.col.a = _AlphaMaskMode == 1 ? alphaMask : fd.col.a * alphaMask; \ } #endif @@ -429,7 +450,7 @@ { \ float4 normal2ndTex = LIL_SAMPLE_2D_ST(_Bump2ndMap, sampler_MainTex, fd.uvMain); \ float bump2ndScale = _Bump2ndScale; \ - if(Exists_Bump2ndScaleMask) bump2ndScale *= LIL_SAMPLE_2D(_Bump2ndScaleMask, sampler_MainTex, fd.uvMain).r; \ + if(Exists_Bump2ndScaleMask) bump2ndScale *= LIL_SAMPLE_2D_ST(_Bump2ndScaleMask, sampler_MainTex, fd.uvMain).r; \ normalmap = lilBlendNormal(normalmap, UnpackNormalScale(normal2ndTex, bump2ndScale)); \ } #endif @@ -446,7 +467,7 @@ fd.T = lilOrthoNormalize(normalize(mul(anisoTangent, fd.TBN)), fd.N); \ fd.B = cross(fd.N, fd.T); \ fd.anisotropy = _AnisotropyScale; \ - fd.anisotropy *= LIL_SAMPLE_2D(_AnisotropyScaleMask, sampler_MainTex, fd.uvMain).r; \ + fd.anisotropy *= LIL_SAMPLE_2D_ST(_AnisotropyScaleMask, sampler_MainTex, fd.uvMain).r; \ float3 anisoNormalWS = lilGetAnisotropyNormalWS(fd.N, fd.T, fd.B, fd.V, fd.anisotropy); \ if(_Anisotropy2Reflection) fd.reflectionN = anisoNormalWS; \ if(_Anisotropy2MatCap) fd.matcapN = anisoNormalWS; \ @@ -462,19 +483,33 @@ { if(_UseAudioLink) { - fd.audioLinkValue = 0.0; - float4 audioLinkMask = 1.0; + // UV float2 audioLinkUV; if(_AudioLinkUVMode == 0) audioLinkUV.x = _AudioLinkUVParams.g; if(_AudioLinkUVMode == 1) audioLinkUV.x = _AudioLinkUVParams.r - fd.nv * _AudioLinkUVParams.r + _AudioLinkUVParams.g; if(_AudioLinkUVMode == 2) audioLinkUV.x = lilRotateUV(fd.uv0, _AudioLinkUVParams.b).x * _AudioLinkUVParams.r + _AudioLinkUVParams.g; + if(_AudioLinkUVMode == 5) audioLinkUV.x = distance(fd.positionOS, _AudioLinkStart.xyz) * _AudioLinkUVParams.r + _AudioLinkUVParams.g; audioLinkUV.y = _AudioLinkUVParams.a; // Mask (R:Delay G:Band B:Strength) - if(_AudioLinkUVMode == 3 && Exists_AudioLinkMask) + // Spectrum Mask (R:Volume G:Band B:Strength) + float4 audioLinkMask = 1.0; + if((_AudioLinkUVMode == 3 || _AudioLinkUVMode == 4) && Exists_AudioLinkMask) { audioLinkMask = LIL_SAMPLE_2D(_AudioLinkMask, samp, fd.uvMain); - audioLinkUV = audioLinkMask.rg; + audioLinkUV = _AudioLinkUVMode == 3 ? audioLinkMask.rg : float2(frac(audioLinkMask.g * 2.0), 4.5/4.0 + floor(audioLinkMask.g * 2.0)/4.0); + } + + // Init value + if(_AudioLinkUVMode == 4) + { + float defaultY = audioLinkMask.r * 4.0 + _AudioLinkDefaultValue.w; + float defaultVal = sin(LIL_TIME * _AudioLinkDefaultValue.z - audioLinkMask.g * _AudioLinkDefaultValue.y) * _AudioLinkDefaultValue.x * _AudioLinkUVParams.x + _AudioLinkDefaultValue.x * _AudioLinkUVParams.x; + fd.audioLinkValue = _AudioLinkUVParams.w < 1.0 ? abs(defaultVal - defaultY) < _AudioLinkUVParams.w : defaultVal > defaultY; + } + else + { + fd.audioLinkValue = saturate(_AudioLinkDefaultValue.x - saturate(frac(LIL_TIME * _AudioLinkDefaultValue.z - audioLinkUV.x)+_AudioLinkDefaultValue.w) * _AudioLinkDefaultValue.y * _AudioLinkDefaultValue.x); } // Local @@ -486,12 +521,22 @@ } else #endif + // Global if(lilCheckAudioLink()) { // Scaling for _AudioTexture (4/64) audioLinkUV.y *= 0.0625; - fd.audioLinkValue = LIL_SAMPLE_2D(_AudioTexture, sampler_linear_clamp, audioLinkUV).r; + float4 audioTexture = LIL_SAMPLE_2D(_AudioTexture, sampler_linear_clamp, audioLinkUV); + if(_AudioLinkUVMode == 4) + { + float audioVal = audioTexture.b * _AudioLinkUVParams.x * lerp(_AudioLinkUVParams.y, _AudioLinkUVParams.z, audioLinkMask.g); + fd.audioLinkValue = _AudioLinkUVParams.w < 1.0 ? abs(audioVal - audioLinkMask.r) < _AudioLinkUVParams.w : audioVal > audioLinkMask.r; + } + else + { + fd.audioLinkValue = audioTexture.r; + } fd.audioLinkValue = saturate(fd.audioLinkValue); } fd.audioLinkValue *= audioLinkMask.b; @@ -643,131 +688,143 @@ //------------------------------------------------------------------------------------------------------------------------------ // Shadow #if defined(LIL_FEATURE_SHADOW) && !defined(LIL_LITE) && !defined(LIL_GEM) -void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) -{ - LIL_BRANCH - if(_UseShadow) + void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) { - // Shade - float ln1 = saturate(fd.ln*0.5+0.5); - if(Exists_ShadowBorderMask) ln1 *= LIL_SAMPLE_2D(_ShadowBorderMask, samp, fd.uvMain).r; - float ln2 = ln1; - float lnB = ln1; - - // Shadow - #if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW) - float shadowAttenuation = saturate(fd.attenuation + distance(fd.L, fd.origL)); - if(_ShadowReceive) ln1 *= shadowAttenuation; - if(_ShadowReceive) lnB *= shadowAttenuation; - #endif + LIL_BRANCH + if(_UseShadow) + { + // Normal + float3 N1 = fd.N; + float3 N2 = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N1 = lerp(fd.origN, fd.N, _ShadowNormalStrength); + N2 = lerp(fd.origN, fd.N, _Shadow2ndNormalStrength); + #endif - // Toon - float shadowBlur = _ShadowBlur; - if(Exists_ShadowBlurMask) shadowBlur *= LIL_SAMPLE_2D(_ShadowBlurMask, samp, fd.uvMain).r; - ln1 = lilTooning(ln1, _ShadowBorder, shadowBlur); - ln2 = lilTooning(ln2, _Shadow2ndBorder, _Shadow2ndBlur); - lnB = lilTooning(lnB, _ShadowBorder, shadowBlur, _ShadowBorderRange); - - // Force shadow on back face - float bfshadow = (fd.facing < 0.0) ? 1.0 - _BackfaceForceShadow : 1.0; - ln1 *= bfshadow; - ln2 *= bfshadow; - lnB *= bfshadow; - - // Copy - fd.shadowmix = ln1; - - // Strength - float shadowStrength = _ShadowStrength; - #ifdef LIL_COLORSPACE_GAMMA - shadowStrength = lilSRGBToLinear(shadowStrength); - #endif - if(Exists_ShadowStrengthMask) shadowStrength *= LIL_SAMPLE_2D(_ShadowStrengthMask, samp, fd.uvMain).r; - ln1 = lerp(1.0, ln1, shadowStrength); - - // Shadow Color 1 - float4 shadowColorTex = 0.0; - if(Exists_ShadowColorTex) shadowColorTex = LIL_SAMPLE_2D(_ShadowColorTex, samp, fd.uvMain); - float3 indirectCol = lerp(fd.albedo, shadowColorTex.rgb, shadowColorTex.a) * _ShadowColor.rgb; - // Shadow Color 2 - float4 shadow2ndColorTex = 0.0; - if(Exists_Shadow2ndColorTex) shadow2ndColorTex = LIL_SAMPLE_2D(_Shadow2ndColorTex, samp, fd.uvMain); - shadow2ndColorTex.rgb = lerp(fd.albedo, shadow2ndColorTex.rgb, shadow2ndColorTex.a) * _Shadow2ndColor.rgb; - ln2 = _Shadow2ndColor.a - ln2 * _Shadow2ndColor.a; - indirectCol = lerp(indirectCol, shadow2ndColorTex.rgb, ln2); - // Multiply Main Color - indirectCol = lerp(indirectCol, indirectCol*fd.albedo, _ShadowMainStrength); - - // Apply Light - float3 directCol = fd.albedo * fd.lightColor; - indirectCol = indirectCol * fd.lightColor; - - // Environment Light - indirectCol = lerp(indirectCol, fd.albedo, fd.indLightColor); - // Fix - indirectCol = min(indirectCol, directCol); - // Gradation - indirectCol = lerp(indirectCol, directCol, lnB * _ShadowBorderColor.rgb); - - // Mix - fd.col.rgb = lerp(indirectCol, directCol, ln1); - } - else - { - fd.col.rgb *= fd.lightColor; + // Shade + float ln1 = saturate(dot(fd.L,N1)*0.5+0.5); + float ln2 = saturate(dot(fd.L,N2)*0.5+0.5); + if(Exists_ShadowBorderMask) + { + float4 shadowBorderMask = LIL_SAMPLE_2D(_ShadowBorderMask, samp, fd.uvMain); + ln1 *= saturate(shadowBorderMask.r * _ShadowAOShift.x + _ShadowAOShift.y); + ln2 *= saturate(shadowBorderMask.g * _ShadowAOShift.z + _ShadowAOShift.w); + } + + // Shadow + #if (defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK)) && defined(LIL_FEATURE_RECEIVE_SHADOW) + if(_ShadowReceive) ln1 *= saturate(fd.attenuation + distance(fd.L, fd.origL)); + #endif + + float lnB = ln1; + + // Toon + float shadowBlur = _ShadowBlur; + if(Exists_ShadowBlurMask) shadowBlur *= LIL_SAMPLE_2D(_ShadowBlurMask, samp, fd.uvMain).r; + ln1 = lilTooning(ln1, _ShadowBorder, shadowBlur); + ln2 = lilTooning(ln2, _Shadow2ndBorder, _Shadow2ndBlur); + lnB = lilTooning(lnB, _ShadowBorder, shadowBlur, _ShadowBorderRange); + + // Force shadow on back face + float bfshadow = (fd.facing < 0.0) ? 1.0 - _BackfaceForceShadow : 1.0; + ln1 *= bfshadow; + ln2 *= bfshadow; + lnB *= bfshadow; + + // Copy + fd.shadowmix = ln1; + + // Strength + float shadowStrength = _ShadowStrength; + #ifdef LIL_COLORSPACE_GAMMA + shadowStrength = lilSRGBToLinear(shadowStrength); + #endif + if(Exists_ShadowStrengthMask) shadowStrength *= LIL_SAMPLE_2D(_ShadowStrengthMask, samp, fd.uvMain).r; + ln1 = lerp(1.0, ln1, shadowStrength); + + // Shadow Color 1 + float4 shadowColorTex = 0.0; + if(Exists_ShadowColorTex) shadowColorTex = LIL_SAMPLE_2D(_ShadowColorTex, samp, fd.uvMain); + float3 indirectCol = lerp(fd.albedo, shadowColorTex.rgb, shadowColorTex.a) * _ShadowColor.rgb; + // Shadow Color 2 + float4 shadow2ndColorTex = 0.0; + if(Exists_Shadow2ndColorTex) shadow2ndColorTex = LIL_SAMPLE_2D(_Shadow2ndColorTex, samp, fd.uvMain); + shadow2ndColorTex.rgb = lerp(fd.albedo, shadow2ndColorTex.rgb, shadow2ndColorTex.a) * _Shadow2ndColor.rgb; + ln2 = _Shadow2ndColor.a - ln2 * _Shadow2ndColor.a; + indirectCol = lerp(indirectCol, shadow2ndColorTex.rgb, ln2); + // Multiply Main Color + indirectCol = lerp(indirectCol, indirectCol*fd.albedo, _ShadowMainStrength); + + // Apply Light + float3 directCol = fd.albedo * fd.lightColor; + indirectCol = indirectCol * fd.lightColor; + + // Environment Light + indirectCol = lerp(indirectCol, fd.albedo, fd.indLightColor); + // Fix + indirectCol = min(indirectCol, directCol); + // Gradation + indirectCol = lerp(indirectCol, directCol, lnB * _ShadowBorderColor.rgb); + + // Mix + fd.col.rgb = lerp(indirectCol, directCol, ln1); + } + else + { + fd.col.rgb *= fd.lightColor; + } } -} #elif defined(LIL_LITE) -void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) -{ - LIL_BRANCH - if(_UseShadow) + void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) { - // Shade - float ln1 = saturate(fd.ln*0.5+0.5); - float ln2 = ln1; - float lnB = ln1; + LIL_BRANCH + if(_UseShadow) + { + // Shade + float ln1 = saturate(fd.ln*0.5+0.5); + float ln2 = ln1; + float lnB = ln1; + + // Toon + ln1 = lilTooning(ln1, _ShadowBorder, _ShadowBlur); + ln2 = lilTooning(ln2, _Shadow2ndBorder, _Shadow2ndBlur); + lnB = lilTooning(lnB, _ShadowBorder, _ShadowBlur, _ShadowBorderRange); + + // Force shadow on back face + float bfshadow = (fd.facing < 0.0) ? 1.0 - _BackfaceForceShadow : 1.0; + ln1 *= bfshadow; + ln2 *= bfshadow; + lnB *= bfshadow; + + // Copy + fd.shadowmix = ln1; + + // Shadow Color 1 + float4 shadowColorTex = LIL_SAMPLE_2D(_ShadowColorTex, samp, fd.uvMain); + float3 indirectCol = lerp(fd.albedo, shadowColorTex.rgb, shadowColorTex.a); + // Shadow Color 2 + float4 shadow2ndColorTex = LIL_SAMPLE_2D(_Shadow2ndColorTex, samp, fd.uvMain); + indirectCol = lerp(indirectCol, shadow2ndColorTex.rgb, shadow2ndColorTex.a - ln2 * shadow2ndColorTex.a); + + // Apply Light + float3 directCol = fd.albedo * fd.lightColor; + indirectCol = indirectCol * fd.lightColor; + + // Environment Light + indirectCol = lerp(indirectCol, fd.albedo, fd.indLightColor); + // Fix + indirectCol = min(indirectCol, directCol); + // Gradation + indirectCol = lerp(indirectCol, directCol, lnB * _ShadowBorderColor.rgb); - // Toon - ln1 = lilTooning(ln1, _ShadowBorder, _ShadowBlur); - ln2 = lilTooning(ln2, _Shadow2ndBorder, _Shadow2ndBlur); - lnB = lilTooning(lnB, _ShadowBorder, _ShadowBlur, _ShadowBorderRange); - - // Force shadow on back face - float bfshadow = (fd.facing < 0.0) ? 1.0 - _BackfaceForceShadow : 1.0; - ln1 *= bfshadow; - ln2 *= bfshadow; - lnB *= bfshadow; - - // Copy - fd.shadowmix = ln1; - - // Shadow Color 1 - float4 shadowColorTex = LIL_SAMPLE_2D(_ShadowColorTex, samp, fd.uvMain); - float3 indirectCol = lerp(fd.albedo, shadowColorTex.rgb, shadowColorTex.a); - // Shadow Color 2 - float4 shadow2ndColorTex = LIL_SAMPLE_2D(_Shadow2ndColorTex, samp, fd.uvMain); - indirectCol = lerp(indirectCol, shadow2ndColorTex.rgb, shadow2ndColorTex.a - ln2 * shadow2ndColorTex.a); - - // Apply Light - float3 directCol = fd.albedo * fd.lightColor; - indirectCol = indirectCol * fd.lightColor; - - // Environment Light - indirectCol = lerp(indirectCol, fd.albedo, fd.indLightColor); - // Fix - indirectCol = min(indirectCol, directCol); - // Gradation - indirectCol = lerp(indirectCol, directCol, lnB * _ShadowBorderColor.rgb); - - // Mix - fd.col.rgb = lerp(indirectCol, directCol, ln1); - } - else - { - fd.col.rgb *= fd.lightColor; + // Mix + fd.col.rgb = lerp(indirectCol, directCol, ln1); + } + else + { + fd.col.rgb *= fd.lightColor; + } } -} #endif #if !defined(OVERRIDE_SHADOW) @@ -782,15 +839,26 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) { if(_UseBacklight) { - float3 backlightColor = LIL_SAMPLE_2D(_BacklightColorTex, samp, fd.uvMain).rgb * _BacklightColor.rgb; + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _BacklightNormalStrength); + #endif + + // Color + float3 backlightColor = LIL_SAMPLE_2D_ST(_BacklightColorTex, samp, fd.uvMain).rgb * _BacklightColor.rgb; + + // Factor float backlightFactor = pow(saturate(-fd.hl * 0.5 + 0.5), _BacklightDirectivity); - float backlightLN = dot(normalize(-fd.headV * _BacklightViewStrength + fd.L), fd.N) * 0.5 + 0.5; + float backlightLN = dot(normalize(-fd.headV * _BacklightViewStrength + fd.L), N) * 0.5 + 0.5; #if defined(LIL_USE_SHADOW) || defined(LIL_LIGHTMODE_SHADOWMASK) if(_BacklightReceiveShadow) backlightLN *= saturate(fd.attenuation + distance(fd.L, fd.origL)); #endif backlightLN = lilTooning(backlightLN, _BacklightBorder, _BacklightBlur); float backlight = saturate(backlightFactor * backlightLN); backlight = fd.facing < (_BacklightBackfaceMask-1.0) ? 0.0 : backlight; + + // Blend fd.col.rgb += backlight * backlightColor * fd.lightColor; } } @@ -849,20 +917,31 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) #if defined(LIL_FEATURE_REFLECTION) && defined(LIL_PASS_FORWARD_NORMAL_INCLUDED) && !defined(LIL_LITE) && !defined(LIL_FUR) float3 lilCalcSpecular(inout lilFragData fd, float3 L, float3 specular, float attenuation LIL_SAMP_IN_FUNC(samp)) { + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _SpecularNormalStrength); + #endif + + // Half direction float3 H = normalize(fd.V + L); - float nh = saturate(dot(fd.N, H)); + float nh = saturate(dot(N, H)); + + // Toon #if defined(LIL_FEATURE_ANISOTROPY) - bool isAnisotropy = _UseAnisotropy && _Anisotropy2Reflection; + bool isAnisotropy = _UseAnisotropy && _Anisotropy2Reflection; if(_SpecularToon & !isAnisotropy) #else if(_SpecularToon) #endif return lilTooning(pow(nh,1.0/fd.roughness), _SpecularBorder, _SpecularBlur); - float nv = saturate(dot(fd.N, fd.V)); - float nl = saturate(dot(fd.N, L)); + // Dot + float nv = saturate(dot(N, fd.V)); + float nl = saturate(dot(N, L)); float lh = saturate(dot(L, H)); + // GGX float ggx, sjggx = 0.0; float lambdaV = 0.0; float lambdaL = 0.0; @@ -890,10 +969,10 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) float anisotropyShiftNoise = LIL_SAMPLE_2D_ST(_AnisotropyShiftNoiseMask, samp, fd.uvMain).r - 0.5; float anisotropyShift = anisotropyShiftNoise * _AnisotropyShiftNoiseScale + _AnisotropyShift; float anisotropy2ndShift = anisotropyShiftNoise * _Anisotropy2ndShiftNoiseScale + _Anisotropy2ndShift; - float3 T1 = normalize(fd.T - fd.N * anisotropyShift); - float3 B1 = normalize(fd.B - fd.N * anisotropyShift); - float3 T2 = normalize(fd.T - fd.N * anisotropy2ndShift); - float3 B2 = normalize(fd.B - fd.N * anisotropy2ndShift); + float3 T1 = normalize(fd.T - N * anisotropyShift); + float3 B1 = normalize(fd.B - N * anisotropyShift); + float3 T2 = normalize(fd.T - N * anisotropy2ndShift); + float3 B2 = normalize(fd.B - N * anisotropy2ndShift); float th1 = dot(T1, H); float bh1 = dot(B1, H); @@ -931,6 +1010,8 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) specularTerm = sqrt(max(1e-4h, specularTerm)); #endif specularTerm *= nl * attenuation; + + // Output #if defined(LIL_FEATURE_ANISOTROPY) if(_SpecularToon) return lilTooning(specularTerm, 0.5); #endif @@ -951,13 +1032,13 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) // Smoothness #if !defined(LIL_REFRACTION_BLUR2) || defined(LIL_PASS_FORWARDADD) fd.smoothness = _Smoothness; - if(Exists_SmoothnessTex) fd.smoothness *= LIL_SAMPLE_2D(_SmoothnessTex, samp, fd.uvMain).r; + if(Exists_SmoothnessTex) fd.smoothness *= LIL_SAMPLE_2D_ST(_SmoothnessTex, samp, fd.uvMain).r; fd.perceptualRoughness = fd.perceptualRoughness - fd.smoothness * fd.perceptualRoughness; fd.roughness = fd.perceptualRoughness * fd.perceptualRoughness; #endif // Metallic float metallic = _Metallic; - if(Exists_MetallicGlossMap) metallic *= LIL_SAMPLE_2D(_MetallicGlossMap, samp, fd.uvMain).r; + if(Exists_MetallicGlossMap) metallic *= LIL_SAMPLE_2D_ST(_MetallicGlossMap, samp, fd.uvMain).r; fd.col.rgb = fd.col.rgb - metallic * fd.col.rgb; float3 specular = lerp(_Reflectance, fd.albedo, metallic); // Specular @@ -986,7 +1067,12 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) LIL_BRANCH if(_ApplyReflection) { - float3 envReflectionColor = LIL_GET_ENVIRONMENT_REFLECTION(fd.V, fd.reflectionN, fd.perceptualRoughness, fd.positionWS); + float3 N = fd.reflectionN; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.reflectionN, _ReflectionNormalStrength); + #endif + + float3 envReflectionColor = LIL_GET_ENVIRONMENT_REFLECTION(fd.V, N, fd.perceptualRoughness, fd.positionWS); float oneMinusReflectivity = LIL_DIELECTRIC_SPECULAR.a - metallic * LIL_DIELECTRIC_SPECULAR.a; float grazingTerm = saturate(fd.smoothness + (1.0-oneMinusReflectivity)); @@ -1007,7 +1093,7 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) #endif // Mix float4 reflectionColor = _ReflectionColor; - if(Exists_ReflectionColorTex) reflectionColor *= LIL_SAMPLE_2D(_ReflectionColorTex, samp, fd.uvMain); + if(Exists_ReflectionColorTex) reflectionColor *= LIL_SAMPLE_2D_ST(_ReflectionColorTex, samp, fd.uvMain); #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) if(_ReflectionApplyTransparency) reflectionColor.a *= fd.col.a; #endif @@ -1029,21 +1115,28 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) LIL_BRANCH if(_UseMatCap) { - float2 matUV = float2(0,0); - float3 matcapNormalDirection = fd.matcapN; + // Normal + float3 N = fd.matcapN; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.matcapN, _MatCapNormalStrength); + #endif #if defined(LIL_FEATURE_TEX_MATCAP_NORMALMAP) LIL_BRANCH if(_MatCapCustomNormal) { float4 normalTex = LIL_SAMPLE_2D_ST(_MatCapBumpMap, samp, fd.uvMain); float3 normalmap = UnpackNormalScale(normalTex, _MatCapBumpScale); - matcapNormalDirection = normalize(mul(normalmap, fd.TBN)); - matcapNormalDirection = fd.facing < (_FlipNormal-1.0) ? -matcapNormalDirection : matcapNormalDirection; + N = normalize(mul(normalmap, fd.TBN)); + N = fd.facing < (_FlipNormal-1.0) ? -N : N; } #endif - matUV = lilCalcMatCapUV(fd.uv1, matcapNormalDirection, fd.V, fd.headV, _MatCapTex_ST, _MatCapBlendUV1.xy, _MatCapZRotCancel, _MatCapPerspective, _MatCapVRParallaxStrength); + + // UV + float2 matUV = lilCalcMatCapUV(fd.uv1, N, fd.V, fd.headV, _MatCapTex_ST, _MatCapBlendUV1.xy, _MatCapZRotCancel, _MatCapPerspective, _MatCapVRParallaxStrength); + + // Color float4 matCapColor = _MatCapColor; - if(Exists_MatCapTex) matCapColor *= LIL_SAMPLE_2D(_MatCapTex, samp, matUV); + if(Exists_MatCapTex) matCapColor *= LIL_SAMPLE_2D_LOD(_MatCapTex, sampler_linear_repeat, matUV, _MatCapLod); #if !defined(LIL_PASS_FORWARDADD) matCapColor.rgb = lerp(matCapColor.rgb, matCapColor.rgb * fd.lightColor, _MatCapEnableLighting); matCapColor.a = lerp(matCapColor.a, matCapColor.a * fd.shadowmix, _MatCapShadowMask); @@ -1054,8 +1147,11 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) if(_MatCapApplyTransparency) matCapColor.a *= fd.col.a; #endif matCapColor.a = fd.facing < (_MatCapBackfaceMask-1.0) ? 0.0 : matCapColor.a; - if(Exists_MatCapBlendMask) matCapColor.a *= LIL_SAMPLE_2D(_MatCapBlendMask, samp, fd.uvMain).r; - fd.col.rgb = lilBlendColor(fd.col.rgb, matCapColor.rgb, _MatCapBlend * matCapColor.a, _MatCapBlendMode); + float3 matCapMask = 1.0; + if(Exists_MatCapBlendMask) matCapMask = LIL_SAMPLE_2D_ST(_MatCapBlendMask, samp, fd.uvMain).rgb; + + // Blend + fd.col.rgb = lilBlendColor(fd.col.rgb, matCapColor.rgb, _MatCapBlend * matCapColor.a * matCapMask, _MatCapBlendMode); } } #elif defined(LIL_LITE) @@ -1083,21 +1179,28 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) LIL_BRANCH if(_UseMatCap2nd) { - float2 mat2ndUV = float2(0,0); - float3 matcap2ndNormalDirection = fd.matcap2ndN; + // Normal + float3 N = fd.matcap2ndN; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.matcap2ndN, _MatCap2ndNormalStrength); + #endif #if defined(LIL_FEATURE_TEX_MATCAP_NORMALMAP) LIL_BRANCH if(_MatCap2ndCustomNormal) { float4 normalTex = LIL_SAMPLE_2D_ST(_MatCap2ndBumpMap, samp, fd.uvMain); float3 normalmap = UnpackNormalScale(normalTex, _MatCap2ndBumpScale); - matcap2ndNormalDirection = normalize(mul(normalmap, fd.TBN)); - matcap2ndNormalDirection = fd.facing < (_FlipNormal-1.0) ? -matcap2ndNormalDirection : matcap2ndNormalDirection; + N = normalize(mul(normalmap, fd.TBN)); + N = fd.facing < (_FlipNormal-1.0) ? -N : N; } #endif - mat2ndUV = lilCalcMatCapUV(fd.uv1, matcap2ndNormalDirection, fd.V, fd.headV, _MatCap2ndTex_ST, _MatCap2ndBlendUV1.xy, _MatCap2ndZRotCancel, _MatCap2ndPerspective, _MatCap2ndVRParallaxStrength); + + // UV + float2 mat2ndUV = lilCalcMatCapUV(fd.uv1, N, fd.V, fd.headV, _MatCap2ndTex_ST, _MatCap2ndBlendUV1.xy, _MatCap2ndZRotCancel, _MatCap2ndPerspective, _MatCap2ndVRParallaxStrength); + + // Color float4 matCap2ndColor = _MatCap2ndColor; - if(Exists_MatCapTex) matCap2ndColor *= LIL_SAMPLE_2D(_MatCap2ndTex, samp, mat2ndUV); + if(Exists_MatCapTex) matCap2ndColor *= LIL_SAMPLE_2D_LOD(_MatCap2ndTex, sampler_linear_repeat, mat2ndUV, _MatCap2ndLod); #if !defined(LIL_PASS_FORWARDADD) matCap2ndColor.rgb = lerp(matCap2ndColor.rgb, matCap2ndColor.rgb * fd.lightColor, _MatCap2ndEnableLighting); matCap2ndColor.a = lerp(matCap2ndColor.a, matCap2ndColor.a * fd.shadowmix, _MatCap2ndShadowMask); @@ -1108,8 +1211,11 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) if(_MatCap2ndApplyTransparency) matCap2ndColor.a *= fd.col.a; #endif matCap2ndColor.a = fd.facing < (_MatCap2ndBackfaceMask-1.0) ? 0.0 : matCap2ndColor.a; - if(Exists_MatCap2ndBlendMask) matCap2ndColor.a *= LIL_SAMPLE_2D(_MatCap2ndBlendMask, samp, fd.uvMain).r; - fd.col.rgb = lilBlendColor(fd.col.rgb, matCap2ndColor.rgb, _MatCap2ndBlend * matCap2ndColor.a, _MatCap2ndBlendMode); + float3 matCapMask = 1.0; + if(Exists_MatCap2ndBlendMask) matCapMask = LIL_SAMPLE_2D_ST(_MatCap2ndBlendMask, samp, fd.uvMain).r; + + // Blend + fd.col.rgb = lilBlendColor(fd.col.rgb, matCap2ndColor.rgb, _MatCap2ndBlend * matCap2ndColor.a * matCapMask, _MatCap2ndBlendMode); } } #endif @@ -1133,22 +1239,32 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) #endif { #if defined(LIL_FEATURE_RIMLIGHT_DIRECTION) + // Color float4 rimColor = _RimColor; float4 rimIndirColor = _RimIndirColor; if(Exists_RimColorTex) { - float4 rimColorTex = LIL_SAMPLE_2D(_RimColorTex, samp, fd.uvMain); + float4 rimColorTex = LIL_SAMPLE_2D_ST(_RimColorTex, samp, fd.uvMain); rimColor *= rimColorTex; rimIndirColor *= rimColorTex; } - float lnRaw = fd.ln * 0.5 + 0.5; + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _RimNormalStrength); + #endif + float nvabs = abs(dot(N,fd.V)); + + // Factor + float lnRaw = dot(fd.L, N) * 0.5 + 0.5; float lnDir = saturate((lnRaw + _RimDirRange) / (1.0 + _RimDirRange)); float lnIndir = saturate((1.0-lnRaw + _RimIndirRange) / (1.0 + _RimIndirRange)); - float rim = pow(saturate(1.0 - fd.nvabs), _RimFresnelPower); + float rim = pow(saturate(1.0 - nvabs), _RimFresnelPower); rim = fd.facing < (_RimBackfaceMask-1.0) ? 0.0 : rim; float rimDir = lerp(rim, rim*lnDir, _RimDirStrength); float rimIndir = rim * lnIndir * _RimDirStrength; + rimDir = lilTooning(rimDir, _RimBorder, _RimBlur); rimIndir = lilTooning(rimIndir, _RimIndirBorder, _RimIndirBlur); @@ -1163,6 +1279,8 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) rimIndir *= fd.col.a; } #endif + + // Blend float3 rimSum = rimDir * rimColor.a * rimColor.rgb + rimIndir * rimIndirColor.a * rimIndirColor.rgb; #if !defined(LIL_PASS_FORWARDADD) rimSum = lerp(rimSum, rimSum * fd.lightColor, _RimEnableLighting); @@ -1171,14 +1289,26 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) fd.col.rgb += rimSum * _RimEnableLighting * fd.lightColor; #endif #else + // Color float4 rimColor = _RimColor; - if(Exists_RimColorTex) rimColor *= LIL_SAMPLE_2D(_RimColorTex, samp, fd.uvMain); - float rim = pow(saturate(1.0 - fd.nvabs), _RimFresnelPower); + if(Exists_RimColorTex) rimColor *= LIL_SAMPLE_2D_ST(_RimColorTex, samp, fd.uvMain); + + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _RimNormalStrength); + #endif + float nvabs = abs(dot(N,fd.V)); + + // Factor + float rim = pow(saturate(1.0 - nvabs), _RimFresnelPower); rim = fd.facing < (_RimBackfaceMask-1.0) ? 0.0 : rim; rim = lilTooning(rim, _RimBorder, _RimBlur); #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) if(_RimApplyTransparency) rim *= fd.col.a; #endif + + // Blend #if !defined(LIL_PASS_FORWARDADD) rim = lerp(rim, rim * fd.shadowmix, _RimShadowMask); rimColor.rgb = lerp(rimColor.rgb, rimColor.rgb * fd.lightColor, _RimEnableLighting); @@ -1223,20 +1353,31 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) LIL_BRANCH if(_UseGlitter) { + // View direction #if defined(USING_STEREO_MATRICES) float3 glitterViewDirection = lerp(fd.headV, fd.V, _GlitterVRParallaxStrength); #else float3 glitterViewDirection = fd.V; #endif + + // Normal + float3 N = fd.N; + #if defined(LIL_FEATURE_NORMAL_1ST) || defined(LIL_FEATURE_NORMAL_2ND) + N = lerp(fd.origN, fd.N, _GlitterNormalStrength); + #endif + + // Color float4 glitterColor = _GlitterColor; - if(Exists_GlitterColorTex) glitterColor *= LIL_SAMPLE_2D(_GlitterColorTex, samp, fd.uvMain); + if(Exists_GlitterColorTex) glitterColor *= LIL_SAMPLE_2D_ST(_GlitterColorTex, samp, fd.uvMain); float2 glitterPos = _GlitterUVMode ? fd.uv1 : fd.uv0; - glitterColor.rgb *= lilCalcGlitter(glitterPos, fd.N, glitterViewDirection, fd.L, _GlitterParams1, _GlitterParams2); + glitterColor.rgb *= lilCalcGlitter(glitterPos, N, glitterViewDirection, fd.L, _GlitterParams1, _GlitterParams2); glitterColor.rgb = lerp(glitterColor.rgb, glitterColor.rgb * fd.albedo, _GlitterMainStrength); #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) if(_GlitterApplyTransparency) glitterColor.a *= fd.col.a; #endif glitterColor.a = fd.facing < (_GlitterBackfaceMask-1.0) ? 0.0 : glitterColor.a; + + // Blend #if !defined(LIL_PASS_FORWARDADD) glitterColor.a = lerp(glitterColor.a, glitterColor.a * fd.shadowmix, _GlitterShadowMask); glitterColor.rgb = lerp(glitterColor.rgb, glitterColor.rgb * fd.lightColor, _GlitterEnableLighting); @@ -1263,34 +1404,39 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) if(_UseEmission) { float4 emissionColor = _EmissionColor; - #if defined(LIL_FEATURE_EMISSION_UV) + // UV + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) float2 emissionUV = fd.uv0; - if(_EmissionMap_UVMode == 1) emissionUV = fd.uv1; - if(_EmissionMap_UVMode == 2) emissionUV = fd.uv2; - if(_EmissionMap_UVMode == 3) emissionUV = fd.uv3; - if(_EmissionMap_UVMode == 4) emissionUV = fd.uvRim; - //if(_EmissionMap_UVMode == 4) emissionUV = fd.uvPanorama; - float2 _EmissionMapParaTex = emissionUV + _EmissionParallaxDepth * fd.parallaxOffset; - // Texture - #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) - if(Exists_EmissionMap) emissionColor *= LIL_GET_EMITEX(_EmissionMap, _EmissionMapParaTex); - #else - if(Exists_EmissionMap) emissionColor *= LIL_SAMPLE_2D(_EmissionMap, sampler_EmissionMap, lilCalcUV(_EmissionMapParaTex, _EmissionMap_ST)); - #endif #else - if(Exists_EmissionMap) emissionColor *= LIL_SAMPLE_2D(_EmissionMap, sampler_EmissionMap, fd.uvMain + _EmissionParallaxDepth * fd.parallaxOffset); + float2 emissionUV = fd.uvMain; + #endif + if(_EmissionMap_UVMode == 1) emissionUV = fd.uv1; + if(_EmissionMap_UVMode == 2) emissionUV = fd.uv2; + if(_EmissionMap_UVMode == 3) emissionUV = fd.uv3; + if(_EmissionMap_UVMode == 4) emissionUV = fd.uvRim; + //if(_EmissionMap_UVMode == 4) emissionUV = fd.uvPanorama; + float2 _EmissionMapParaTex = emissionUV + _EmissionParallaxDepth * fd.parallaxOffset; + // Texture + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + if(Exists_EmissionMap) emissionColor *= LIL_GET_EMITEX(_EmissionMap, _EmissionMapParaTex); + #else + if(Exists_EmissionMap) emissionColor *= LIL_SAMPLE_2D_ST(_EmissionMap, sampler_EmissionMap, _EmissionMapParaTex); #endif // Mask - #if defined(LIL_FEATURE_EMISSION_MASK_UV) && defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) if(Exists_EmissionBlendMask) emissionColor *= LIL_GET_EMIMASK(_EmissionBlendMask, fd.uv0); - #elif defined(LIL_FEATURE_EMISSION_MASK_UV) - if(Exists_EmissionBlendMask) emissionColor *= LIL_SAMPLE_2D(_EmissionBlendMask, samp, lilCalcUV(fd.uv0, _EmissionBlendMask_ST)); #else - if(Exists_EmissionBlendMask) emissionColor *= LIL_SAMPLE_2D(_EmissionBlendMask, samp, fd.uvMain); + if(Exists_EmissionBlendMask) emissionColor *= LIL_SAMPLE_2D_ST(_EmissionBlendMask, samp, fd.uvMain); #endif // Gradation - #if defined(LIL_FEATURE_EMISSION_GRADATION) - if(Exists_EmissionGradTex && _EmissionUseGrad) emissionColor *= LIL_SAMPLE_1D(_EmissionGradTex, sampler_linear_repeat, _EmissionGradSpeed*LIL_TIME); + #if defined(LIL_FEATURE_EMISSION_GRADATION) && defined(LIL_FEATURE_AUDIOLINK) + if(Exists_EmissionGradTex && _EmissionUseGrad) + { + float gradUV = _EmissionGradSpeed * LIL_TIME + fd.audioLinkValue * _AudioLink2EmissionGrad; + emissionColor *= LIL_SAMPLE_1D_LOD(_EmissionGradTex, sampler_linear_repeat, gradUV, 0); + } + #elif defined(LIL_FEATURE_EMISSION_GRADATION) + if(Exists_EmissionGradTex && _EmissionUseGrad) emissionColor *= LIL_SAMPLE_1D(_EmissionGradTex, sampler_linear_repeat, _EmissionGradSpeed * LIL_TIME); #endif #if defined(LIL_FEATURE_AUDIOLINK) if(_AudioLink2Emission) emissionColor.a *= fd.audioLinkValue; @@ -1336,34 +1482,39 @@ void lilGetShading(inout lilFragData fd LIL_SAMP_IN_FUNC(samp)) if(_UseEmission2nd) { float4 emission2ndColor = _Emission2ndColor; - #if defined(LIL_FEATURE_EMISSION_UV) + // UV + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) float2 emission2ndUV = fd.uv0; - if(_Emission2ndMap_UVMode == 1) emission2ndUV = fd.uv1; - if(_Emission2ndMap_UVMode == 2) emission2ndUV = fd.uv2; - if(_Emission2ndMap_UVMode == 3) emission2ndUV = fd.uv3; - if(_Emission2ndMap_UVMode == 4) emission2ndUV = fd.uvRim; - //if(_Emission2ndMap_UVMode == 4) emission2ndUV = fd.uvPanorama; - float2 _Emission2ndMapParaTex = emission2ndUV + _Emission2ndParallaxDepth * fd.parallaxOffset; - // Texture - #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) - if(Exists_Emission2ndMap) emission2ndColor *= LIL_GET_EMITEX(_Emission2ndMap, _Emission2ndMapParaTex); - #else - if(Exists_Emission2ndMap) emission2ndColor *= LIL_SAMPLE_2D(_Emission2ndMap, sampler_Emission2ndMap, lilCalcUV(_Emission2ndMapParaTex, _Emission2ndMap_ST)); - #endif #else - if(Exists_Emission2ndMap) emission2ndColor *= LIL_SAMPLE_2D(_Emission2ndMap, sampler_Emission2ndMap, fd.uvMain + _Emission2ndParallaxDepth * fd.parallaxOffset); + float2 emission2ndUV = fd.uvMain; + #endif + if(_Emission2ndMap_UVMode == 1) emission2ndUV = fd.uv1; + if(_Emission2ndMap_UVMode == 2) emission2ndUV = fd.uv2; + if(_Emission2ndMap_UVMode == 3) emission2ndUV = fd.uv3; + if(_Emission2ndMap_UVMode == 4) emission2ndUV = fd.uvRim; + //if(_Emission2ndMap_UVMode == 4) emission2ndUV = fd.uvPanorama; + float2 _Emission2ndMapParaTex = emission2ndUV + _Emission2ndParallaxDepth * fd.parallaxOffset; + // Texture + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + if(Exists_Emission2ndMap) emission2ndColor *= LIL_GET_EMITEX(_Emission2ndMap, _Emission2ndMapParaTex); + #else + if(Exists_Emission2ndMap) emission2ndColor *= LIL_SAMPLE_2D_ST(_Emission2ndMap, sampler_Emission2ndMap, _Emission2ndMapParaTex); #endif // Mask - #if defined(LIL_FEATURE_EMISSION_MASK_UV) && defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) if(Exists_Emission2ndBlendMask) emission2ndColor *= LIL_GET_EMIMASK(_Emission2ndBlendMask, fd.uv0); - #elif defined(LIL_FEATURE_EMISSION_MASK_UV) - if(Exists_Emission2ndBlendMask) emission2ndColor *= LIL_SAMPLE_2D(_Emission2ndBlendMask, samp, lilCalcUV(fd.uv0, _Emission2ndBlendMask_ST)); #else - if(Exists_Emission2ndBlendMask) emission2ndColor *= LIL_SAMPLE_2D(_Emission2ndBlendMask, samp, fd.uvMain); + if(Exists_Emission2ndBlendMask) emission2ndColor *= LIL_SAMPLE_2D_ST(_Emission2ndBlendMask, samp, fd.uvMain); #endif // Gradation - #if defined(LIL_FEATURE_EMISSION_GRADATION) - if(Exists_Emission2ndGradTex && _Emission2ndUseGrad) emission2ndColor *= LIL_SAMPLE_1D(_Emission2ndGradTex, sampler_linear_repeat, _Emission2ndGradSpeed*LIL_TIME); + #if defined(LIL_FEATURE_EMISSION_GRADATION) && defined(LIL_FEATURE_AUDIOLINK) + if(Exists_Emission2ndGradTex && _Emission2ndUseGrad) + { + float gradUV = _Emission2ndGradSpeed * LIL_TIME + fd.audioLinkValue * _AudioLink2Emission2ndGrad; + emission2ndColor *= LIL_SAMPLE_1D_LOD(_Emission2ndGradTex, sampler_linear_repeat, gradUV, 0); + } + #elif defined(LIL_FEATURE_EMISSION_GRADATION) + if(Exists_Emission2ndGradTex && _Emission2ndUseGrad) emission2ndColor *= LIL_SAMPLE_1D(_Emission2ndGradTex, sampler_linear_repeat, _Emission2ndGradSpeed * LIL_TIME); #endif #if defined(LIL_FEATURE_AUDIOLINK) if(_AudioLink2Emission2nd) emission2ndColor.a *= fd.audioLinkValue; diff --git a/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl b/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl index 7d8bb1d3..a370b077 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl @@ -283,7 +283,7 @@ float3 lilSRGBToLinear(float3 col) return col * (col * (col * 0.305306011 + 0.682171111) + 0.012522878); } -float3 lilBlendColor(float3 dstCol, float3 srcCol, float srcA, uint blendMode) +float3 lilBlendColor(float3 dstCol, float3 srcCol, float3 srcA, uint blendMode) { float3 ad = dstCol + srcCol; float3 mu = dstCol * srcCol; @@ -295,6 +295,11 @@ float3 lilBlendColor(float3 dstCol, float3 srcCol, float srcA, uint blendMode) return lerp(dstCol, outCol, srcA); } +float3 lilBlendColor(float3 dstCol, float3 srcCol, float srcA, uint blendMode) +{ + return lilBlendColor(dstCol, srcCol, float3(srcA,srcA,srcA), blendMode); +} + float lilLuminance(float3 rgb) { #ifdef LIL_COLORSPACE_GAMMA diff --git a/Assets/lilToon/Shader/Includes/lil_common_input.hlsl b/Assets/lilToon/Shader/Includes/lil_common_input.hlsl index 44afe286..eedbe893 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_input.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_input.hlsl @@ -13,7 +13,9 @@ SAMPLER(sampler_DitherMaskLOD); #endif -SAMPLER(sampler_linear_repeat); +SAMPLER(sampler_trilinear_repeat); +//SAMPLER(sampler_linear_repeat); +#define sampler_linear_repeat sampler_trilinear_repeat SAMPLER(sampler_linear_clamp); #if defined(LIL_BRP) @@ -142,10 +144,10 @@ SAMPLER(sampler_linear_clamp); #define Exists_Emission2ndBlendMask false #endif -#if defined(LIL_FEATURE_TEX_AUDIOLINK_MASK) - #define Exists_AudioLinkMask true +#if defined(LIL_FEATURE_AUDIOLINK) + #define Exists_AudioLinkMask true #else - #define Exists_AudioLinkMask false + #define Exists_AudioLinkMask false #endif #if defined(LIL_FEATURE_TEX_DISSOLVE_NOISE) @@ -284,6 +286,7 @@ SAMPLER(sampler_linear_clamp); float _MainGradationStrength; float _Main2ndTexAngle; float _Main3rdTexAngle; + float _AlphaMaskScale; float _AlphaMaskValue; uint _Main2ndTexBlendMode; uint _Main3rdTexBlendMode; @@ -344,9 +347,11 @@ SAMPLER(sampler_linear_clamp); float4 _ShadowColor; float4 _Shadow2ndColor; float4 _ShadowBorderColor; + float4 _ShadowAOShift; #endif #if defined(LIL_MULTI_INPUTS_BACKLIGHT) float4 _BacklightColor; + float4 _BacklightColorTex_ST; #endif #if defined(LIL_MULTI_INPUTS_EMISSION) float4 _EmissionColor; @@ -369,32 +374,41 @@ SAMPLER(sampler_linear_clamp); #endif #if defined(LIL_MULTI_INPUTS_NORMAL_2ND) float4 _Bump2ndMap_ST; + float4 _Bump2ndScaleMask_ST; #endif #if defined(LIL_MULTI_INPUTS_ANISOTROPY) float4 _AnisotropyTangentMap_ST; + float4 _AnisotropyScaleMask_ST; float4 _AnisotropyShiftNoiseMask_ST; #endif #if defined(LIL_MULTI_INPUTS_REFLECTION) float4 _ReflectionColor; + float4 _SmoothnessTex_ST; + float4 _MetallicGlossMap_ST; + float4 _ReflectionColorTex_ST; #endif #if defined(LIL_MULTI_INPUTS_MATCAP) float4 _MatCapColor; float4 _MatCapTex_ST; + float4 _MatCapBlendMask_ST; float4 _MatCapBlendUV1; float4 _MatCapBumpMap_ST; #endif #if defined(LIL_MULTI_INPUTS_MATCAP_2ND) float4 _MatCap2ndColor; float4 _MatCap2ndTex_ST; + float4 _MatCap2ndBlendMask_ST; float4 _MatCap2ndBlendUV1; float4 _MatCap2ndBumpMap_ST; #endif #if defined(LIL_MULTI_INPUTS_RIM) float4 _RimColor; + float4 _RimColorTex_ST; float4 _RimIndirColor; #endif #if defined(LIL_MULTI_INPUTS_GLITTER) float4 _GlitterColor; + float4 _GlitterColorTex_ST; float4 _GlitterParams1; float4 _GlitterParams2; #endif @@ -403,7 +417,9 @@ SAMPLER(sampler_linear_clamp); float4 _DistanceFadeColor; #endif #if defined(LIL_MULTI_INPUTS_AUDIOLINK) + float4 _AudioLinkDefaultValue; float4 _AudioLinkUVParams; + float4 _AudioLinkStart; float4 _AudioLinkVertexUVParams; float4 _AudioLinkVertexStart; float4 _AudioLinkVertexStrength; @@ -462,13 +478,16 @@ SAMPLER(sampler_linear_clamp); float _Main3rdDissolveNoiseStrength; #endif #if defined(LIL_MULTI_INPUTS_ALPHAMASK) + float _AlphaMaskScale; float _AlphaMaskValue; #endif float _BackfaceForceShadow; #if defined(LIL_MULTI_INPUTS_SHADOW) float _ShadowStrength; + float _ShadowNormalStrength; float _ShadowBorder; float _ShadowBlur; + float _Shadow2ndNormalStrength; float _Shadow2ndBorder; float _Shadow2ndBlur; float _ShadowMainStrength; @@ -476,6 +495,7 @@ SAMPLER(sampler_linear_clamp); float _ShadowBorderRange; #endif #if defined(LIL_MULTI_INPUTS_BACKLIGHT) + float _BacklightNormalStrength; float _BacklightBorder; float _BacklightBlur; float _BacklightDirectivity; @@ -504,8 +524,10 @@ SAMPLER(sampler_linear_clamp); #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_GEM) float _Smoothness; float _Reflectance; + float _SpecularNormalStrength; float _SpecularBorder; float _SpecularBlur; + float _ReflectionNormalStrength; #endif #if defined(LIL_MULTI_INPUTS_REFLECTION) float _Metallic; @@ -516,6 +538,8 @@ SAMPLER(sampler_linear_clamp); float _MatCapShadowMask; float _MatCapVRParallaxStrength; float _MatCapBackfaceMask; + float _MatCapLod; + float _MatCapNormalStrength; float _MatCapBumpScale; #endif #if defined(LIL_MULTI_INPUTS_MATCAP_2ND) @@ -524,9 +548,12 @@ SAMPLER(sampler_linear_clamp); float _MatCap2ndShadowMask; float _MatCap2ndVRParallaxStrength; float _MatCap2ndBackfaceMask; + float _MatCap2ndLod; + float _MatCap2ndNormalStrength; float _MatCap2ndBumpScale; #endif #if defined(LIL_MULTI_INPUTS_RIM) + float _RimNormalStrength; float _RimBorder; float _RimBlur; float _RimFresnelPower; @@ -541,6 +568,7 @@ SAMPLER(sampler_linear_clamp); #endif #if defined(LIL_MULTI_INPUTS_GLITTER) float _GlitterMainStrength; + float _GlitterNormalStrength; float _GlitterEnableLighting; float _GlitterShadowMask; float _GlitterVRParallaxStrength; @@ -562,6 +590,10 @@ SAMPLER(sampler_linear_clamp); float _Parallax; float _ParallaxOffset; #endif + #if defined(LIL_MULTI_INPUTS_AUDIOLINK) + float _AudioLink2EmissionGrad; + float _AudioLink2Emission2ndGrad; + #endif #if defined(LIL_MULTI_INPUTS_DISSOLVE) float _DissolveNoiseStrength; #endif @@ -775,28 +807,26 @@ SAMPLER(sampler_linear_clamp); float4 _ShadowColor; float4 _Shadow2ndColor; float4 _ShadowBorderColor; + float4 _ShadowAOShift; #endif // Backlight #if defined(LIL_FEATURE_BACKLIGHT) float4 _BacklightColor; + float4 _BacklightColorTex_ST; #endif // Emission #if defined(LIL_FEATURE_EMISSION_1ST) float4 _EmissionColor; float4 _EmissionBlink; - #if defined(LIL_FEATURE_EMISSION_UV) - float4 _EmissionMap_ST; - #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) - float4 _EmissionMap_ScrollRotate; - #endif + float4 _EmissionMap_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + float4 _EmissionMap_ScrollRotate; #endif - #if defined(LIL_FEATURE_EMISSION_MASK_UV) - float4 _EmissionBlendMask_ST; - #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) - float4 _EmissionBlendMask_ScrollRotate; - #endif + float4 _EmissionBlendMask_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + float4 _EmissionBlendMask_ScrollRotate; #endif #endif @@ -804,17 +834,13 @@ SAMPLER(sampler_linear_clamp); #if defined(LIL_FEATURE_EMISSION_2ND) float4 _Emission2ndColor; float4 _Emission2ndBlink; - #if defined(LIL_FEATURE_EMISSION_UV) - float4 _Emission2ndMap_ST; - #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) - float4 _Emission2ndMap_ScrollRotate; - #endif + float4 _Emission2ndMap_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_UV) + float4 _Emission2ndMap_ScrollRotate; #endif - #if defined(LIL_FEATURE_EMISSION_MASK_UV) - float4 _Emission2ndBlendMask_ST; - #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) - float4 _Emission2ndBlendMask_ScrollRotate; - #endif + float4 _Emission2ndBlendMask_ST; + #if defined(LIL_FEATURE_ANIMATE_EMISSION_MASK_UV) + float4 _Emission2ndBlendMask_ScrollRotate; #endif #endif @@ -826,23 +852,29 @@ SAMPLER(sampler_linear_clamp); // Normal Map 2nd #if defined(LIL_FEATURE_NORMAL_2ND) float4 _Bump2ndMap_ST; + float4 _Bump2ndScaleMask_ST; #endif // Anisotropy #if defined(LIL_FEATURE_ANISOTROPY) float4 _AnisotropyTangentMap_ST; + float4 _AnisotropyScaleMask_ST; float4 _AnisotropyShiftNoiseMask_ST; #endif // Reflection #if defined(LIL_FEATURE_REFLECTION) float4 _ReflectionColor; + float4 _SmoothnessTex_ST; + float4 _MetallicGlossMap_ST; + float4 _ReflectionColorTex_ST; #endif // MatCap #if defined(LIL_FEATURE_MATCAP) float4 _MatCapColor; float4 _MatCapTex_ST; + float4 _MatCapBlendMask_ST; float4 _MatCapBlendUV1; #if defined(LIL_FEATURE_TEX_MATCAP_NORMALMAP) float4 _MatCapBumpMap_ST; @@ -853,6 +885,7 @@ SAMPLER(sampler_linear_clamp); #if defined(LIL_FEATURE_MATCAP_2ND) float4 _MatCap2ndColor; float4 _MatCap2ndTex_ST; + float4 _MatCap2ndBlendMask_ST; float4 _MatCap2ndBlendUV1; #if defined(LIL_FEATURE_TEX_MATCAP_NORMALMAP) float4 _MatCap2ndBumpMap_ST; @@ -862,27 +895,31 @@ SAMPLER(sampler_linear_clamp); // Rim Light #if defined(LIL_FEATURE_RIMLIGHT) float4 _RimColor; + float4 _RimColorTex_ST; #if defined(LIL_FEATURE_RIMLIGHT_DIRECTION) - float4 _RimIndirColor; + float4 _RimIndirColor; #endif #endif // Glitter #if defined(LIL_FEATURE_GLITTER) float4 _GlitterColor; - float4 _GlitterParams1; - float4 _GlitterParams2; + float4 _GlitterColorTex_ST; + float4 _GlitterParams1; + float4 _GlitterParams2; #endif // Distance Fade #if defined(LIL_FEATURE_DISTANCE_FADE) - float4 _DistanceFade; - float4 _DistanceFadeColor; + float4 _DistanceFade; + float4 _DistanceFadeColor; #endif // AudioLink #if defined(LIL_FEATURE_AUDIOLINK) + float4 _AudioLinkDefaultValue; float4 _AudioLinkUVParams; + float4 _AudioLinkStart; #if defined(LIL_FEATURE_AUDIOLINK_VERTEX) float4 _AudioLinkVertexUVParams; float4 _AudioLinkVertexStart; @@ -972,13 +1009,16 @@ SAMPLER(sampler_linear_clamp); #endif #endif #if defined(LIL_FEATURE_ALPHAMASK) + float _AlphaMaskScale; float _AlphaMaskValue; #endif #if defined(LIL_FEATURE_SHADOW) float _BackfaceForceShadow; float _ShadowStrength; + float _ShadowNormalStrength; float _ShadowBorder; float _ShadowBlur; + float _Shadow2ndNormalStrength; float _Shadow2ndBorder; float _Shadow2ndBlur; float _ShadowMainStrength; @@ -986,6 +1026,7 @@ SAMPLER(sampler_linear_clamp); float _ShadowBorderRange; #endif #if defined(LIL_FEATURE_BACKLIGHT) + float _BacklightNormalStrength; float _BacklightBorder; float _BacklightBlur; float _BacklightDirectivity; @@ -1014,8 +1055,10 @@ SAMPLER(sampler_linear_clamp); #if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) float _Smoothness; float _Reflectance; + float _SpecularNormalStrength; float _SpecularBorder; float _SpecularBlur; + float _ReflectionNormalStrength; #endif #if defined(LIL_FEATURE_REFLECTION) float _Metallic; @@ -1026,6 +1069,8 @@ SAMPLER(sampler_linear_clamp); float _MatCapShadowMask; float _MatCapVRParallaxStrength; float _MatCapBackfaceMask; + float _MatCapLod; + float _MatCapNormalStrength; #if defined(LIL_FEATURE_TEX_MATCAP_NORMALMAP) float _MatCapBumpScale; #endif @@ -1036,11 +1081,14 @@ SAMPLER(sampler_linear_clamp); float _MatCap2ndShadowMask; float _MatCap2ndVRParallaxStrength; float _MatCap2ndBackfaceMask; + float _MatCap2ndLod; + float _MatCap2ndNormalStrength; #if defined(LIL_FEATURE_TEX_MATCAP_NORMALMAP) float _MatCap2ndBumpScale; #endif #endif #if defined(LIL_FEATURE_RIMLIGHT) + float _RimNormalStrength; float _RimBorder; float _RimBlur; float _RimFresnelPower; @@ -1057,6 +1105,7 @@ SAMPLER(sampler_linear_clamp); #endif #if defined(LIL_FEATURE_GLITTER) float _GlitterMainStrength; + float _GlitterNormalStrength; float _GlitterEnableLighting; float _GlitterShadowMask; float _GlitterVRParallaxStrength; @@ -1082,8 +1131,10 @@ SAMPLER(sampler_linear_clamp); float _Parallax; float _ParallaxOffset; #endif - - // Dissolve + #if defined(LIL_FEATURE_AUDIOLINK) + float _AudioLink2EmissionGrad; + float _AudioLink2Emission2ndGrad; + #endif #if defined(LIL_FEATURE_DISSOLVE) && defined(LIL_FEATURE_TEX_DISSOLVE_NOISE) float _DissolveNoiseStrength; #endif @@ -1138,10 +1189,10 @@ SAMPLER(sampler_linear_clamp); #if defined(LIL_FEATURE_GLITTER) uint _GlitterUVMode; #endif - #if defined(LIL_FEATURE_EMISSION_1ST) && defined(LIL_FEATURE_EMISSION_UV) + #if defined(LIL_FEATURE_EMISSION_1ST) uint _EmissionMap_UVMode; #endif - #if defined(LIL_FEATURE_EMISSION_2ND) && defined(LIL_FEATURE_EMISSION_UV) + #if defined(LIL_FEATURE_EMISSION_2ND) uint _Emission2ndMap_UVMode; #endif #if defined(LIL_FEATURE_AUDIOLINK) diff --git a/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl b/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl index 61c8603a..5e65d472 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl @@ -180,7 +180,7 @@ #endif // positionOS -#if (defined(LIL_FEATURE_MAIN2ND) || defined(LIL_FEATURE_MAIN3RD)) && defined(LIL_FEATURE_LAYER_DISSOLVE) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_DISSOLVE) +#if (defined(LIL_FEATURE_MAIN2ND) || defined(LIL_FEATURE_MAIN3RD)) && defined(LIL_FEATURE_LAYER_DISSOLVE) || defined(LIL_FEATURE_GLITTER) || defined(LIL_FEATURE_DISSOLVE) || defined(LIL_FEATURE_AUDIOLINK) #define LIL_SHOULD_POSITION_OS #endif @@ -438,6 +438,15 @@ float3 lilHeadDirection(float3 positionWS) #endif } +float2 lilCStoGrabUV(float4 positionCS) +{ + float2 uvScn = positionCS.xy / _ScreenParams.xy; + #if defined(UNITY_SINGLE_PASS_STEREO) + uvScn.xy = TransformStereoScreenSpaceTex(uvScn.xy, 1.0); + #endif + return uvScn; +} + /* // Built-in RP #define UnityWorldToViewPos(positionWS) lilTransformWStoVS(positionWS) @@ -595,7 +604,11 @@ float3 lilHeadDirection(float3 positionWS) lilGetEnvReflection(viewDirection,normalDirection,perceptualRoughness,positionWS) // Fog - #define LIL_APPLY_FOG_BASE(col,fogCoord) UNITY_FOG_LERP_COLOR(col,unity_FogColor,fogCoord) + #if defined(LIL_PASS_FORWARDADD) + #define LIL_APPLY_FOG_BASE(col,fogCoord) UNITY_FOG_LERP_COLOR(col,float4(0,0,0,0),fogCoord) + #else + #define LIL_APPLY_FOG_BASE(col,fogCoord) UNITY_FOG_LERP_COLOR(col,unity_FogColor,fogCoord) + #endif #define LIL_APPLY_FOG_COLOR_BASE(col,fogCoord,fogColor) UNITY_FOG_LERP_COLOR(col,fogColor,fogCoord) float lilCalcFogFactor(float depth) { @@ -1445,8 +1458,10 @@ float3 lilGetLightMapDirection(float2 uv) #if !defined(LIL_PASS_FORWARDADD) && (defined(LIL_FEATURE_SHADOW) || defined(LIL_LITE)) #define LIL_INDLIGHTCOLOR_COORDS(idx) LIL_NOPERSPECTIVE float3 indLightColor : TEXCOORD##idx; + #define LIL_GET_INDLIGHTCOLOR(i,o) o.indLightColor = i.indLightColor #else #define LIL_INDLIGHTCOLOR_COORDS(idx) + #define LIL_GET_INDLIGHTCOLOR(i,o) #endif // Dir light & indir light @@ -1625,7 +1640,7 @@ struct lilLightData #if defined(LIL_USE_ADDITIONALLIGHT_VS) && (defined(VERTEXLIGHT_ON) || !defined(LIL_BRP)) #define LIL_CALC_VERTEXLIGHT(i,o) \ - o.vlf.rgb = lilGetAdditionalLights(i.positionWS); \ + o.vlf.rgb = lilGetAdditionalLights(i.positionWS) * _VertexLightStrength; \ o.vlf.rgb = lerp(o.vlf.rgb, lilGray(o.vlf.rgb), _MonochromeLighting); \ o.vlf.rgb = lerp(o.vlf.rgb, 0.0, _AsUnlit) #elif defined(LIL_USE_ADDITIONALLIGHT_VS) @@ -1637,7 +1652,7 @@ struct lilLightData // Additional Light PS #if defined(LIL_USE_ADDITIONALLIGHT_PS) #define LIL_GET_ADDITIONALLIGHT(i,o) \ - o = lilGetAdditionalLights(i.positionWS); \ + o = lilGetAdditionalLights(i.positionWS) * _VertexLightStrength; \ o = lerp(o, lilGray(o), _MonochromeLighting); \ o = lerp(o, 0.0, _AsUnlit) #elif defined(LIL_USE_ADDITIONALLIGHT_VS) diff --git a/Assets/lilToon/Shader/Includes/lil_common_vert.hlsl b/Assets/lilToon/Shader/Includes/lil_common_vert.hlsl index 73e5d7f3..7e3ebb3c 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_vert.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_vert.hlsl @@ -147,8 +147,8 @@ LIL_V2F_TYPE vert(appdata input) #if defined(LIL_CUSTOM_VERTEX_WS) LIL_RE_VERTEX_POSITION_INPUTS(vertexInput); #endif - float3 viewDirection = normalize(lilViewDirection(vertexInput.positionWS)); - float3 headDirection = normalize(lilHeadDirection(vertexInput.positionWS)); + float3 viewDirection = normalize(lilViewDirection(lilToAbsolutePositionWS(vertexInput.positionWS))); + float3 headDirection = normalize(lilHeadDirection(lilToAbsolutePositionWS(vertexInput.positionWS))); //------------------------------------------------------------------------------------------------------------------------------ // Copy diff --git a/Assets/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl b/Assets/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl index b969c2ab..690386f7 100644 --- a/Assets/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_pass_forward_gem.hlsl @@ -110,10 +110,10 @@ #if defined(LIL_V2F_POSITION_WS) LIL_GET_POSITION_WS_DATA(input,fd); #endif - #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) && defined(LIL_V2F_BITANGENT_WS) + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) LIL_GET_TBN_DATA(input,fd); #endif - #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) && defined(LIL_V2F_BITANGENT_WS) && defined(LIL_V2F_POSITION_WS) + #if defined(LIL_V2F_NORMAL_WS) && defined(LIL_V2F_TANGENT_WS) && defined(LIL_V2F_POSITION_WS) LIL_GET_PARALLAX_DATA(input,fd); #endif diff --git a/Assets/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl b/Assets/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl index 63511d83..5efdc098 100644 --- a/Assets/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_pass_forward_normal.hlsl @@ -351,6 +351,7 @@ float4 frag(v2f input LIL_VFACE(facing)) : SV_Target fd.nvabs = abs(dot(fd.N, fd.V)); fd.uvRim = float2(fd.nvabs,fd.nvabs); #endif + fd.origN = normalize(input.normalWS); #endif fd.reflectionN = fd.N; fd.matcapN = fd.N; @@ -440,7 +441,7 @@ float4 frag(v2f input LIL_VFACE(facing)) : SV_Target //------------------------------------------------------------------------------------------------------------------------------ // Premultiply - #if LIL_RENDER == 2 && !defined(LIL_REFRACTION) + #if LIL_RENDER == 2 fd.col.rgb *= fd.col.a; #endif @@ -450,7 +451,7 @@ float4 frag(v2f input LIL_VFACE(facing)) : SV_Target #if defined(LIL_REFRACTION) && !defined(LIL_PASS_FORWARDADD) #if defined(LIL_REFRACTION_BLUR2) && defined(LIL_FEATURE_REFLECTION) fd.smoothness = _Smoothness; - if(Exists_SmoothnessTex) fd.smoothness *= LIL_SAMPLE_2D(_SmoothnessTex, sampler_MainTex, fd.uvMain).r; + if(Exists_SmoothnessTex) fd.smoothness *= LIL_SAMPLE_2D_ST(_SmoothnessTex, sampler_MainTex, fd.uvMain).r; fd.perceptualRoughness = fd.perceptualRoughness - fd.smoothness * fd.perceptualRoughness; fd.roughness = fd.perceptualRoughness * fd.perceptualRoughness; #endif diff --git a/Assets/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl b/Assets/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl index a9452d47..598fc86c 100644 --- a/Assets/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_pass_forward_refblur.hlsl @@ -44,7 +44,7 @@ float4 frag(v2f input LIL_VFACE(facing)) : SV_Target float3 refractCol = 0; float sum = 0; fd.smoothness = _Smoothness; - if(Exists_SmoothnessTex) fd.smoothness *= LIL_SAMPLE_2D(_SmoothnessTex, sampler_linear_repeat, fd.uvMain).r; + if(Exists_SmoothnessTex) fd.smoothness *= LIL_SAMPLE_2D_ST(_SmoothnessTex, sampler_linear_repeat, fd.uvMain).r; float perceptualRoughness = 1.0 - fd.smoothness; float roughness = perceptualRoughness * perceptualRoughness; float blurOffset = perceptualRoughness / fd.positionSS.z * _lilBackgroundTexture_TexelSize.x / _lilBackgroundTexture_TexelSize.y * (0.0005 / LIL_REFRACTION_SAMPNUM); diff --git a/Assets/lilToon/Shader/Includes/lil_tessellation.hlsl b/Assets/lilToon/Shader/Includes/lil_tessellation.hlsl index 54638ea8..b4c7761c 100644 --- a/Assets/lilToon/Shader/Includes/lil_tessellation.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_tessellation.hlsl @@ -51,15 +51,9 @@ lilTessellationFactors hullConst(InputPatch input) tessFactor.xyz = min(tessFactor.xyz, _TessFactorMax); // Rim - #if defined(LIL_HDRP) - float3 nv = float3(abs(dot(vertexNormalInput_0.normalWS, lilViewDirection(GetAbsolutePositionWS(vertexInput_0.positionWS)))), - abs(dot(vertexNormalInput_1.normalWS, lilViewDirection(GetAbsolutePositionWS(vertexInput_1.positionWS)))), - abs(dot(vertexNormalInput_2.normalWS, lilViewDirection(GetAbsolutePositionWS(vertexInput_2.positionWS))))); - #else - float3 nv = float3(abs(dot(vertexNormalInput_0.normalWS, lilViewDirection(vertexInput_0.positionWS))), - abs(dot(vertexNormalInput_1.normalWS, lilViewDirection(vertexInput_1.positionWS))), - abs(dot(vertexNormalInput_2.normalWS, lilViewDirection(vertexInput_2.positionWS)))); - #endif + float3 nv = float3(abs(dot(vertexNormalInput_0.normalWS, lilViewDirection(lilToAbsolutePositionWS(vertexInput_0.positionWS)))), + abs(dot(vertexNormalInput_1.normalWS, lilViewDirection(lilToAbsolutePositionWS(vertexInput_1.positionWS)))), + abs(dot(vertexNormalInput_2.normalWS, lilViewDirection(lilToAbsolutePositionWS(vertexInput_2.positionWS))))); nv = saturate(1.0 - float3(nv.y + nv.z, nv.z + nv.x, nv.x + nv.y) * 0.5); tessFactor.xyz = max(tessFactor.xyz * nv * nv, 1.0); tessFactor.w = (tessFactor.x+tessFactor.y+tessFactor.z) / 3.0; diff --git a/Assets/lilToon/Shader/Includes/lil_vert_audiolink.hlsl b/Assets/lilToon/Shader/Includes/lil_vert_audiolink.hlsl index a26155ca..c67b2a92 100644 --- a/Assets/lilToon/Shader/Includes/lil_vert_audiolink.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_vert_audiolink.hlsl @@ -9,19 +9,24 @@ #if !defined(LIL_FUR) && !defined(LIL_LITE) && defined(LIL_FEATURE_AUDIOLINK) && defined(LIL_FEATURE_AUDIOLINK_VERTEX) if(_UseAudioLink && _AudioLink2Vertex) { - float audioLinkValue = 0.0; - float4 audioLinkMask = 1.0; + // UV float2 audioLinkUV; if(_AudioLinkVertexUVMode == 0) audioLinkUV.x = _AudioLinkVertexUVParams.g; if(_AudioLinkVertexUVMode == 1) audioLinkUV.x = distance(LIL_MODIFY_TARGET.xyz, _AudioLinkVertexStart.xyz) * _AudioLinkVertexUVParams.r + _AudioLinkVertexUVParams.g; if(_AudioLinkVertexUVMode == 2) audioLinkUV.x = lilRotateUV(input.uv0, _AudioLinkVertexUVParams.b).x * _AudioLinkVertexUVParams.r + _AudioLinkVertexUVParams.g; audioLinkUV.y = _AudioLinkVertexUVParams.a; + // Mask (R:Delay G:Band B:Strength) + float4 audioLinkMask = 1.0; if(_AudioLinkVertexUVMode == 3 && Exists_AudioLinkMask) { audioLinkMask = LIL_SAMPLE_2D_LOD(_AudioLinkMask, sampler_linear_repeat, uvMain, 0); audioLinkUV = audioLinkMask.rg; } + + // Init value + float audioLinkValue = saturate(_AudioLinkDefaultValue.x - saturate(frac(LIL_TIME * _AudioLinkDefaultValue.z - audioLinkUV.x)+_AudioLinkDefaultValue.w) * _AudioLinkDefaultValue.y * _AudioLinkDefaultValue.x); + // Local #if defined(LIL_FEATURE_AUDIOLINK_LOCAL) if(_AudioLinkAsLocal) @@ -31,6 +36,7 @@ } else #endif + // Global if(lilCheckAudioLink()) { @@ -39,6 +45,8 @@ audioLinkValue = LIL_SAMPLE_2D_LOD(_AudioTexture, sampler_linear_clamp, audioLinkUV, 0).r; audioLinkValue = saturate(audioLinkValue); } + + // Modify LIL_MODIFY_TARGET.xyz += (input.normalOS * _AudioLinkVertexStrength.w + _AudioLinkVertexStrength.xyz) * audioLinkValue * audioLinkMask.b; } #endif diff --git a/Assets/lilToon/Shader/lts.shader b/Assets/lilToon/Shader/lts.shader index 81c7ae61..a8d9160a 100644 --- a/Assets/lilToon/Shader/lts.shader +++ b/Assets/lilToon/Shader/lts.shader @@ -87,7 +87,8 @@ Shader "lilToon" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "lilToon" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "lilToon" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "lilToon" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "lilToon" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "lilToon" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "lilToon" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "lilToon" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "lilToon" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "lilToon" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_cutout.shader b/Assets/lilToon/Shader/lts_cutout.shader index e08f5dea..087d94f6 100644 --- a/Assets/lilToon/Shader/lts_cutout.shader +++ b/Assets/lilToon/Shader/lts_cutout.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonCutout" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonCutout" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonCutout" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonCutout" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonCutout" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonCutout" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonCutout" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonCutout" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonCutout" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonCutout" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_cutout_o.shader b/Assets/lilToon/Shader/lts_cutout_o.shader index 91787015..b06e695a 100644 --- a/Assets/lilToon/Shader/lts_cutout_o.shader +++ b/Assets/lilToon/Shader/lts_cutout_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonCutoutOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonCutoutOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonCutoutOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonCutoutOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonCutoutOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonCutoutOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonCutoutOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonCutoutOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonCutoutOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonCutoutOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -426,6 +444,7 @@ Shader "Hidden/lilToonCutoutOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_fakeshadow.shader b/Assets/lilToon/Shader/lts_fakeshadow.shader index bc598d22..4f122a0e 100644 --- a/Assets/lilToon/Shader/lts_fakeshadow.shader +++ b/Assets/lilToon/Shader/lts_fakeshadow.shader @@ -26,6 +26,7 @@ Shader "_lil/[Optional] lilToonFakeShadow" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("BlendOp", Int) = 0 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("BlendOpAlpha", Int) = 0 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 51 @@ -75,6 +76,7 @@ Shader "_lil/[Optional] lilToonFakeShadow" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -131,6 +133,7 @@ Shader "_lil/[Optional] lilToonFakeShadow" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -184,6 +187,7 @@ Shader "_lil/[Optional] lilToonFakeShadow" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -241,6 +245,7 @@ Shader "_lil/[Optional] lilToonFakeShadow" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -294,6 +299,7 @@ Shader "_lil/[Optional] lilToonFakeShadow" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -349,6 +355,7 @@ Shader "_lil/[Optional] lilToonFakeShadow" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] diff --git a/Assets/lilToon/Shader/lts_fur.shader b/Assets/lilToon/Shader/lts_fur.shader index f7267821..b29788ff 100644 --- a/Assets/lilToon/Shader/lts_fur.shader +++ b/Assets/lilToon/Shader/lts_fur.shader @@ -30,19 +30,22 @@ Shader "Hidden/lilToonFur" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -72,6 +75,7 @@ Shader "Hidden/lilToonFur" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -115,6 +119,7 @@ Shader "Hidden/lilToonFur" [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("ZClip", Int) = 1 [lilToggle] _FurZWrite ("ZWrite", Int) = 0 [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("ZTest", Int) = 4 [IntRange] _FurStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -165,6 +170,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -209,6 +215,7 @@ Shader "Hidden/lilToonFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -292,6 +299,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -338,6 +346,7 @@ Shader "Hidden/lilToonFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -399,6 +408,9 @@ Shader "Hidden/lilToonFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -462,6 +474,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -506,6 +519,7 @@ Shader "Hidden/lilToonFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -564,6 +578,9 @@ Shader "Hidden/lilToonFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -634,6 +651,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -680,6 +698,7 @@ Shader "Hidden/lilToonFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -749,6 +768,9 @@ Shader "Hidden/lilToonFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -773,6 +795,9 @@ Shader "Hidden/lilToonFur" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -808,6 +833,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -874,6 +900,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -919,6 +946,7 @@ Shader "Hidden/lilToonFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -986,6 +1014,9 @@ Shader "Hidden/lilToonFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1009,6 +1040,9 @@ Shader "Hidden/lilToonFur" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1043,6 +1077,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1117,6 +1152,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1164,6 +1200,7 @@ Shader "Hidden/lilToonFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -1244,6 +1281,7 @@ Shader "Hidden/lilToonFur" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1286,6 +1324,7 @@ Shader "Hidden/lilToonFur" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/lts_fur_cutout.shader b/Assets/lilToon/Shader/lts_fur_cutout.shader index 988ae944..692a335b 100644 --- a/Assets/lilToon/Shader/lts_fur_cutout.shader +++ b/Assets/lilToon/Shader/lts_fur_cutout.shader @@ -30,19 +30,22 @@ Shader "Hidden/lilToonFurCutout" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -72,6 +75,7 @@ Shader "Hidden/lilToonFurCutout" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -115,6 +119,7 @@ Shader "Hidden/lilToonFurCutout" [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("ZClip", Int) = 1 [lilToggle] _FurZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("ZTest", Int) = 4 [IntRange] _FurStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -165,6 +170,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -209,6 +215,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -261,7 +268,6 @@ Shader "Hidden/lilToonFurCutout" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -299,13 +305,13 @@ Shader "Hidden/lilToonFurCutout" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite Off ZTest LEqual ColorMask [_FurColorMask] Offset [_FurOffsetFactor], [_FurOffsetUnits] Blend [_FurSrcBlendFA] [_FurDstBlendFA], Zero One BlendOp [_FurBlendOpFA], [_FurBlendOpAlphaFA] - Fog { Color(0,0,0,0) } AlphaToMask [_FurAlphaToMask] HLSLPROGRAM @@ -383,6 +389,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -429,6 +436,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -490,6 +498,9 @@ Shader "Hidden/lilToonFurCutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -553,6 +564,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -598,6 +610,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -657,6 +670,9 @@ Shader "Hidden/lilToonFurCutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -727,6 +743,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -773,6 +790,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -842,6 +860,9 @@ Shader "Hidden/lilToonFurCutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -866,6 +887,9 @@ Shader "Hidden/lilToonFurCutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -901,6 +925,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -967,6 +992,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1012,6 +1038,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -1079,6 +1106,9 @@ Shader "Hidden/lilToonFurCutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1102,6 +1132,9 @@ Shader "Hidden/lilToonFurCutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1136,6 +1169,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1210,6 +1244,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1257,6 +1292,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -1338,6 +1374,7 @@ Shader "Hidden/lilToonFurCutout" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1380,6 +1417,7 @@ Shader "Hidden/lilToonFurCutout" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/lts_gem.shader b/Assets/lilToon/Shader/lts_gem.shader index b556e32b..a02d4c4e 100644 --- a/Assets/lilToon/Shader/lts_gem.shader +++ b/Assets/lilToon/Shader/lts_gem.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonGem" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -127,19 +128,22 @@ Shader "Hidden/lilToonGem" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -159,9 +163,11 @@ Shader "Hidden/lilToonGem" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -180,8 +186,10 @@ Shader "Hidden/lilToonGem" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -200,8 +208,10 @@ Shader "Hidden/lilToonGem" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -211,6 +221,7 @@ Shader "Hidden/lilToonGem" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -232,6 +243,7 @@ Shader "Hidden/lilToonGem" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -327,15 +339,19 @@ Shader "Hidden/lilToonGem" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -367,6 +383,7 @@ Shader "Hidden/lilToonGem" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("DstBlendAlpha", Int) = 10 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("BlendOp", Int) = 0 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("BlendOpAlpha", Int) = 0 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 0 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -470,6 +487,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -569,6 +587,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -629,6 +648,9 @@ Shader "Hidden/lilToonGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -732,6 +754,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -790,6 +813,9 @@ Shader "Hidden/lilToonGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -900,6 +926,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -968,6 +995,9 @@ Shader "Hidden/lilToonGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -992,6 +1022,9 @@ Shader "Hidden/lilToonGem" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1027,6 +1060,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1135,6 +1169,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1201,6 +1236,9 @@ Shader "Hidden/lilToonGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1224,6 +1262,9 @@ Shader "Hidden/lilToonGem" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1258,6 +1299,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1374,6 +1416,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1451,6 +1494,7 @@ Shader "Hidden/lilToonGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1491,6 +1535,7 @@ Shader "Hidden/lilToonGem" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/lts_o.shader b/Assets/lilToon/Shader/lts_o.shader index d84df8fd..16ac1785 100644 --- a/Assets/lilToon/Shader/lts_o.shader +++ b/Assets/lilToon/Shader/lts_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -426,6 +444,7 @@ Shader "Hidden/lilToonOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_onetrans.shader b/Assets/lilToon/Shader/lts_onetrans.shader index 29d265fa..cbf65b22 100644 --- a/Assets/lilToon/Shader/lts_onetrans.shader +++ b/Assets/lilToon/Shader/lts_onetrans.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonOnePassTransparent" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonOnePassTransparent" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonOnePassTransparent" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonOnePassTransparent" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonOnePassTransparent" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonOnePassTransparent" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonOnePassTransparent" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonOnePassTransparent" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonOnePassTransparent" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonOnePassTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_onetrans_o.shader b/Assets/lilToon/Shader/lts_onetrans_o.shader index 77c5db46..ea5ab489 100644 --- a/Assets/lilToon/Shader/lts_onetrans_o.shader +++ b/Assets/lilToon/Shader/lts_onetrans_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonOnePassTransparentOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonOnePassTransparentOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonOnePassTransparentOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonOnePassTransparentOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonOnePassTransparentOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonOnePassTransparentOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonOnePassTransparentOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonOnePassTransparentOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonOnePassTransparentOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonOnePassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -426,6 +444,7 @@ Shader "Hidden/lilToonOnePassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_overlay.shader b/Assets/lilToon/Shader/lts_overlay.shader index d5529cef..9364bbb8 100644 --- a/Assets/lilToon/Shader/lts_overlay.shader +++ b/Assets/lilToon/Shader/lts_overlay.shader @@ -87,7 +87,8 @@ Shader "_lil/[Optional] lilToonOverlay" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "_lil/[Optional] lilToonOverlay" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "_lil/[Optional] lilToonOverlay" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "_lil/[Optional] lilToonOverlay" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "_lil/[Optional] lilToonOverlay" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "_lil/[Optional] lilToonOverlay" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "_lil/[Optional] lilToonOverlay" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "_lil/[Optional] lilToonOverlay" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "_lil/[Optional] lilToonOverlay" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "_lil/[Optional] lilToonOverlay" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_overlay_one.shader b/Assets/lilToon/Shader/lts_overlay_one.shader index 31fcf0ee..975ab39e 100644 --- a/Assets/lilToon/Shader/lts_overlay_one.shader +++ b/Assets/lilToon/Shader/lts_overlay_one.shader @@ -87,7 +87,8 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_ref.shader b/Assets/lilToon/Shader/lts_ref.shader index d6bfa672..57433a40 100644 --- a/Assets/lilToon/Shader/lts_ref.shader +++ b/Assets/lilToon/Shader/lts_ref.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonRefraction" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonRefraction" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonRefraction" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonRefraction" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonRefraction" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonRefraction" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonRefraction" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonRefraction" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonRefraction" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonRefraction" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -447,6 +465,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -501,7 +520,6 @@ Shader "Hidden/lilToonRefraction" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -557,6 +575,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -621,6 +640,9 @@ Shader "Hidden/lilToonRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -687,6 +709,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -749,6 +772,9 @@ Shader "Hidden/lilToonRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -819,6 +845,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -891,6 +918,9 @@ Shader "Hidden/lilToonRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -915,6 +945,9 @@ Shader "Hidden/lilToonRefraction" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -950,6 +983,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1019,6 +1053,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1089,6 +1124,9 @@ Shader "Hidden/lilToonRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1112,6 +1150,9 @@ Shader "Hidden/lilToonRefraction" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1146,6 +1187,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1220,6 +1262,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1301,6 +1344,7 @@ Shader "Hidden/lilToonRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1340,6 +1384,7 @@ Shader "Hidden/lilToonRefraction" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/lts_ref_blur.shader b/Assets/lilToon/Shader/lts_ref_blur.shader index 53c72c39..d2616a24 100644 --- a/Assets/lilToon/Shader/lts_ref_blur.shader +++ b/Assets/lilToon/Shader/lts_ref_blur.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonRefractionBlur" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonRefractionBlur" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonRefractionBlur" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonRefractionBlur" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonRefractionBlur" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonRefractionBlur" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonRefractionBlur" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonRefractionBlur" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonRefractionBlur" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonRefractionBlur" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -487,6 +505,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -541,7 +560,6 @@ Shader "Hidden/lilToonRefractionBlur" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -597,6 +615,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -661,6 +680,9 @@ Shader "Hidden/lilToonRefractionBlur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -727,6 +749,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -789,6 +812,9 @@ Shader "Hidden/lilToonRefractionBlur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -859,6 +885,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -931,6 +958,9 @@ Shader "Hidden/lilToonRefractionBlur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -955,6 +985,9 @@ Shader "Hidden/lilToonRefractionBlur" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -990,6 +1023,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1059,6 +1093,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1129,6 +1164,9 @@ Shader "Hidden/lilToonRefractionBlur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1152,6 +1190,9 @@ Shader "Hidden/lilToonRefractionBlur" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1186,6 +1227,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1259,6 +1301,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1340,6 +1383,7 @@ Shader "Hidden/lilToonRefractionBlur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1380,6 +1424,7 @@ Shader "Hidden/lilToonRefractionBlur" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/lts_tess.shader b/Assets/lilToon/Shader/lts_tess.shader index 5787be0b..bf0bc500 100644 --- a/Assets/lilToon/Shader/lts_tess.shader +++ b/Assets/lilToon/Shader/lts_tess.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellation" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellation" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellation" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellation" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellation" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellation" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellation" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellation" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellation" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellation" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_cutout.shader b/Assets/lilToon/Shader/lts_tess_cutout.shader index 070fc0e0..56b4d642 100644 --- a/Assets/lilToon/Shader/lts_tess_cutout.shader +++ b/Assets/lilToon/Shader/lts_tess_cutout.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationCutout" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationCutout" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationCutout" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationCutout" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationCutout" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationCutout" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationCutout" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationCutout" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationCutout" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationCutout" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_cutout_o.shader b/Assets/lilToon/Shader/lts_tess_cutout_o.shader index e037c9cb..2dd63c5d 100644 --- a/Assets/lilToon/Shader/lts_tess_cutout_o.shader +++ b/Assets/lilToon/Shader/lts_tess_cutout_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationCutoutOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationCutoutOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationCutoutOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationCutoutOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationCutoutOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationCutoutOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationCutoutOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationCutoutOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationCutoutOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationCutoutOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -433,6 +451,7 @@ Shader "Hidden/lilToonTessellationCutoutOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_o.shader b/Assets/lilToon/Shader/lts_tess_o.shader index 919c36b9..31ee2381 100644 --- a/Assets/lilToon/Shader/lts_tess_o.shader +++ b/Assets/lilToon/Shader/lts_tess_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -433,6 +451,7 @@ Shader "Hidden/lilToonTessellationOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_onetrans.shader b/Assets/lilToon/Shader/lts_tess_onetrans.shader index c75f179b..939048ce 100644 --- a/Assets/lilToon/Shader/lts_tess_onetrans.shader +++ b/Assets/lilToon/Shader/lts_tess_onetrans.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_onetrans_o.shader b/Assets/lilToon/Shader/lts_tess_onetrans_o.shader index a9a31a18..e268d4d2 100644 --- a/Assets/lilToon/Shader/lts_tess_onetrans_o.shader +++ b/Assets/lilToon/Shader/lts_tess_onetrans_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -433,6 +451,7 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_trans.shader b/Assets/lilToon/Shader/lts_tess_trans.shader index 1fb8820a..2d05982d 100644 --- a/Assets/lilToon/Shader/lts_tess_trans.shader +++ b/Assets/lilToon/Shader/lts_tess_trans.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationTransparent" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationTransparent" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationTransparent" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationTransparent" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationTransparent" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationTransparent" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationTransparent" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationTransparent" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationTransparent" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_trans_o.shader b/Assets/lilToon/Shader/lts_tess_trans_o.shader index feb018e6..3c6cef52 100644 --- a/Assets/lilToon/Shader/lts_tess_trans_o.shader +++ b/Assets/lilToon/Shader/lts_tess_trans_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationTransparentOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationTransparentOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationTransparentOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationTransparentOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationTransparentOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationTransparentOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationTransparentOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationTransparentOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationTransparentOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -433,6 +451,7 @@ Shader "Hidden/lilToonTessellationTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_twotrans.shader b/Assets/lilToon/Shader/lts_tess_twotrans.shader index 9d3b71c5..de90162c 100644 --- a/Assets/lilToon/Shader/lts_tess_twotrans.shader +++ b/Assets/lilToon/Shader/lts_tess_twotrans.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_tess_twotrans_o.shader b/Assets/lilToon/Shader/lts_tess_twotrans_o.shader index 159eb23c..69806284 100644 --- a/Assets/lilToon/Shader/lts_tess_twotrans_o.shader +++ b/Assets/lilToon/Shader/lts_tess_twotrans_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -433,6 +451,7 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_trans.shader b/Assets/lilToon/Shader/lts_trans.shader index d2ef3483..de5e5b56 100644 --- a/Assets/lilToon/Shader/lts_trans.shader +++ b/Assets/lilToon/Shader/lts_trans.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTransparent" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTransparent" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTransparent" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTransparent" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTransparent" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTransparent" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTransparent" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTransparent" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTransparent" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_trans_o.shader b/Assets/lilToon/Shader/lts_trans_o.shader index 353a310d..1d7a841f 100644 --- a/Assets/lilToon/Shader/lts_trans_o.shader +++ b/Assets/lilToon/Shader/lts_trans_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTransparentOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTransparentOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTransparentOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTransparentOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTransparentOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTransparentOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTransparentOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTransparentOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTransparentOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -426,6 +444,7 @@ Shader "Hidden/lilToonTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_twotrans.shader b/Assets/lilToon/Shader/lts_twotrans.shader index 2797d3ff..611c249d 100644 --- a/Assets/lilToon/Shader/lts_twotrans.shader +++ b/Assets/lilToon/Shader/lts_twotrans.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTwoPassTransparent" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTwoPassTransparent" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTwoPassTransparent" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTwoPassTransparent" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTwoPassTransparent" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTwoPassTransparent" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTwoPassTransparent" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTwoPassTransparent" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTwoPassTransparent" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTwoPassTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/lts_twotrans_o.shader b/Assets/lilToon/Shader/lts_twotrans_o.shader index 717ceca6..15eeef0d 100644 --- a/Assets/lilToon/Shader/lts_twotrans_o.shader +++ b/Assets/lilToon/Shader/lts_twotrans_o.shader @@ -87,7 +87,8 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -128,6 +129,7 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -139,19 +141,22 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -171,9 +176,11 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -192,8 +199,10 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -212,8 +221,10 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -223,6 +234,7 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -244,6 +256,7 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -339,15 +352,19 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -385,6 +402,7 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -426,6 +444,7 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl.shader b/Assets/lilToon/Shader/ltsl.shader index db5ce65e..de34a69d 100644 --- a/Assets/lilToon/Shader/ltsl.shader +++ b/Assets/lilToon/Shader/ltsl.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLite" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_cutout.shader b/Assets/lilToon/Shader/ltsl_cutout.shader index 6ccb3e58..7f8fb108 100644 --- a/Assets/lilToon/Shader/ltsl_cutout.shader +++ b/Assets/lilToon/Shader/ltsl_cutout.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteCutout" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_cutout_o.shader b/Assets/lilToon/Shader/ltsl_cutout_o.shader index 85d4bd7d..fca34504 100644 --- a/Assets/lilToon/Shader/ltsl_cutout_o.shader +++ b/Assets/lilToon/Shader/ltsl_cutout_o.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteCutoutOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -122,6 +123,7 @@ Shader "Hidden/lilToonLiteCutoutOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_o.shader b/Assets/lilToon/Shader/ltsl_o.shader index d39ed15e..162de9ce 100644 --- a/Assets/lilToon/Shader/ltsl_o.shader +++ b/Assets/lilToon/Shader/ltsl_o.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -122,6 +123,7 @@ Shader "Hidden/lilToonLiteOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_onetrans.shader b/Assets/lilToon/Shader/ltsl_onetrans.shader index 19ed49af..230059a8 100644 --- a/Assets/lilToon/Shader/ltsl_onetrans.shader +++ b/Assets/lilToon/Shader/ltsl_onetrans.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteOnePassTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_onetrans_o.shader b/Assets/lilToon/Shader/ltsl_onetrans_o.shader index 866dce65..cfda3ab6 100644 --- a/Assets/lilToon/Shader/ltsl_onetrans_o.shader +++ b/Assets/lilToon/Shader/ltsl_onetrans_o.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteOnePassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -122,6 +123,7 @@ Shader "Hidden/lilToonLiteOnePassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_overlay.shader b/Assets/lilToon/Shader/ltsl_overlay.shader index a6841a5a..5e07f478 100644 --- a/Assets/lilToon/Shader/ltsl_overlay.shader +++ b/Assets/lilToon/Shader/ltsl_overlay.shader @@ -82,6 +82,7 @@ Shader "_lil/[Optional] lilToonLiteOverlay" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_overlay_one.shader b/Assets/lilToon/Shader/ltsl_overlay_one.shader index 03c5f1cc..a6bda2a0 100644 --- a/Assets/lilToon/Shader/ltsl_overlay_one.shader +++ b/Assets/lilToon/Shader/ltsl_overlay_one.shader @@ -82,6 +82,7 @@ Shader "_lil/[Optional] lilToonLiteOverlayOnePass" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_trans.shader b/Assets/lilToon/Shader/ltsl_trans.shader index 05612146..cd9c871e 100644 --- a/Assets/lilToon/Shader/ltsl_trans.shader +++ b/Assets/lilToon/Shader/ltsl_trans.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_trans_o.shader b/Assets/lilToon/Shader/ltsl_trans_o.shader index 58bdda1f..54cbb672 100644 --- a/Assets/lilToon/Shader/ltsl_trans_o.shader +++ b/Assets/lilToon/Shader/ltsl_trans_o.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -122,6 +123,7 @@ Shader "Hidden/lilToonLiteTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_twotrans.shader b/Assets/lilToon/Shader/ltsl_twotrans.shader index 91a327cb..9407df0a 100644 --- a/Assets/lilToon/Shader/ltsl_twotrans.shader +++ b/Assets/lilToon/Shader/ltsl_twotrans.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteTwoPassTransparent" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsl_twotrans_o.shader b/Assets/lilToon/Shader/ltsl_twotrans_o.shader index 5ed25e26..95b786e3 100644 --- a/Assets/lilToon/Shader/ltsl_twotrans_o.shader +++ b/Assets/lilToon/Shader/ltsl_twotrans_o.shader @@ -82,6 +82,7 @@ Shader "Hidden/lilToonLiteTwoPassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -122,6 +123,7 @@ Shader "Hidden/lilToonLiteTwoPassTransparentOutline" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 diff --git a/Assets/lilToon/Shader/ltsmulti.shader b/Assets/lilToon/Shader/ltsmulti.shader index a8895f37..d83a29c0 100644 --- a/Assets/lilToon/Shader/ltsmulti.shader +++ b/Assets/lilToon/Shader/ltsmulti.shader @@ -91,7 +91,8 @@ Shader "_lil/lilToonMulti" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -132,6 +133,7 @@ Shader "_lil/lilToonMulti" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -143,19 +145,22 @@ Shader "_lil/lilToonMulti" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -175,9 +180,11 @@ Shader "_lil/lilToonMulti" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -196,8 +203,10 @@ Shader "_lil/lilToonMulti" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -216,8 +225,10 @@ Shader "_lil/lilToonMulti" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -227,6 +238,7 @@ Shader "_lil/lilToonMulti" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -248,6 +260,7 @@ Shader "_lil/lilToonMulti" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -343,15 +356,19 @@ Shader "_lil/lilToonMulti" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -389,6 +406,7 @@ Shader "_lil/lilToonMulti" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -430,6 +448,7 @@ Shader "_lil/lilToonMulti" [Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _OutlineZClip ("ZClip", Int) = 1 [lilToggle] _OutlineZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2 [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -511,6 +530,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -594,6 +614,7 @@ Shader "_lil/lilToonMulti" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -660,6 +681,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -667,7 +689,6 @@ Shader "_lil/lilToonMulti" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -820,6 +841,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -908,6 +930,7 @@ Shader "_lil/lilToonMulti" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1001,6 +1024,9 @@ Shader "_lil/lilToonMulti" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1087,6 +1113,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1174,6 +1201,7 @@ Shader "_lil/lilToonMulti" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1265,6 +1293,9 @@ Shader "_lil/lilToonMulti" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1355,6 +1386,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1451,6 +1483,7 @@ Shader "_lil/lilToonMulti" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1547,6 +1580,9 @@ Shader "_lil/lilToonMulti" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1582,6 +1618,9 @@ Shader "_lil/lilToonMulti" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1628,6 +1667,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1706,6 +1746,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1801,6 +1842,7 @@ Shader "_lil/lilToonMulti" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1895,6 +1937,9 @@ Shader "_lil/lilToonMulti" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1929,6 +1974,9 @@ Shader "_lil/lilToonMulti" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1974,6 +2022,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -2057,6 +2106,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -2146,6 +2196,7 @@ Shader "_lil/lilToonMulti" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -2256,6 +2307,7 @@ Shader "_lil/lilToonMulti" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -2313,6 +2365,7 @@ Shader "_lil/lilToonMulti" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltsmulti_fur.shader b/Assets/lilToon/Shader/ltsmulti_fur.shader index 3bafca40..da59099b 100644 --- a/Assets/lilToon/Shader/ltsmulti_fur.shader +++ b/Assets/lilToon/Shader/ltsmulti_fur.shader @@ -34,19 +34,22 @@ Shader "Hidden/lilToonMultiFur" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -76,6 +79,7 @@ Shader "Hidden/lilToonMultiFur" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -119,6 +123,7 @@ Shader "Hidden/lilToonMultiFur" [Enum(UnityEngine.Rendering.BlendMode)] _FurDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _FurBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _FurZClip ("ZClip", Int) = 1 [lilToggle] _FurZWrite ("ZWrite", Int) = 0 [Enum(UnityEngine.Rendering.CompareFunction)] _FurZTest ("ZTest", Int) = 4 [IntRange] _FurStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -179,6 +184,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -233,6 +239,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -354,6 +361,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -410,6 +418,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -487,6 +496,9 @@ Shader "Hidden/lilToonMultiFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -556,6 +568,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -610,6 +623,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -684,6 +698,9 @@ Shader "Hidden/lilToonMultiFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -760,6 +777,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -817,6 +835,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -902,6 +921,9 @@ Shader "Hidden/lilToonMultiFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -932,6 +954,9 @@ Shader "Hidden/lilToonMultiFur" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -973,6 +998,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1039,6 +1065,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1095,6 +1122,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -1178,6 +1206,9 @@ Shader "Hidden/lilToonMultiFur" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1207,6 +1238,9 @@ Shader "Hidden/lilToonMultiFur" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1247,6 +1281,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1321,6 +1356,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1378,6 +1414,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_FurStencilZFail] } Cull [_FurCull] + ZClip [_FurZClip] ZWrite [_FurZWrite] ZTest [_FurZTest] ColorMask [_FurColorMask] @@ -1474,6 +1511,7 @@ Shader "Hidden/lilToonMultiFur" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1522,6 +1560,7 @@ Shader "Hidden/lilToonMultiFur" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltsmulti_gem.shader b/Assets/lilToon/Shader/ltsmulti_gem.shader index 7940d152..20250915 100644 --- a/Assets/lilToon/Shader/ltsmulti_gem.shader +++ b/Assets/lilToon/Shader/ltsmulti_gem.shader @@ -91,7 +91,8 @@ Shader "Hidden/lilToonMultiGem" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -131,19 +132,22 @@ Shader "Hidden/lilToonMultiGem" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -163,9 +167,11 @@ Shader "Hidden/lilToonMultiGem" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -184,8 +190,10 @@ Shader "Hidden/lilToonMultiGem" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -204,8 +212,10 @@ Shader "Hidden/lilToonMultiGem" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -215,6 +225,7 @@ Shader "Hidden/lilToonMultiGem" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -236,6 +247,7 @@ Shader "Hidden/lilToonMultiGem" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -331,15 +343,19 @@ Shader "Hidden/lilToonMultiGem" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -371,6 +387,7 @@ Shader "Hidden/lilToonMultiGem" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("DstBlendAlpha", Int) = 10 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("BlendOp", Int) = 0 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("BlendOpAlpha", Int) = 0 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 0 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -495,6 +512,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -676,6 +694,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -766,6 +785,9 @@ Shader "Hidden/lilToonMultiGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -883,6 +905,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -971,6 +994,9 @@ Shader "Hidden/lilToonMultiGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1095,6 +1121,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1193,6 +1220,9 @@ Shader "Hidden/lilToonMultiGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1223,6 +1253,9 @@ Shader "Hidden/lilToonMultiGem" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1264,6 +1297,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1380,6 +1414,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1476,6 +1511,9 @@ Shader "Hidden/lilToonMultiGem" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1505,6 +1543,9 @@ Shader "Hidden/lilToonMultiGem" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1545,6 +1586,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1669,6 +1711,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1776,6 +1819,7 @@ Shader "Hidden/lilToonMultiGem" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1825,6 +1869,7 @@ Shader "Hidden/lilToonMultiGem" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltsmulti_ref.shader b/Assets/lilToon/Shader/ltsmulti_ref.shader index 122ae0f2..2466c480 100644 --- a/Assets/lilToon/Shader/ltsmulti_ref.shader +++ b/Assets/lilToon/Shader/ltsmulti_ref.shader @@ -91,7 +91,8 @@ Shader "Hidden/lilToonMultiRefraction" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 //---------------------------------------------------------------------------------------------------------------------- // NormalMap @@ -132,6 +133,7 @@ Shader "Hidden/lilToonMultiRefraction" [lilToggleLeft] _UseBacklight ("Use Backlight", Int) = 0 [lilHDR] _BacklightColor ("Color", Color) = (0.85,0.8,0.7,1.0) [NoScaleOffset] _BacklightColorTex ("Texture", 2D) = "white" {} + _BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _BacklightBorder ("Border", Range(0, 1)) = 0.35 _BacklightBlur ("Blur", Range(0, 1)) = 0.05 _BacklightDirectivity ("Directivity", Float) = 5.0 @@ -143,19 +145,22 @@ Shader "Hidden/lilToonMultiRefraction" // Shadow [lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0 [lilToggle] _ShadowReceive ("Receive Shadow", Int) = 0 - _ShadowBorder ("Border", Range(0, 1)) = 0.5 - [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} - _ShadowBlur ("Blur", Range(0, 1)) = 0.1 - [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _ShadowStrength ("Strength", Range(0, 1)) = 1 [NoScaleOffset] _ShadowStrengthMask ("Strength", 2D) = "white" {} + [lilFFFF] _ShadowAOShift ("1st Scale|1st Offset|2nd Scale|2nd Offset", Vector) = (1,0,1,0) _ShadowColor ("Shadow Color", Color) = (0.7,0.75,0.85,1.0) [NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {} - _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 - _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _ShadowBorder ("Border", Range(0, 1)) = 0.5 + [NoScaleOffset] _ShadowBorderMask ("Border", 2D) = "white" {} + _ShadowBlur ("Blur", Range(0, 1)) = 0.1 + [NoScaleOffset] _ShadowBlurMask ("Blur", 2D) = "white" {} _Shadow2ndColor ("Shadow 2nd Color", Color) = (0,0,0,0) [NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {} - _ShadowMainStrength ("Main Color Strength", Range(0, 1)) = 1 + _Shadow2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 + _Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5 + _Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3 + _ShadowMainStrength ("Contrast", Range(0, 1)) = 1 _ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0 _ShadowBorderColor ("Border Color", Color) = (1,0,0,1) _ShadowBorderRange ("Border Range", Range(0, 1)) = 0 @@ -175,9 +180,11 @@ Shader "Hidden/lilToonMultiRefraction" [lilToggle] _ApplySpecular ("Apply Specular", Int) = 1 [lilToggle] _ApplySpecularFA ("Apply Specular in ForwardAdd", Int) = 1 [lilToggle] _SpecularToon ("Specular Toon", Int) = 1 + _SpecularNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _SpecularBorder ("Border", Range(0, 1)) = 0.5 _SpecularBlur ("Blur", Range(0, 1)) = 0.0 [lilToggle] _ApplyReflection ("Apply Reflection", Int) = 0 + _ReflectionNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 @@ -196,8 +203,10 @@ Shader "Hidden/lilToonMultiRefraction" _MatCapEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCapShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCapBackfaceMask ("Backface Mask", Int) = 0 + _MatCapLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCapBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCapApplyTransparency ("Apply Transparency", Int) = 1 + _MatCapNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCapCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCapBumpMap ("Normal Map", 2D) = "bump" {} _MatCapBumpScale ("Scale", Range(-10,10)) = 1 @@ -216,8 +225,10 @@ Shader "Hidden/lilToonMultiRefraction" _MatCap2ndEnableLighting ("Enable Lighting", Range(0, 1)) = 1 _MatCap2ndShadowMask ("Shadow Mask", Range(0, 1)) = 0 [lilToggle] _MatCap2ndBackfaceMask ("Backface Mask", Int) = 0 + _MatCap2ndLod ("Blur", Range(0, 10)) = 0 [lilEnum] _MatCap2ndBlendMode ("Blend Mode|Normal|Add|Screen|Multiply", Int) = 1 [lilToggle] _MatCap2ndApplyTransparency ("Apply Transparency", Int) = 1 + _MatCap2ndNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilToggle] _MatCap2ndCustomNormal ("MatCap Custom Normal Map", Int) = 0 [Normal] _MatCap2ndBumpMap ("Normal Map", 2D) = "bump" {} _MatCap2ndBumpScale ("Scale", Range(-10,10)) = 1 @@ -227,6 +238,7 @@ Shader "Hidden/lilToonMultiRefraction" [lilToggleLeft] _UseRim ("Use Rim", Int) = 0 [lilHDR] _RimColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _RimColorTex ("Texture", 2D) = "white" {} + _RimNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 _RimBorder ("Border", Range(0, 1)) = 0.5 _RimBlur ("Blur", Range(0, 1)) = 0.1 [PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0 @@ -248,6 +260,7 @@ Shader "Hidden/lilToonMultiRefraction" [lilHDR] _GlitterColor ("Color", Color) = (1,1,1,1) _GlitterColorTex ("Texture", 2D) = "white" {} _GlitterMainStrength ("Main Color Strength", Range(0, 1)) = 0 + _GlitterNormalStrength ("Normal Strength", Range(0, 1)) = 1.0 [lilGlitParam1] _GlitterParams1 ("Tiling|Particle Size|Contrast", Vector) = (256,256,0.16,50) [lilGlitParam2] _GlitterParams2 ("Blink Speed|Angle|Blend Light Direction|Color Randomness", Vector) = (0.25,0,0,0) _GlitterEnableLighting ("Enable Lighting", Range(0, 1)) = 1 @@ -343,15 +356,19 @@ Shader "Hidden/lilToonMultiRefraction" //---------------------------------------------------------------------------------------------------------------------- // AudioLink [lilToggleLeft] _UseAudioLink ("Use AudioLink", Int) = 0 - [lilALUVMode] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask", Int) = 1 + [lilFRFR] _AudioLinkDefaultValue ("Strength|Blink Strength|Blink Speed|Blink Threshold", Vector) = (0.0,0.0,2.0,0.75) + [lilEnum] _AudioLinkUVMode ("UV Mode|None|Rim|UV|Mask|Mask Spectrum|Position", Int) = 1 [lilALUVParams] _AudioLinkUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) + [lilVec3] _AudioLinkStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [NoScaleOffset] _AudioLinkMask ("Mask", 2D) = "blue" {} [lilToggle] _AudioLink2Main2nd ("Main 2nd", Int) = 0 [lilToggle] _AudioLink2Main3rd ("Main 3rd", Int) = 0 [lilToggle] _AudioLink2Emission ("Emission", Int) = 0 + [lilToggle] _AudioLink2EmissionGrad ("Emission Grad", Int) = 0 [lilToggle] _AudioLink2Emission2nd ("Emission 2nd", Int) = 0 + [lilToggle] _AudioLink2Emission2ndGrad ("Emission 2nd Grad", Int) = 0 [lilToggle] _AudioLink2Vertex ("Vertex", Int) = 0 - [lilALUVMode] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 + [lilEnum] _AudioLinkVertexUVMode ("UV Mode|None|Position|UV|Mask", Int) = 1 [lilALUVParams] _AudioLinkVertexUVParams ("Scale|Offset|Angle|Band|Bass|Low Mid|High Mid|Treble", Vector) = (0.25,0,0,0.125) [lilVec3] _AudioLinkVertexStart ("Start Position", Vector) = (0.0,0.0,0.0,0.0) [lilVec3Float] _AudioLinkVertexStrength ("Moving Vector|Normal Strength", Vector) = (0.0,0.0,0.0,1.0) @@ -389,6 +406,7 @@ Shader "Hidden/lilToonMultiRefraction" [Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4 [Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4 + [lilToggle] _ZClip ("ZClip", Int) = 1 [lilToggle] _ZWrite ("ZWrite", Int) = 1 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4 [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 @@ -480,6 +498,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -559,6 +578,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -566,7 +586,6 @@ Shader "Hidden/lilToonMultiRefraction" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -711,6 +730,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -816,6 +836,9 @@ Shader "Hidden/lilToonMultiRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -898,6 +921,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1001,6 +1025,9 @@ Shader "Hidden/lilToonMultiRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1087,6 +1114,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1200,6 +1228,9 @@ Shader "Hidden/lilToonMultiRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1231,6 +1262,9 @@ Shader "Hidden/lilToonMultiRefraction" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1273,6 +1307,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1351,6 +1386,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1462,6 +1498,9 @@ Shader "Hidden/lilToonMultiRefraction" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1492,6 +1531,9 @@ Shader "Hidden/lilToonMultiRefraction" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1533,6 +1575,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1616,6 +1659,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1738,6 +1782,7 @@ Shader "Hidden/lilToonMultiRefraction" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1788,6 +1833,7 @@ Shader "Hidden/lilToonMultiRefraction" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_baker.shader b/Assets/lilToon/Shader/ltspass_baker.shader index e5d9f1cf..3fea5443 100644 --- a/Assets/lilToon/Shader/ltspass_baker.shader +++ b/Assets/lilToon/Shader/ltspass_baker.shader @@ -48,7 +48,19 @@ Shader "Hidden/ltsother_baker" // Alpha Mask [lilEnumLabel] _AlphaMaskMode ("AlphaMask|", Int) = 0 [NoScaleOffset] _AlphaMask ("AlphaMask", 2D) = "white" {} - _AlphaMaskValue ("AlphaMaskValue", Range(-1,1)) = 0 + _AlphaMaskScale ("Scale", Float) = 1 + _AlphaMaskValue ("Offset", Float) = 0 + + //---------------------------------------------------------------------------------------------------------------------- + // Texture Packing + [NoScaleOffset] _PackingTexture1 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture2 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture3 ("Texture", 2D) = "white" {} + [NoScaleOffset] _PackingTexture4 ("Texture", 2D) = "white" {} + _PackingChannel1 ("Channel", Int) = 0 + _PackingChannel2 ("Channel", Int) = 0 + _PackingChannel3 ("Channel", Int) = 0 + _PackingChannel4 ("Channel", Int) = 0 } SubShader { @@ -58,7 +70,7 @@ Shader "Hidden/ltsother_baker" HLSLPROGRAM #pragma vertex vert #pragma fragment frag - #pragma shader_feature _ _TRIMASK _ALPHAMASK _NORMAL_DXGL + #pragma shader_feature _ _TRIMASK _ALPHAMASK _NORMAL_DXGL _TEXTURE_PACKING //------------------------------------------------------------------------------------------------------------------ // Shader @@ -67,6 +79,15 @@ Shader "Hidden/ltsother_baker" #include "Includes/lil_pipeline.hlsl" #include "Includes/lil_common_appdata.hlsl" + TEXTURE2D(_PackingTexture1); + TEXTURE2D(_PackingTexture2); + TEXTURE2D(_PackingTexture3); + TEXTURE2D(_PackingTexture4); + uint _PackingChannel1; + uint _PackingChannel2; + uint _PackingChannel3; + uint _PackingChannel4; + struct v2f { float4 positionCS : SV_POSITION; @@ -86,7 +107,7 @@ Shader "Hidden/ltsother_baker" float4 frag(v2f input) : SV_Target { - #ifdef _TRIMASK + #if defined(_TRIMASK) float4 col1 = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); float4 col2 = LIL_SAMPLE_2D(_Main2ndTex,sampler_Main2ndTex,input.uv0); float4 col3 = LIL_SAMPLE_2D(_Main3rdTex,sampler_Main3rdTex,input.uv0); @@ -94,14 +115,40 @@ Shader "Hidden/ltsother_baker" float rim = lilGray(col2.rgb); float emi = lilGray(col3.rgb); float4 col = float4(mat,rim,emi,1); - #elif _ALPHAMASK + #elif defined(_ALPHAMASK) float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); float alphaMask = LIL_SAMPLE_2D(_AlphaMask,sampler_MainTex,input.uv0).r; - alphaMask = saturate(alphaMask + _AlphaMaskValue); + alphaMask = saturate(alphaMask * _AlphaMaskScale + _AlphaMaskValue); col.a = _AlphaMaskMode == 1 ? alphaMask : col.a * alphaMask; - #elif _NORMAL_DXGL + #elif defined(_NORMAL_DXGL) float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); col.g = 1.0 - col.g; + #elif defined(_TEXTURE_PACKING) + float4 p1 = LIL_SAMPLE_2D(_PackingTexture1,sampler_linear_clamp,input.uv0); + float4 p2 = LIL_SAMPLE_2D(_PackingTexture2,sampler_linear_clamp,input.uv0); + float4 p3 = LIL_SAMPLE_2D(_PackingTexture3,sampler_linear_clamp,input.uv0); + float4 p4 = LIL_SAMPLE_2D(_PackingTexture4,sampler_linear_clamp,input.uv0); + float4 col = 1.0f; + if(_PackingChannel1 >= 4) { + col.r = dot(p1.rgb, 1.0/3.0); + } else { + col.r = p1[_PackingChannel1]; + } + if(_PackingChannel2 >= 4) { + col.g = dot(p2.rgb, 1.0/3.0); + } else { + col.g = p1[_PackingChannel2]; + } + if(_PackingChannel3 >= 4) { + col.b = dot(p3.rgb, 1.0/3.0); + } else { + col.b = p1[_PackingChannel3]; + } + if(_PackingChannel4 >= 4) { + col.a = dot(p4.rgb, 1.0/3.0); + } else { + col.a = p1[_PackingChannel4]; + } #else // Main float4 col = LIL_SAMPLE_2D(_MainTex,sampler_MainTex,input.uv0); diff --git a/Assets/lilToon/Shader/ltspass_cutout.shader b/Assets/lilToon/Shader/ltspass_cutout.shader index ccfabbce..2b5a09fb 100644 --- a/Assets/lilToon/Shader/ltspass_cutout.shader +++ b/Assets/lilToon/Shader/ltspass_cutout.shader @@ -30,6 +30,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -77,6 +78,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -122,6 +124,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -129,7 +132,6 @@ Shader "Hidden/ltspass_cutout" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -228,6 +230,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -278,6 +281,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -339,6 +343,9 @@ Shader "Hidden/ltspass_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -404,6 +411,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -453,6 +461,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -512,6 +521,9 @@ Shader "Hidden/ltspass_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -582,6 +594,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -640,6 +653,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -704,6 +718,9 @@ Shader "Hidden/ltspass_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -728,6 +745,9 @@ Shader "Hidden/ltspass_cutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -763,6 +783,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -831,6 +852,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -888,6 +910,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -950,6 +973,9 @@ Shader "Hidden/ltspass_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -973,6 +999,9 @@ Shader "Hidden/ltspass_cutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1007,6 +1036,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1080,6 +1110,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1131,6 +1162,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1209,6 +1241,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1252,6 +1285,7 @@ Shader "Hidden/ltspass_cutout" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1295,6 +1329,7 @@ Shader "Hidden/ltspass_cutout" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1335,6 +1370,7 @@ Shader "Hidden/ltspass_cutout" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_lite_cutout.shader b/Assets/lilToon/Shader/ltspass_lite_cutout.shader index 906df941..67ebde88 100644 --- a/Assets/lilToon/Shader/ltspass_lite_cutout.shader +++ b/Assets/lilToon/Shader/ltspass_lite_cutout.shader @@ -28,6 +28,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -72,6 +73,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -117,6 +119,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -124,7 +127,6 @@ Shader "Hidden/ltspass_lite_cutout" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -223,6 +225,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -269,6 +272,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -330,6 +334,9 @@ Shader "Hidden/ltspass_lite_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -391,6 +398,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -436,6 +444,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -495,6 +504,9 @@ Shader "Hidden/ltspass_lite_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -565,6 +577,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -619,6 +632,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -683,6 +697,9 @@ Shader "Hidden/ltspass_lite_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -707,6 +724,9 @@ Shader "Hidden/ltspass_lite_cutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -742,6 +762,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -806,6 +827,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -859,6 +881,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -921,6 +944,9 @@ Shader "Hidden/ltspass_lite_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -944,6 +970,9 @@ Shader "Hidden/ltspass_lite_cutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -978,6 +1007,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1051,6 +1081,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1098,6 +1129,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1176,6 +1208,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1219,6 +1252,7 @@ Shader "Hidden/ltspass_lite_cutout" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1262,6 +1296,7 @@ Shader "Hidden/ltspass_lite_cutout" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1302,6 +1337,7 @@ Shader "Hidden/ltspass_lite_cutout" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_lite_opaque.shader b/Assets/lilToon/Shader/ltspass_lite_opaque.shader index e619438d..5f081e3d 100644 --- a/Assets/lilToon/Shader/ltspass_lite_opaque.shader +++ b/Assets/lilToon/Shader/ltspass_lite_opaque.shader @@ -28,6 +28,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -72,6 +73,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -117,6 +119,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -124,7 +127,6 @@ Shader "Hidden/ltspass_lite_opaque" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -223,6 +225,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -269,6 +272,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -330,6 +334,9 @@ Shader "Hidden/ltspass_lite_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -391,6 +398,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -436,6 +444,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -495,6 +504,9 @@ Shader "Hidden/ltspass_lite_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -565,6 +577,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -619,6 +632,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -683,6 +697,9 @@ Shader "Hidden/ltspass_lite_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -707,6 +724,9 @@ Shader "Hidden/ltspass_lite_opaque" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -742,6 +762,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -806,6 +827,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -859,6 +881,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -921,6 +944,9 @@ Shader "Hidden/ltspass_lite_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -944,6 +970,9 @@ Shader "Hidden/ltspass_lite_opaque" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -978,6 +1007,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1051,6 +1081,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1098,6 +1129,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1176,6 +1208,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1219,6 +1252,7 @@ Shader "Hidden/ltspass_lite_opaque" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1262,6 +1296,7 @@ Shader "Hidden/ltspass_lite_opaque" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1302,6 +1337,7 @@ Shader "Hidden/ltspass_lite_opaque" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_lite_transparent.shader b/Assets/lilToon/Shader/ltspass_lite_transparent.shader index 8e72094a..a7c27418 100644 --- a/Assets/lilToon/Shader/ltspass_lite_transparent.shader +++ b/Assets/lilToon/Shader/ltspass_lite_transparent.shader @@ -28,6 +28,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull Front + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -72,6 +73,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -116,6 +118,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -161,6 +164,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -168,7 +172,6 @@ Shader "Hidden/ltspass_lite_transparent" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -267,6 +270,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -313,6 +317,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -374,6 +379,9 @@ Shader "Hidden/ltspass_lite_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -435,6 +443,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -480,6 +489,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -539,6 +549,9 @@ Shader "Hidden/ltspass_lite_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -609,6 +622,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -663,6 +677,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -727,6 +742,9 @@ Shader "Hidden/ltspass_lite_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -751,6 +769,9 @@ Shader "Hidden/ltspass_lite_transparent" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -786,6 +807,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -850,6 +872,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -903,6 +926,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -965,6 +989,9 @@ Shader "Hidden/ltspass_lite_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -988,6 +1015,9 @@ Shader "Hidden/ltspass_lite_transparent" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1022,6 +1052,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1095,6 +1126,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1142,6 +1174,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1220,6 +1253,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1263,6 +1297,7 @@ Shader "Hidden/ltspass_lite_transparent" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1306,6 +1341,7 @@ Shader "Hidden/ltspass_lite_transparent" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1346,6 +1382,7 @@ Shader "Hidden/ltspass_lite_transparent" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_opaque.shader b/Assets/lilToon/Shader/ltspass_opaque.shader index 481723aa..0f30d698 100644 --- a/Assets/lilToon/Shader/ltspass_opaque.shader +++ b/Assets/lilToon/Shader/ltspass_opaque.shader @@ -30,6 +30,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -77,6 +78,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -122,6 +124,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -129,7 +132,6 @@ Shader "Hidden/ltspass_opaque" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -228,6 +230,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -278,6 +281,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -339,6 +343,9 @@ Shader "Hidden/ltspass_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -404,6 +411,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -453,6 +461,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -512,6 +521,9 @@ Shader "Hidden/ltspass_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -582,6 +594,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -640,6 +653,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -704,6 +718,9 @@ Shader "Hidden/ltspass_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -728,6 +745,9 @@ Shader "Hidden/ltspass_opaque" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -763,6 +783,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -831,6 +852,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -888,6 +910,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -950,6 +973,9 @@ Shader "Hidden/ltspass_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -973,6 +999,9 @@ Shader "Hidden/ltspass_opaque" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1007,6 +1036,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1080,6 +1110,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1131,6 +1162,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1209,6 +1241,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1252,6 +1285,7 @@ Shader "Hidden/ltspass_opaque" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1295,6 +1329,7 @@ Shader "Hidden/ltspass_opaque" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1335,6 +1370,7 @@ Shader "Hidden/ltspass_opaque" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_tess_cutout.shader b/Assets/lilToon/Shader/ltspass_tess_cutout.shader index 14647fb2..ca63ba06 100644 --- a/Assets/lilToon/Shader/ltspass_tess_cutout.shader +++ b/Assets/lilToon/Shader/ltspass_tess_cutout.shader @@ -28,6 +28,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -46,7 +47,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fwdbase - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest #pragma skip_variants DIRLIGHTMAP_COMBINED @@ -79,6 +80,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -97,7 +99,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fwdbase - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest #pragma skip_variants SHADOWS_SCREEN DIRLIGHTMAP_COMBINED @@ -128,6 +130,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -135,7 +138,6 @@ Shader "Hidden/ltspass_tess_cutout" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -147,7 +149,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fragment POINT DIRECTIONAL SPOT POINT_COOKIE DIRECTIONAL_COOKIE - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest @@ -234,6 +236,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -255,7 +258,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma multi_compile _ DOTS_INSTANCING_ON @@ -287,6 +290,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -308,7 +312,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma multi_compile _ DOTS_INSTANCING_ON @@ -351,6 +355,9 @@ Shader "Hidden/ltspass_tess_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -412,6 +419,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -433,7 +441,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing // Skip receiving shadow @@ -464,6 +472,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -485,7 +494,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing //---------------------------------------------------------------------------------------------------------------------- @@ -526,6 +535,9 @@ Shader "Hidden/ltspass_tess_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -593,6 +605,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -621,7 +634,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile_fragment _ SHADOWS_SHADOWMASK #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile _ DOTS_INSTANCING_ON @@ -654,6 +667,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -677,7 +691,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile _ _CLUSTERED_RENDERING #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile _ DOTS_INSTANCING_ON @@ -721,6 +735,9 @@ Shader "Hidden/ltspass_tess_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -745,6 +762,9 @@ Shader "Hidden/ltspass_tess_cutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -780,6 +800,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -844,6 +865,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -872,7 +894,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile_fragment _ SHADOWS_SHADOWMASK #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -904,6 +926,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -927,7 +950,7 @@ Shader "Hidden/ltspass_tess_cutout" #pragma multi_compile _ _CLUSTERED_RENDERING #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -969,6 +992,9 @@ Shader "Hidden/ltspass_tess_cutout" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -992,6 +1018,9 @@ Shader "Hidden/ltspass_tess_cutout" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1026,6 +1055,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1096,6 +1126,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1150,6 +1181,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1231,6 +1263,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1277,6 +1310,7 @@ Shader "Hidden/ltspass_tess_cutout" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1323,6 +1357,7 @@ Shader "Hidden/ltspass_tess_cutout" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1366,6 +1401,7 @@ Shader "Hidden/ltspass_tess_cutout" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_tess_opaque.shader b/Assets/lilToon/Shader/ltspass_tess_opaque.shader index cd83babd..cc94a761 100644 --- a/Assets/lilToon/Shader/ltspass_tess_opaque.shader +++ b/Assets/lilToon/Shader/ltspass_tess_opaque.shader @@ -28,6 +28,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -46,7 +47,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fwdbase - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest #pragma skip_variants DIRLIGHTMAP_COMBINED @@ -79,6 +80,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -97,7 +99,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fwdbase - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest #pragma skip_variants SHADOWS_SCREEN DIRLIGHTMAP_COMBINED @@ -128,6 +130,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -135,7 +138,6 @@ Shader "Hidden/ltspass_tess_opaque" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -147,7 +149,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fragment POINT DIRECTIONAL SPOT POINT_COOKIE DIRECTIONAL_COOKIE - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest @@ -233,6 +235,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -254,7 +257,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma multi_compile _ DOTS_INSTANCING_ON @@ -286,6 +289,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -307,7 +311,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma multi_compile _ DOTS_INSTANCING_ON @@ -350,6 +354,9 @@ Shader "Hidden/ltspass_tess_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -411,6 +418,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -432,7 +440,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing // Skip receiving shadow @@ -463,6 +471,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -484,7 +493,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing //---------------------------------------------------------------------------------------------------------------------- @@ -525,6 +534,9 @@ Shader "Hidden/ltspass_tess_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -592,6 +604,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -620,7 +633,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile_fragment _ SHADOWS_SHADOWMASK #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile _ DOTS_INSTANCING_ON @@ -653,6 +666,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -676,7 +690,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile _ _CLUSTERED_RENDERING #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile _ DOTS_INSTANCING_ON @@ -720,6 +734,9 @@ Shader "Hidden/ltspass_tess_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -744,6 +761,9 @@ Shader "Hidden/ltspass_tess_opaque" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -779,6 +799,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -843,6 +864,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -871,7 +893,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile_fragment _ SHADOWS_SHADOWMASK #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -903,6 +925,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -926,7 +949,7 @@ Shader "Hidden/ltspass_tess_opaque" #pragma multi_compile _ _CLUSTERED_RENDERING #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -968,6 +991,9 @@ Shader "Hidden/ltspass_tess_opaque" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -991,6 +1017,9 @@ Shader "Hidden/ltspass_tess_opaque" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1025,6 +1054,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1095,6 +1125,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1149,6 +1180,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1230,6 +1262,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1276,6 +1309,7 @@ Shader "Hidden/ltspass_tess_opaque" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1322,6 +1356,7 @@ Shader "Hidden/ltspass_tess_opaque" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1365,6 +1400,7 @@ Shader "Hidden/ltspass_tess_opaque" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_tess_transparent.shader b/Assets/lilToon/Shader/ltspass_tess_transparent.shader index 5b4c5227..e712a83f 100644 --- a/Assets/lilToon/Shader/ltspass_tess_transparent.shader +++ b/Assets/lilToon/Shader/ltspass_tess_transparent.shader @@ -28,6 +28,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull Front + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -46,7 +47,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fwdbase - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest #pragma skip_variants DIRLIGHTMAP_COMBINED @@ -79,6 +80,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -97,7 +99,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fwdbase - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest #pragma skip_variants DIRLIGHTMAP_COMBINED @@ -130,6 +132,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -148,7 +151,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fwdbase - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest #pragma skip_variants SHADOWS_SCREEN DIRLIGHTMAP_COMBINED @@ -179,6 +182,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -186,7 +190,6 @@ Shader "Hidden/ltspass_tess_transparent" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -198,7 +201,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma domain domain #pragma require tesshw tessellation #pragma multi_compile_fragment POINT DIRECTIONAL SPOT POINT_COOKIE DIRECTIONAL_COOKIE - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma fragmentoption ARB_precision_hint_fastest @@ -285,6 +288,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -306,7 +310,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma multi_compile _ DOTS_INSTANCING_ON @@ -338,6 +342,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -359,7 +364,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma multi_compile _ DOTS_INSTANCING_ON @@ -402,6 +407,9 @@ Shader "Hidden/ltspass_tess_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -463,6 +471,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -484,7 +493,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing // Skip receiving shadow @@ -515,6 +524,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -536,7 +546,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile_fragment _ LIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing //---------------------------------------------------------------------------------------------------------------------- @@ -577,6 +587,9 @@ Shader "Hidden/ltspass_tess_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -644,6 +657,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -672,7 +686,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile_fragment _ SHADOWS_SHADOWMASK #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile _ DOTS_INSTANCING_ON @@ -705,6 +719,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -728,7 +743,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile _ _CLUSTERED_RENDERING #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile _ DOTS_INSTANCING_ON @@ -772,6 +787,9 @@ Shader "Hidden/ltspass_tess_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -796,6 +814,9 @@ Shader "Hidden/ltspass_tess_transparent" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -831,6 +852,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -895,6 +917,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -923,7 +946,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile_fragment _ SHADOWS_SHADOWMASK #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -955,6 +978,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -978,7 +1002,7 @@ Shader "Hidden/ltspass_tess_transparent" #pragma multi_compile _ _CLUSTERED_RENDERING #pragma multi_compile_fragment _ LIGHTMAP_ON #pragma multi_compile_fragment _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2 + #pragma multi_compile_domain _ FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -1020,6 +1044,9 @@ Shader "Hidden/ltspass_tess_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1043,6 +1070,9 @@ Shader "Hidden/ltspass_tess_transparent" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1077,6 +1107,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1147,6 +1178,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1201,6 +1233,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1282,6 +1315,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1328,6 +1362,7 @@ Shader "Hidden/ltspass_tess_transparent" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1374,6 +1409,7 @@ Shader "Hidden/ltspass_tess_transparent" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1417,6 +1453,7 @@ Shader "Hidden/ltspass_tess_transparent" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Shader/ltspass_transparent.shader b/Assets/lilToon/Shader/ltspass_transparent.shader index b8e94567..46f0a9d4 100644 --- a/Assets/lilToon/Shader/ltspass_transparent.shader +++ b/Assets/lilToon/Shader/ltspass_transparent.shader @@ -30,6 +30,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull Front + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -77,6 +78,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -124,6 +126,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -169,6 +172,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite Off ZTest LEqual ColorMask [_ColorMask] @@ -176,7 +180,6 @@ Shader "Hidden/ltspass_transparent" Blend [_SrcBlendFA] [_DstBlendFA], Zero One BlendOp [_BlendOpFA], [_BlendOpAlphaFA] AlphaToMask [_AlphaToMask] - Fog { Color(0,0,0,0) } HLSLPROGRAM @@ -275,6 +278,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -325,6 +329,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -386,6 +391,9 @@ Shader "Hidden/ltspass_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -451,6 +459,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -500,6 +509,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -559,6 +569,9 @@ Shader "Hidden/ltspass_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -629,6 +642,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -687,6 +701,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -751,6 +766,9 @@ Shader "Hidden/ltspass_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -775,6 +793,9 @@ Shader "Hidden/ltspass_transparent" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -810,6 +831,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -878,6 +900,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -935,6 +958,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -997,6 +1021,9 @@ Shader "Hidden/ltspass_transparent" Name "DEPTHONLY" Tags {"LightMode" = "DepthOnly"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1020,6 +1047,9 @@ Shader "Hidden/ltspass_transparent" Name "DEPTHNORMALS" Tags {"LightMode" = "DepthNormals"} Cull [_Cull] + ZClip [_ZClip] + ZWrite [_ZWrite] + ZTest [_ZTest] HLSLPROGRAM @@ -1054,6 +1084,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1127,6 +1158,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] ColorMask [_ColorMask] @@ -1178,6 +1210,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_OutlineStencilZFail] } Cull [_OutlineCull] + ZClip [_OutlineZClip] ZWrite [_OutlineZWrite] ZTest [_OutlineZTest] ColorMask [_OutlineColorMask] @@ -1256,6 +1289,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1299,6 +1333,7 @@ Shader "Hidden/ltspass_transparent" ZFail [_StencilZFail] } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1342,6 +1377,7 @@ Shader "Hidden/ltspass_transparent" Pass Replace } Cull [_Cull] + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] @@ -1382,6 +1418,7 @@ Shader "Hidden/ltspass_transparent" Pass Replace } Cull Back + ZClip [_ZClip] ZWrite [_ZWrite] ZTest [_ZTest] Offset [_OffsetFactor], [_OffsetUnits] diff --git a/Assets/lilToon/Third Party Notices.md b/Assets/lilToon/Third Party Notices.md index b1ec42fa..364e0118 100644 --- a/Assets/lilToon/Third Party Notices.md +++ b/Assets/lilToon/Third Party Notices.md @@ -146,5 +146,6 @@ SOFTWARE. - [Physically Based Rendering in Filament](https://google.github.io/filament/Filament.html) - [Optimized inverse trigonometric function (seblagarde)](https://seblagarde.wordpress.com/2014/12/01/inverse-trigonometric-functions-gpu-optimization-for-amd-gcn-architecture/) - [視差オクルージョンマッピング(parallax occlution mapping) (コポコポ)](https://coposuke.hateblo.jp/entry/2019/01/20/043042) +- [Udon AudioLink](https://github.com/llealloo/vrc-udon-audio-link) - [sRGB Approximations for HLSL](http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html?m=1) - [『崩壊3rd』開発者が語るアニメ風レンダリングの極意](https://learning.unity3d.jp/570/) \ No newline at end of file diff --git a/Assets/lilToon/package.json b/Assets/lilToon/package.json index e1475916..5422396f 100644 --- a/Assets/lilToon/package.json +++ b/Assets/lilToon/package.json @@ -1,7 +1,7 @@ { "name": "jp.lilxyzw.liltoon", "displayName": "lilToon", - "version": "1.2.5", + "version": "1.2.6", "unity": "2017.1", "description": "Feature-rich toon shader.", "keywords": ["Toon", "Shader", "Material"], diff --git a/version.json b/version.json index 27478f2c..20faa3a1 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{"latest_vertion_name": "1.2.5", "latest_vertion_value": 18} \ No newline at end of file +{"latest_vertion_name": "1.2.6", "latest_vertion_value": 19} \ No newline at end of file