From c3000792bc47c3c2aebc53600b87c6230d07dff8 Mon Sep 17 00:00:00 2001 From: lilxyzw Date: Fri, 4 Feb 2022 18:13:14 +0900 Subject: [PATCH] 1.2.9 --- Assets/lilToon/CHANGELOG.md | 14 +- Assets/lilToon/CHANGELOG_JP.md | 14 +- Assets/lilToon/Editor/Resources/lang.txt | 3 +- Assets/lilToon/Editor/lilInspector.cs | 229 ++++++++++++------ Assets/lilToon/Editor/lilToonEditorUtils.cs | 4 +- Assets/lilToon/README.md | 2 +- Assets/lilToon/README_JP.md | 2 +- ...tom Pass Shader-custom_ltsmulti.shader.txt | 4 + .../Shader/Includes/lil_common_frag.hlsl | 2 +- .../Shader/Includes/lil_common_functions.hlsl | 22 ++ .../Shader/Includes/lil_common_input.hlsl | 17 ++ .../Shader/Includes/lil_common_macro.hlsl | 35 ++- Assets/lilToon/Shader/lts.shader | 4 + Assets/lilToon/Shader/lts_cutout.shader | 4 + Assets/lilToon/Shader/lts_cutout_o.shader | 4 + Assets/lilToon/Shader/lts_cutout_oo.shader | 4 + Assets/lilToon/Shader/lts_fur.shader | 4 + Assets/lilToon/Shader/lts_fur_cutout.shader | 4 + Assets/lilToon/Shader/lts_fur_two.shader | 4 + Assets/lilToon/Shader/lts_furonly.shader | 4 + .../lilToon/Shader/lts_furonly_cutout.shader | 4 + Assets/lilToon/Shader/lts_furonly_two.shader | 4 + Assets/lilToon/Shader/lts_gem.shader | 4 + Assets/lilToon/Shader/lts_o.shader | 4 + Assets/lilToon/Shader/lts_onetrans.shader | 4 + Assets/lilToon/Shader/lts_onetrans_o.shader | 4 + Assets/lilToon/Shader/lts_oo.shader | 4 + Assets/lilToon/Shader/lts_overlay.shader | 4 + Assets/lilToon/Shader/lts_overlay_one.shader | 4 + Assets/lilToon/Shader/lts_ref.shader | 4 + Assets/lilToon/Shader/lts_ref_blur.shader | 4 + Assets/lilToon/Shader/lts_tess.shader | 4 + Assets/lilToon/Shader/lts_tess_cutout.shader | 4 + .../lilToon/Shader/lts_tess_cutout_o.shader | 4 + Assets/lilToon/Shader/lts_tess_o.shader | 4 + .../lilToon/Shader/lts_tess_onetrans.shader | 4 + .../lilToon/Shader/lts_tess_onetrans_o.shader | 4 + Assets/lilToon/Shader/lts_tess_trans.shader | 4 + Assets/lilToon/Shader/lts_tess_trans_o.shader | 4 + .../lilToon/Shader/lts_tess_twotrans.shader | 4 + .../lilToon/Shader/lts_tess_twotrans_o.shader | 4 + Assets/lilToon/Shader/lts_trans.shader | 4 + Assets/lilToon/Shader/lts_trans_o.shader | 4 + Assets/lilToon/Shader/lts_trans_oo.shader | 4 + Assets/lilToon/Shader/lts_twotrans.shader | 4 + Assets/lilToon/Shader/lts_twotrans_o.shader | 4 + Assets/lilToon/Shader/ltsmulti.shader | 4 + Assets/lilToon/Shader/ltsmulti_fur.shader | 4 + Assets/lilToon/Shader/ltsmulti_gem.shader | 4 + Assets/lilToon/Shader/ltsmulti_o.shader | 4 + Assets/lilToon/Shader/ltsmulti_ref.shader | 4 + Assets/lilToon/package.json | 2 +- version.json | 2 +- 53 files changed, 425 insertions(+), 83 deletions(-) diff --git a/Assets/lilToon/CHANGELOG.md b/Assets/lilToon/CHANGELOG.md index a52f93f8..5c75a1e3 100644 --- a/Assets/lilToon/CHANGELOG.md +++ b/Assets/lilToon/CHANGELOG.md @@ -4,7 +4,19 @@ 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.8] - 2022-1-30 +## [1.2.9] - 2022-02-04 +### Added +- Added cubemap fallback / override +- Added preset button to MatCap UV settings + +### Changed +- Moved shader settings to tab + +### Fixed +- Fixed an issue where `Fix lighting` wasn't showing up in the right-click menu +- Fixed refraction shader getting too bright in ForwardAdd + +## [1.2.8] - 2022-01-30 ### Added - 3rd shadow - `Randomize` property for fur diff --git a/Assets/lilToon/CHANGELOG_JP.md b/Assets/lilToon/CHANGELOG_JP.md index 53d182e5..d4c15241 100644 --- a/Assets/lilToon/CHANGELOG_JP.md +++ b/Assets/lilToon/CHANGELOG_JP.md @@ -4,7 +4,19 @@ 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.8] - 2022-1-30 +## [1.2.9] - 2022-02-04 +### 追加 +- Cubemapのフォールバック・オーバーライド機能を追加 +- MatCapのUV設定に一括設定ボタンを追加 + +### 変更 +- シェーダー設定をタブとして再配置 + +### 修正 +- `Fix lighting`が右クリックメニューに表示されていなかった問題を修正 +- 屈折シェーダーがForwardAddで明るくなりすぎていたのを修正 + +## [1.2.8] - 2022-01-30 ### 追加 - 3影を追加 - ファーに`ランダム化`プロパティを追加 diff --git a/Assets/lilToon/Editor/Resources/lang.txt b/Assets/lilToon/Editor/Resources/lang.txt index 23c0f239..4292f71d 100644 --- a/Assets/lilToon/Editor/Resources/lang.txt +++ b/Assets/lilToon/Editor/Resources/lang.txt @@ -4,6 +4,7 @@ sEditorMode Editor Mode 編集モード 편집 모드 编辑器模式 編輯器 sEditorModeSimple Simple 簡易設定 간이 설정 简单设置 簡單設置 sEditorModeAdvanced Advanced 詳細設定 상세 설정 详细设置 詳細設置 sEditorModePreset Preset プリセット 프리셋 预设 預設 +sEditorModeShaderSetting Shader Setting シェーダー設定 쉐이더 설정 着色器设置 著色器設置 sHelpSimple In this mode, you can easily edit the appearance. 簡単に見た目を編集するモードです。 간단하게 외형을 편집하는 모드입니다. 这种模式进行简单的设置。 這種模式進行簡單的設置。 sHelpAdvanced In this mode, you can make detailed settings for the material. 詳細設定を行うモードです。 상세 설정을 실시하는 모드입니다. 此模式用于进行详细设置。 此模式用於進行詳細設置。 sHelpPreset In this mode, you can easily set up materials from presets. プリセットから一括で設定するモードです。 프리셋에서 일괄로 설정하는 모드입니다. 在这个模式下,你可以很容易地从预设中设置材料。 在這個模式下,你可以很容易地從預設中設置材料。 @@ -494,7 +495,7 @@ sSettingTexFurLength Fur Length Mask ファー長さマスク 퍼 길이 마스 sSettingFurCollision Fur Collision ファー当たり判定 퍼 충돌 毛皮碰撞 毛皮碰撞 sSettingTessellation Tessellation (Extremely high load) テッセレーション (非常に高負荷) 테셀레이션 (매우 높음) Tessellation (极高的负荷) Tessellation (極高的負荷) sSettingDefaultValue Default Value (used for "Fix Lighting" and lighting presets) 初期値 (Fix Lightingやライティングプリセットに使用) 초기값 (Fix Lighting이나 라이팅 프리셋에 사용) 初始值 (用于Fix Lighting或照明预设) 初始值 (用於Fix Lighting或照明預設) -sSettingBuildSizeOptimization Build size optimization ビルドサイズの最適化 빌드 사이즈 최적화 优化构建大小 優化構建大小 +sSettingBuildSizeOptimization Build size optimization (for all materials) ビルドサイズの最適化 (全マテリアル共通) 빌드 사이즈 최적화 (전체 재료 공통) 优化构建大小(用于所有材质) 優化構建大小(用於所有材質) sSettingApplyShadowFA Enable shadow in ForwardAdd ForwardAddパスで影を有効化 ForwardAdd로 그림자 활성화 通过ForwardAdd启用阴影 通過ForwardAdd啟用陰影 sSettingUseForwardAdd Use ForwardAdd ForwardAddパスを使用 ForwardAdd 사용 使用ForwardAdd 使用ForwardAdd sSettingUseVertexLight Use vertex light 頂点ライトを使用 꼭지점 라이트 사용 使用顶点灯 使用頂點燈 diff --git a/Assets/lilToon/Editor/lilInspector.cs b/Assets/lilToon/Editor/lilInspector.cs index 1159537f..031a47cf 100644 --- a/Assets/lilToon/Editor/lilInspector.cs +++ b/Assets/lilToon/Editor/lilInspector.cs @@ -50,7 +50,8 @@ public enum EditorMode { Simple, Advanced, - Preset + Preset, + Settings } public enum RenderingMode @@ -150,8 +151,8 @@ public enum lilLightingPreset //------------------------------------------------------------------------------------------------------------------------------ // Constant #region - public const string currentVersionName = "1.2.8"; - public const int currentVersionValue = 21; + public const string currentVersionName = "1.2.9"; + public const int currentVersionValue = 22; private const string boothURL = "https://lilxyzw.booth.pm/"; private const string githubURL = "https://github.com/lilxyzw/lilToon"; @@ -424,6 +425,8 @@ public class lilToonEditorSetting public bool isShowHelpPages = false; public bool isShowLightingSettings = false; public bool isShowShaderSetting = false; + public bool isShowOptimizationSetting = false; + public bool isShowDefaultValueSetting = 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}; @@ -717,6 +720,10 @@ public struct lilPropertyBlockData private MaterialProperty applyReflection; private MaterialProperty reflectionNormalStrength; private MaterialProperty reflectionApplyTransparency; + private MaterialProperty reflectionCubeTex; + private MaterialProperty reflectionCubeColor; + private MaterialProperty reflectionCubeOverride; + private MaterialProperty reflectionCubeEnableLighting; private MaterialProperty useMatCap; private MaterialProperty matcapTex; private MaterialProperty matcapColor; @@ -2374,6 +2381,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro { EditorGUI.indentLevel++; m_MaterialEditor.ShaderProperty(reflectionNormalStrength, GetLoc("sNormalStrength")); + m_MaterialEditor.TexturePropertySingleLine(new GUIContent("Cubemap Fallback"), reflectionCubeTex, reflectionCubeColor); + m_MaterialEditor.ShaderProperty(reflectionCubeOverride, "Override"); + m_MaterialEditor.ShaderProperty(reflectionCubeEnableLighting, GetLoc("sEnableLighting") + " (Fallback)"); EditorGUI.indentLevel--; } if(isTransparent) m_MaterialEditor.ShaderProperty(reflectionApplyTransparency, GetLoc("sApplyTransparency")); @@ -2609,6 +2619,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro if(shaderSetting.LIL_FEATURE_TEX_REFLECTION_SMOOTHNESS) m_MaterialEditor.TexturePropertySingleLine(smoothnessContent, smoothnessTex, smoothness); else m_MaterialEditor.ShaderProperty(smoothness, GetLoc("sSmoothness")); m_MaterialEditor.ShaderProperty(reflectance, GetLoc("sReflectance")); + m_MaterialEditor.TexturePropertySingleLine(new GUIContent("Cubemap Fallback"), reflectionCubeTex, reflectionCubeColor); + m_MaterialEditor.ShaderProperty(reflectionCubeOverride, "Override"); + m_MaterialEditor.ShaderProperty(reflectionCubeEnableLighting, GetLoc("sEnableLighting") + " (Fallback)"); EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); } @@ -3206,29 +3219,6 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); } - - //------------------------------------------------------------------------------------------------------------------------------ - // Shader Setting - if(!isMulti) - { - edSet.isShowShaderSetting = Foldout(GetLoc("sShaderSetting"), edSet.isShowShaderSetting); - DrawHelpButton(GetLoc("sAnchorShaderSetting")); - if(edSet.isShowShaderSetting) - { - EditorGUILayout.BeginVertical(boxOuter); - EditorGUILayout.LabelField(GetLoc("sShaderSetting"), customToggleFont); - EditorGUILayout.BeginVertical(boxInnerHalf); - EditorGUILayout.HelpBox(GetLoc("sHelpShaderSetting"),MessageType.Info); - ShaderSettingGUI(); - EditorGUILayout.EndVertical(); - EditorGUILayout.EndVertical(); - } - else if(edSet.isShaderSettingChanged) - { - ApplyShaderSetting(shaderSetting); - edSet.isShaderSettingChanged = false; - } - } } } @@ -3240,6 +3230,60 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro else DrawPreset(material); } + //------------------------------------------------------------------------------------------------------------------------------ + // Shader Setting + if(edSet.editorMode == EditorMode.Settings) + { + GUIStyle applyButton = new GUIStyle(GUI.skin.button); + applyButton.normal.textColor = Color.red; + applyButton.fontStyle = FontStyle.Bold; + + EditorGUILayout.HelpBox(GetLoc("sHelpShaderSetting"),MessageType.Info); + + EditorGUILayout.BeginVertical(customBox); + EditorGUI.BeginChangeCheck(); + ToggleGUI(GetLoc("sSettingCancelAutoScan"), ref shaderSetting.shouldNotScan); + ToggleGUI(GetLoc("sSettingLock"), ref shaderSetting.isLocked); + if(EditorGUI.EndChangeCheck() || edSet.isShaderSettingChanged && GUILayout.Button(GetLoc("sSettingApply"), applyButton)) + { + ApplyShaderSetting(shaderSetting); + edSet.isShaderSettingChanged = false; + } + EditorGUILayout.EndVertical(); + + GUI.enabled = !shaderSetting.isLocked; + edSet.isShowShaderSetting = Foldout(GetLoc("sShaderSetting"), edSet.isShowShaderSetting); + DrawHelpButton(GetLoc("sAnchorShaderSetting")); + if(edSet.isShowShaderSetting) + { + EditorGUILayout.BeginVertical(customBox); + ShaderSettingGUI(); + EditorGUILayout.EndVertical(); + } + + edSet.isShowOptimizationSetting = Foldout(GetLoc("sSettingBuildSizeOptimization"), edSet.isShowOptimizationSetting); + if(edSet.isShowOptimizationSetting) + { + EditorGUILayout.BeginVertical(customBox); + OptimizationSettingGUI(); + EditorGUILayout.EndVertical(); + } + + edSet.isShowDefaultValueSetting = Foldout(GetLoc("sSettingDefaultValue"), edSet.isShowDefaultValueSetting); + if(edSet.isShowDefaultValueSetting) + { + EditorGUILayout.BeginVertical(customBox); + DefaultValueSettingGUI(); + EditorGUILayout.EndVertical(); + } + GUI.enabled = true; + } + else if(edSet.isShaderSettingChanged) + { + ApplyShaderSetting(shaderSetting); + edSet.isShaderSettingChanged = false; + } + if(EditorGUI.EndChangeCheck()) { if(isMulti) @@ -3511,6 +3555,10 @@ private void LoadProperties(MaterialProperty[] props) applyReflection = FindProperty("_ApplyReflection", props, false); reflectionNormalStrength = FindProperty("_ReflectionNormalStrength", props, false); reflectionApplyTransparency = FindProperty("_ReflectionApplyTransparency", props, false); + reflectionCubeTex = FindProperty("_ReflectionCubeTex", props, false); + reflectionCubeColor = FindProperty("_ReflectionCubeColor", props, false); + reflectionCubeOverride = FindProperty("_ReflectionCubeOverride", props, false); + reflectionCubeEnableLighting = FindProperty("_ReflectionCubeEnableLighting", props, false); // MatCap useMatCap = FindProperty("_UseMatCap", props, false); @@ -4376,23 +4424,6 @@ public static void CopyShaderSetting(ref lilToonSetting ssA, lilToonSetting ssB) private static void ShaderSettingGUI() { - GUIStyle applyButton = new GUIStyle(GUI.skin.button); - applyButton.normal.textColor = Color.red; - applyButton.fontStyle = FontStyle.Bold; - lilRenderPipeline lilRP = CheckRP(); - - ToggleGUI(GetLoc("sSettingCancelAutoScan"), ref shaderSetting.shouldNotScan); - ToggleGUI(GetLoc("sSettingLock"), ref shaderSetting.isLocked); - GUI.enabled = !shaderSetting.isLocked; - - // Apply Button - if(edSet.isShaderSettingChanged && GUILayout.Button(GetLoc("sSettingApply"), applyButton)) - { - ApplyShaderSetting(shaderSetting); - edSet.isShaderSettingChanged = false; - } - DrawLine(); - EditorGUI.BeginChangeCheck(); ToggleGUI(GetLoc("sSettingAnimateMainUV"), ref shaderSetting.LIL_FEATURE_ANIMATE_MAIN_UV); @@ -4576,34 +4607,44 @@ private static void ShaderSettingGUI() ToggleGUI(GetLoc("sSettingTessellation"), ref shaderSetting.LIL_FEATURE_TEX_TESSELLATION); - DrawLine(); + if(EditorGUI.EndChangeCheck()) + { + edSet.isShaderSettingChanged = true; + } + } - EditorGUILayout.LabelField(GetLoc("sSettingBuildSizeOptimization"), boldLabel); - EditorGUI.indentLevel++; - if(lilRP == lilRenderPipeline.BRP) - { - ToggleGUI(GetLoc("sSettingApplyShadowFA"), ref shaderSetting.LIL_OPTIMIZE_APPLY_SHADOW_FA); - ToggleGUI(GetLoc("sSettingUseForwardAdd"), ref shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD); - ToggleGUI(GetLoc("sSettingUseVertexLight"), ref shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT); - } - ToggleGUI(GetLoc("sSettingUseLightmap"), ref shaderSetting.LIL_OPTIMIZE_USE_LIGHTMAP); - EditorGUI.indentLevel--; + private static void OptimizationSettingGUI() + { + EditorGUI.BeginChangeCheck(); - DrawLine(); + lilRenderPipeline lilRP = CheckRP(); + if(lilRP == lilRenderPipeline.BRP) + { + ToggleGUI(GetLoc("sSettingApplyShadowFA"), ref shaderSetting.LIL_OPTIMIZE_APPLY_SHADOW_FA); + ToggleGUI(GetLoc("sSettingUseForwardAdd"), ref shaderSetting.LIL_OPTIMIZE_USE_FORWARDADD); + ToggleGUI(GetLoc("sSettingUseVertexLight"), ref shaderSetting.LIL_OPTIMIZE_USE_VERTEXLIGHT); + } + ToggleGUI(GetLoc("sSettingUseLightmap"), ref shaderSetting.LIL_OPTIMIZE_USE_LIGHTMAP); - EditorGUILayout.LabelField(GetLoc("sSettingDefaultValue"), boldLabel); - EditorGUI.indentLevel++; - shaderSetting.defaultAsUnlit = EditorGUILayout.Slider(GetLoc("sAsUnlit"), shaderSetting.defaultAsUnlit, 0.0f, 1.0f); - shaderSetting.defaultVertexLightStrength = EditorGUILayout.Slider(GetLoc("sVertexLightStrength"), shaderSetting.defaultVertexLightStrength, 0.0f, 1.0f); - shaderSetting.defaultLightMinLimit = EditorGUILayout.Slider(GetLoc("sLightMinLimit"), shaderSetting.defaultLightMinLimit, 0.0f, 1.0f); - shaderSetting.defaultLightMaxLimit = EditorGUILayout.Slider(GetLoc("sLightMaxLimit"), shaderSetting.defaultLightMaxLimit, 0.0f, 10.0f); - shaderSetting.defaultMonochromeLighting = EditorGUILayout.Slider(GetLoc("sMonochromeLighting"), shaderSetting.defaultMonochromeLighting, 0.0f, 1.0f); - shaderSetting.defaultLightDirectionOverride = EditorGUILayout.Vector4Field(GetLoc("sLightDirectionOverride"), shaderSetting.defaultLightDirectionOverride); - shaderSetting.defaultBeforeExposureLimit = EditorGUILayout.FloatField(GetLoc("sBeforeExposureLimit"), shaderSetting.defaultBeforeExposureLimit); - shaderSetting.defaultlilDirectionalLightStrength = EditorGUILayout.Slider(GetLoc("sDirectionalLightStrength"), shaderSetting.defaultlilDirectionalLightStrength, 0.0f, 1.0f); - EditorGUI.indentLevel--; + if(EditorGUI.EndChangeCheck()) + { + edSet.isShaderSettingChanged = true; + } + } + + private static void DefaultValueSettingGUI() + { + EditorGUI.BeginChangeCheck(); + + shaderSetting.defaultAsUnlit = EditorGUILayout.Slider(GetLoc("sAsUnlit"), shaderSetting.defaultAsUnlit, 0.0f, 1.0f); + shaderSetting.defaultVertexLightStrength = EditorGUILayout.Slider(GetLoc("sVertexLightStrength"), shaderSetting.defaultVertexLightStrength, 0.0f, 1.0f); + shaderSetting.defaultLightMinLimit = EditorGUILayout.Slider(GetLoc("sLightMinLimit"), shaderSetting.defaultLightMinLimit, 0.0f, 1.0f); + shaderSetting.defaultLightMaxLimit = EditorGUILayout.Slider(GetLoc("sLightMaxLimit"), shaderSetting.defaultLightMaxLimit, 0.0f, 10.0f); + shaderSetting.defaultMonochromeLighting = EditorGUILayout.Slider(GetLoc("sMonochromeLighting"), shaderSetting.defaultMonochromeLighting, 0.0f, 1.0f); + shaderSetting.defaultLightDirectionOverride = EditorGUILayout.Vector4Field(GetLoc("sLightDirectionOverride"), shaderSetting.defaultLightDirectionOverride); + shaderSetting.defaultBeforeExposureLimit = EditorGUILayout.FloatField(GetLoc("sBeforeExposureLimit"), shaderSetting.defaultBeforeExposureLimit); + shaderSetting.defaultlilDirectionalLightStrength = EditorGUILayout.Slider(GetLoc("sDirectionalLightStrength"), shaderSetting.defaultlilDirectionalLightStrength, 0.0f, 1.0f); - GUI.enabled = true; if(EditorGUI.EndChangeCheck()) { edSet.isShaderSettingChanged = true; @@ -5088,7 +5129,7 @@ private static bool AutoFixHelpBox(string message) private static void SelectEditorMode() { - string[] sEditorModeList = {GetLoc("sEditorModeSimple"),GetLoc("sEditorModeAdvanced"),GetLoc("sEditorModePreset")}; + string[] sEditorModeList = {GetLoc("sEditorModeSimple"),GetLoc("sEditorModeAdvanced"),GetLoc("sEditorModePreset"),GetLoc("sEditorModeShaderSetting")}; edSet.editorMode = (EditorMode)GUILayout.Toolbar((int)edSet.editorMode, sEditorModeList); } @@ -5640,6 +5681,9 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(applyReflection); CopyProperty(reflectionNormalStrength); CopyProperty(reflectionApplyTransparency); + CopyProperty(reflectionCubeColor); + CopyProperty(reflectionCubeOverride); + CopyProperty(reflectionCubeEnableLighting); CopyProperty(useMatCap); CopyProperty(matcapColor); CopyProperty(matcapBlendUV1); @@ -5723,6 +5767,7 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(metallicGlossMap); CopyProperty(smoothnessTex); CopyProperty(reflectionColorTex); + CopyProperty(reflectionCubeTex); CopyProperty(matcapTex); CopyProperty(matcapBlendMask); CopyProperty(matcapBumpMap); @@ -5748,9 +5793,13 @@ private void CopyProperties(lilPropertyBlock propertyBlock) CopyProperty(applyReflection); CopyProperty(reflectionNormalStrength); CopyProperty(reflectionApplyTransparency); + CopyProperty(reflectionCubeColor); + CopyProperty(reflectionCubeOverride); + CopyProperty(reflectionCubeEnableLighting); CopyProperty(metallicGlossMap); CopyProperty(smoothnessTex); CopyProperty(reflectionColorTex); + CopyProperty(reflectionCubeTex); break; case lilPropertyBlock.MatCaps: CopyProperty(useMatCap); @@ -6442,6 +6491,9 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref applyReflection); PasteProperty(ref reflectionNormalStrength); PasteProperty(ref reflectionApplyTransparency); + PasteProperty(ref reflectionCubeColor); + PasteProperty(ref reflectionCubeOverride); + PasteProperty(ref reflectionCubeEnableLighting); PasteProperty(ref useMatCap); PasteProperty(ref matcapColor); PasteProperty(ref matcapBlendUV1); @@ -6527,6 +6579,7 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref metallicGlossMap); PasteProperty(ref smoothnessTex); PasteProperty(ref reflectionColorTex); + PasteProperty(ref reflectionCubeTex); PasteProperty(ref matcapTex); PasteProperty(ref matcapBlendMask); PasteProperty(ref matcapBumpMap); @@ -6553,11 +6606,15 @@ private void PasteProperties(lilPropertyBlock propertyBlock, bool shouldCopyTex) PasteProperty(ref applyReflection); PasteProperty(ref reflectionNormalStrength); PasteProperty(ref reflectionApplyTransparency); + PasteProperty(ref reflectionCubeColor); + PasteProperty(ref reflectionCubeOverride); + PasteProperty(ref reflectionCubeEnableLighting); if(shouldCopyTex) { PasteProperty(ref metallicGlossMap); PasteProperty(ref smoothnessTex); PasteProperty(ref reflectionColorTex); + PasteProperty(ref reflectionCubeTex); } break; case lilPropertyBlock.MatCaps: @@ -7244,6 +7301,9 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref applyReflection); ResetProperty(ref reflectionNormalStrength); ResetProperty(ref reflectionApplyTransparency); + ResetProperty(ref reflectionCubeColor); + ResetProperty(ref reflectionCubeOverride); + ResetProperty(ref reflectionCubeEnableLighting); ResetProperty(ref useMatCap); ResetProperty(ref matcapColor); ResetProperty(ref matcapBlendUV1); @@ -7327,6 +7387,7 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref metallicGlossMap); ResetProperty(ref smoothnessTex); ResetProperty(ref reflectionColorTex); + ResetProperty(ref reflectionCubeTex); ResetProperty(ref matcapTex); ResetProperty(ref matcapBlendMask); ResetProperty(ref matcapBumpMap); @@ -7352,6 +7413,10 @@ private void ResetProperties(lilPropertyBlock propertyBlock) ResetProperty(ref applyReflection); ResetProperty(ref reflectionNormalStrength); ResetProperty(ref reflectionApplyTransparency); + ResetProperty(ref reflectionCubeTex); + ResetProperty(ref reflectionCubeColor); + ResetProperty(ref reflectionCubeOverride); + ResetProperty(ref reflectionCubeEnableLighting); ResetProperty(ref metallicGlossMap); ResetProperty(ref smoothnessTex); ResetProperty(ref reflectionColorTex); @@ -9925,9 +9990,37 @@ private void MatCapTextureGUI(ref bool isShow, GUIContent guiContent, MaterialPr m_MaterialEditor.ShaderProperty(zRotCancel, GetLoc("sMatCapZRotCancel")); m_MaterialEditor.ShaderProperty(perspective, GetLoc("sFixPerspective")); m_MaterialEditor.ShaderProperty(vrParallaxStrength, GetLoc("sVRParallaxStrength")); + + GUILayout.BeginHorizontal(); + Rect position2 = EditorGUILayout.GetControlRect(); + Rect labelRect = new Rect(position2.x, position2.y, EditorGUIUtility.labelWidth, position2.height); + Rect buttonRect1 = new Rect(labelRect.x + labelRect.width, position2.y, (position2.width - EditorGUIUtility.labelWidth)*0.5f, position2.height); + Rect buttonRect2 = new Rect(buttonRect1.x + buttonRect1.width, position2.y, buttonRect1.width, position2.height); + EditorGUI.PrefixLabel(labelRect, new GUIContent("UV Preset")); + if(GUI.Button(buttonRect1, new GUIContent("MatCap"))) ApplyMatCapUVPreset(false, blendUV1, zRotCancel, perspective, vrParallaxStrength); + if(GUI.Button(buttonRect2, new GUIContent("AngelRing"))) ApplyMatCapUVPreset(true, blendUV1, zRotCancel, perspective, vrParallaxStrength); + GUILayout.EndHorizontal(); EditorGUI.indentLevel--; } } + + private void ApplyMatCapUVPreset(bool isAngelRing, MaterialProperty blendUV1, MaterialProperty zRotCancel, MaterialProperty perspective, MaterialProperty vrParallaxStrength) + { + if(isAngelRing) + { + blendUV1.vectorValue = new Vector4(0.0f, 1.0f, 0.0f, 0.0f); + zRotCancel.floatValue = 1.0f; + perspective.floatValue = 0.0f; + vrParallaxStrength.floatValue = 0.0f; + } + else + { + blendUV1.vectorValue = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + zRotCancel.floatValue = 1.0f; + perspective.floatValue = 1.0f; + vrParallaxStrength.floatValue = 1.0f; + } + } #endregion //------------------------------------------------------------------------------------------------------------------------------ diff --git a/Assets/lilToon/Editor/lilToonEditorUtils.cs b/Assets/lilToon/Editor/lilToonEditorUtils.cs index 0f6d30fb..61b79e7d 100644 --- a/Assets/lilToon/Editor/lilToonEditorUtils.cs +++ b/Assets/lilToon/Editor/lilToonEditorUtils.cs @@ -31,7 +31,7 @@ public static class lilToonEditorUtils private const string menuPathFixLighting = menuPathGameObject + "[GameObject] Fix lighting"; private const int menuPriorityAssets = 1100; - private const int menuPriorityGameObject = 1100; + private const int menuPriorityGameObject = 21; // This must be 21 or less private const int menuPriorityRefreshShaders = menuPriorityAssets + 0; private const int menuPriorityAutoShaderSetting = menuPriorityAssets + 1; private const int menuPriorityRemoveUnusedProperties = menuPriorityAssets + 20; @@ -39,7 +39,7 @@ public static class lilToonEditorUtils private const int menuPriorityPixelArtReduction = menuPriorityAssets + 22; private const int menuPriorityConvertGifToAtlas = menuPriorityAssets + 23; private const int menuPrioritySetupFromFBX = menuPriorityAssets + 24; - private const int menuPriorityFixLighting = menuPriorityGameObject + 0; + private const int menuPriorityFixLighting = menuPriorityGameObject; private const string anchorName = "AutoAnchorObject"; diff --git a/Assets/lilToon/README.md b/Assets/lilToon/README.md index b7680b4b..701e5678 100644 --- a/Assets/lilToon/README.md +++ b/Assets/lilToon/README.md @@ -1,5 +1,5 @@ # lilToon -Version 1.2.8 +Version 1.2.9 # Overview This shader is developed for services using avatars (VRChat, etc.) and has the following features. diff --git a/Assets/lilToon/README_JP.md b/Assets/lilToon/README_JP.md index 5e3294c4..738604b3 100644 --- a/Assets/lilToon/README_JP.md +++ b/Assets/lilToon/README_JP.md @@ -1,5 +1,5 @@ # lilToon -Version 1.2.8 +Version 1.2.9 # 概要 アバターを用いたサービス(VRChat等)向けに開発したシェーダーで以下のような特徴があります。 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 86e54890..4a91b638 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 @@ -191,6 +191,10 @@ Shader "#NAME#" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl b/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl index c5c7d6d4..68ec06ea 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl @@ -430,7 +430,7 @@ // Premultiply #if LIL_RENDER != 2 #define LIL_PREMULTIPLY -#elif defined(LIL_PASS_FORWARDADD) +#elif defined(LIL_PASS_FORWARDADD) && !defined(LIL_REFRACTION) #define LIL_PREMULTIPLY fd.col.rgb *= saturate(fd.col.a * _AlphaBoostFA); #else #define LIL_PREMULTIPLY fd.col.rgb *= fd.col.a; diff --git a/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl b/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl index 579ea863..87962d52 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_functions.hlsl @@ -362,6 +362,19 @@ float3 lilGradationMap(float3 col, TEXTURE2D(gradationMap), float strength) return lerp(col, outrgb, strength); } +float3 lilDecodeHDR(float4 data, float4 hdr) +{ + float alpha = hdr.w * (data.a - 1.0) + 1.0; + + #if defined(UNITY_COLORSPACE_GAMMA) + return (hdr.x * alpha) * data.rgb; + #elif defined(UNITY_USE_NATIVE_HDR) + return hdr.x * data.rgb; + #else + return (hdr.x * pow(abs(alpha), hdr.y)) * data.rgb; + #endif +} + //------------------------------------------------------------------------------------------------------------------------------ // UV @@ -985,6 +998,15 @@ float3 lilGetAnisotropyNormalWS(float3 normalWS, float3 anisoTangentWS, float3 a return normalize(lerp(normalWS, anisoDirectionWS, abs(anisotropy))); } +//------------------------------------------------------------------------------------------------------------------------------ +// Reflection +float3 lilCustomReflection(TEXTURECUBE(tex), float4 hdr, float3 viewDirection, float3 normalDirection, float perceptualRoughness) +{ + float mip = perceptualRoughness * (10.2 - 4.2 * perceptualRoughness); + float3 refl = reflect(-viewDirection, normalDirection); + return lilDecodeHDR(LIL_SAMPLE_CUBE_LOD(tex, sampler_linear_repeat, refl, mip), hdr); +} + //------------------------------------------------------------------------------------------------------------------------------ // Glitter float3 lilCalcGlitter(float2 uv, float3 normalDirection, float3 viewDirection, float3 lightDirection, float4 glitterParams1, float4 glitterParams2) diff --git a/Assets/lilToon/Shader/Includes/lil_common_input.hlsl b/Assets/lilToon/Shader/Includes/lil_common_input.hlsl index ad8882f8..cc7b5cb8 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_input.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_input.hlsl @@ -406,6 +406,10 @@ SAMPLER(sampler_linear_clamp); float4 _MetallicGlossMap_ST; float4 _ReflectionColorTex_ST; #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_GEM) + float4 _ReflectionCubeColor; + float4 _ReflectionCubeTex_HDR; + #endif #if defined(LIL_MULTI_INPUTS_MATCAP) float4 _MatCapColor; float4 _MatCapTex_ST; @@ -555,6 +559,7 @@ SAMPLER(sampler_linear_clamp); float _SpecularBorder; float _SpecularBlur; float _ReflectionNormalStrength; + float _ReflectionCubeEnableLighting; #endif #if defined(LIL_MULTI_INPUTS_REFLECTION) float _Metallic; @@ -727,6 +732,9 @@ SAMPLER(sampler_linear_clamp); lilBool _SpecularToon; lilBool _ReflectionApplyTransparency; #endif + #if defined(LIL_MULTI_INPUTS_REFLECTION) || defined(LIL_GEM) + lilBool _ReflectionCubeOverride; + #endif #if defined(LIL_MULTI_INPUTS_MATCAP) lilBool _MatCapApplyTransparency; lilBool _MatCapPerspective; @@ -907,6 +915,10 @@ SAMPLER(sampler_linear_clamp); float4 _MetallicGlossMap_ST; float4 _ReflectionColorTex_ST; #endif + #if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + float4 _ReflectionCubeColor; + float4 _ReflectionCubeTex_HDR; + #endif // MatCap #if defined(LIL_FEATURE_MATCAP) @@ -1105,6 +1117,7 @@ SAMPLER(sampler_linear_clamp); float _SpecularBorder; float _SpecularBlur; float _ReflectionNormalStrength; + float _ReflectionCubeEnableLighting; #endif #if defined(LIL_FEATURE_REFLECTION) float _Metallic; @@ -1315,6 +1328,9 @@ SAMPLER(sampler_linear_clamp); lilBool _SpecularToon; lilBool _ReflectionApplyTransparency; #endif + #if defined(LIL_FEATURE_REFLECTION) || defined(LIL_GEM) + lilBool _ReflectionCubeOverride; + #endif #if defined(LIL_FEATURE_MATCAP) lilBool _UseMatCap; lilBool _MatCapApplyTransparency; @@ -1430,6 +1446,7 @@ TEXTURE2D(_BacklightColorTex); TEXTURE2D(_SmoothnessTex); TEXTURE2D(_MetallicGlossMap); TEXTURE2D(_ReflectionColorTex); +TEXTURECUBE(_ReflectionCubeTex); TEXTURE2D(_MatCapTex); TEXTURE2D(_MatCapBlendMask); TEXTURE2D(_MatCapBumpMap); diff --git a/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl b/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl index d6fcb11f..1a6329a5 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_macro.hlsl @@ -208,6 +208,9 @@ #if defined(TEXTURE3D) #undef TEXTURE3D #endif +#if defined(TEXTURECUBE) + #undef TEXTURECUBE +#endif #if defined(SAMPLER) #undef SAMPLER #endif @@ -258,14 +261,21 @@ #define LIL_SAMPLE_2D_ARRAY(tex,samp,uv,index) tex2DArray(tex,float3(uv,index)) #define LIL_SAMPLE_2D_ARRAY_LOD(tex,samp,uv,index,lod) tex2DArraylod(tex,float4(uv,index,lod)) #define LIL_SAMPLE_3D(tex,samp,uv) tex3D(tex,uv) + #define LIL_SAMPLE_CUBE_LOD(tex,samp,uv,lod) texCUBElod(tex,float4(uv,0,lod)) #define TEXTURE2D(tex) sampler2D tex #define TEXTURE2D_FLOAT(tex) sampler2D tex #define TEXTURE2D_ARRAY(tex) sampler2DArray tex #define TEXTURE3D(tex) sampler3D tex + #define TEXTURECUBE(tex) samplerCUBE tex #define SAMPLER(samp) #define LIL_SAMP_IN_FUNC(samp) #define LIL_SAMP_IN(samp) #define LIL_LWTEX + + bool IsEmpty(TEXTURECUBE(tex)) + { + return false; + } #else #define LIL_SAMPLE_1D(tex,samp,uv) tex.Sample(samp,uv) #define LIL_SAMPLE_1D_LOD(tex,samp,uv,lod) tex.SampleLevel(samp,uv,lod) @@ -277,13 +287,22 @@ #define LIL_SAMPLE_2D_ARRAY(tex,samp,uv,index) tex.Sample(samp,float3(uv,index)) #define LIL_SAMPLE_2D_ARRAY_LOD(tex,samp,uv,index,lod) tex.SampleLevel(samp,float3(uv,index),lod) #define LIL_SAMPLE_3D(tex,samp,coord) tex.Sample(samp,coord) + #define LIL_SAMPLE_CUBE_LOD(tex,samp,uv,lod) tex.SampleLevel(samp,uv,lod) #define TEXTURE2D(tex) Texture2D tex #define TEXTURE2D_FLOAT(tex) Texture2D tex #define TEXTURE2D_ARRAY(tex) Texture2DArray tex #define TEXTURE3D(tex) Texture3D tex + #define TEXTURECUBE(tex) TextureCube tex #define SAMPLER(samp) SamplerState samp #define LIL_SAMP_IN_FUNC(samp) , SamplerState samp #define LIL_SAMP_IN(samp) , samp + + bool IsEmpty(TEXTURECUBE(tex)) + { + uint width, height, levels; + tex.GetDimensions(0, width, height, levels); + return width < 15; + } #endif #if defined(LIL_FEATURE_PARALLAX) && defined(LIL_FEATURE_POM) @@ -321,7 +340,7 @@ float3 lilTransformOStoWS(float3 positionOS) { - return mul(LIL_MATRIX_M, float4(positionOS,1.0)).xyz; + return mul(LIL_MATRIX_M, float4(positionOS, 1.0)).xyz; } float3 lilTransformWStoOS(float3 positionWS) @@ -375,7 +394,7 @@ float3 lilTransformOStoWS(float3 positionOS) { - return mul(LIL_MATRIX_M, float4(positionOS,1.0)).xyz; + return mul(LIL_MATRIX_M, float4(positionOS, 1.0)).xyz; } float3 lilTransformWStoOS(float3 positionWS) @@ -652,7 +671,9 @@ float2 lilCStoGrabUV(float4 positionCS) return UnityGI_IndirectSpecular(data, 1.0, glossIn); } #define LIL_GET_ENVIRONMENT_REFLECTION(viewDirection,normalDirection,perceptualRoughness,positionWS) \ - lilGetEnvReflection(viewDirection,normalDirection,perceptualRoughness,positionWS) + ((IsEmpty(unity_SpecCube0) || unity_SpecCube0_HDR.x == 0 || _ReflectionCubeOverride) ? \ + lilCustomReflection(_ReflectionCubeTex, _ReflectionCubeTex_HDR, viewDirection, normalDirection, perceptualRoughness) * _ReflectionCubeColor.rgb * lerp(1.0, fd.lightColor, _ReflectionCubeEnableLighting) : \ + lilGetEnvReflection(viewDirection,normalDirection,perceptualRoughness,positionWS)) // Fog #if defined(LIL_PASS_FORWARDADD) @@ -1226,7 +1247,9 @@ float2 lilCStoGrabUV(float4 positionCS) // Environment reflection #define LIL_GET_ENVIRONMENT_REFLECTION(viewDirection,normalDirection,perceptualRoughness,positionWS) \ - lilGetReflectionSum(viewDirection,normalDirection,perceptualRoughness,posInput,fd.renderingLayers,fd.featureFlags) + (_ReflectionCubeOverride ? \ + lilCustomReflection(_ReflectionCubeTex, _ReflectionCubeTex_HDR, viewDirection, normalDirection, perceptualRoughness) * _ReflectionCubeColor.rgb * lerp(1.0, fd.lightColor, _ReflectionCubeEnableLighting) : \ + lilGetReflectionSum(viewDirection,normalDirection,perceptualRoughness,posInput,fd.renderingLayers,fd.featureFlags)) // Fog #define LIL_APPLY_FOG_BASE(col,fogCoord) col = EvaluateAtmosphericScattering(posInput, fd.V, col) @@ -1378,7 +1401,9 @@ float2 lilCStoGrabUV(float4 positionCS) // Environment reflection #define LIL_GET_ENVIRONMENT_REFLECTION(viewDirection,normalDirection,perceptualRoughness,positionWS) \ - GlossyEnvironmentReflection(reflect(-viewDirection,normalDirection), perceptualRoughness, 1.0) + ((IsEmpty(unity_SpecCube0) || unity_SpecCube0_HDR.x == 0 || _ReflectionCubeOverride) ? \ + lilCustomReflection(_ReflectionCubeTex, _ReflectionCubeTex_HDR, viewDirection, normalDirection, perceptualRoughness) * _ReflectionCubeColor.rgb * lerp(1.0, fd.lightColor, _ReflectionCubeEnableLighting) : \ + GlossyEnvironmentReflection(reflect(-viewDirection,normalDirection), perceptualRoughness, 1.0)) // Fog #define LIL_APPLY_FOG_BASE(col,fogCoord) col.rgb = MixFog(col.rgb,fogCoord) diff --git a/Assets/lilToon/Shader/lts.shader b/Assets/lilToon/Shader/lts.shader index 69468571..e052408d 100644 --- a/Assets/lilToon/Shader/lts.shader +++ b/Assets/lilToon/Shader/lts.shader @@ -191,6 +191,10 @@ Shader "lilToon" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_cutout.shader b/Assets/lilToon/Shader/lts_cutout.shader index 480a753c..86fca5bb 100644 --- a/Assets/lilToon/Shader/lts_cutout.shader +++ b/Assets/lilToon/Shader/lts_cutout.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonCutout" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_cutout_o.shader b/Assets/lilToon/Shader/lts_cutout_o.shader index d6390677..d977a5c7 100644 --- a/Assets/lilToon/Shader/lts_cutout_o.shader +++ b/Assets/lilToon/Shader/lts_cutout_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonCutoutOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_cutout_oo.shader b/Assets/lilToon/Shader/lts_cutout_oo.shader index 6415fded..093b5d3e 100644 --- a/Assets/lilToon/Shader/lts_cutout_oo.shader +++ b/Assets/lilToon/Shader/lts_cutout_oo.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonOutlineOnlyCutout" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_fur.shader b/Assets/lilToon/Shader/lts_fur.shader index 20b19165..0aa7c91a 100644 --- a/Assets/lilToon/Shader/lts_fur.shader +++ b/Assets/lilToon/Shader/lts_fur.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonFur" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_fur_cutout.shader b/Assets/lilToon/Shader/lts_fur_cutout.shader index 249dbd0c..06f35fe8 100644 --- a/Assets/lilToon/Shader/lts_fur_cutout.shader +++ b/Assets/lilToon/Shader/lts_fur_cutout.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonFurCutout" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_fur_two.shader b/Assets/lilToon/Shader/lts_fur_two.shader index fb002742..9feb032c 100644 --- a/Assets/lilToon/Shader/lts_fur_two.shader +++ b/Assets/lilToon/Shader/lts_fur_two.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonFurTwoPass" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_furonly.shader b/Assets/lilToon/Shader/lts_furonly.shader index 32f52787..61d4530b 100644 --- a/Assets/lilToon/Shader/lts_furonly.shader +++ b/Assets/lilToon/Shader/lts_furonly.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonFurOnly" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_furonly_cutout.shader b/Assets/lilToon/Shader/lts_furonly_cutout.shader index 3e16feee..1b292012 100644 --- a/Assets/lilToon/Shader/lts_furonly_cutout.shader +++ b/Assets/lilToon/Shader/lts_furonly_cutout.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonFurOnlyCutout" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_furonly_two.shader b/Assets/lilToon/Shader/lts_furonly_two.shader index bb10d346..f14b3c0b 100644 --- a/Assets/lilToon/Shader/lts_furonly_two.shader +++ b/Assets/lilToon/Shader/lts_furonly_two.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonFurOnlyTwoPass" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_gem.shader b/Assets/lilToon/Shader/lts_gem.shader index ad4f2d29..d08f5150 100644 --- a/Assets/lilToon/Shader/lts_gem.shader +++ b/Assets/lilToon/Shader/lts_gem.shader @@ -178,6 +178,10 @@ Shader "Hidden/lilToonGem" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_o.shader b/Assets/lilToon/Shader/lts_o.shader index ba945145..a1dc7d41 100644 --- a/Assets/lilToon/Shader/lts_o.shader +++ b/Assets/lilToon/Shader/lts_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_onetrans.shader b/Assets/lilToon/Shader/lts_onetrans.shader index c2cafe09..ca7e1b05 100644 --- a/Assets/lilToon/Shader/lts_onetrans.shader +++ b/Assets/lilToon/Shader/lts_onetrans.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonOnePassTransparent" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_onetrans_o.shader b/Assets/lilToon/Shader/lts_onetrans_o.shader index 115338f2..aeac73f2 100644 --- a/Assets/lilToon/Shader/lts_onetrans_o.shader +++ b/Assets/lilToon/Shader/lts_onetrans_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonOnePassTransparentOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_oo.shader b/Assets/lilToon/Shader/lts_oo.shader index 2fc60b15..0ecfe2d7 100644 --- a/Assets/lilToon/Shader/lts_oo.shader +++ b/Assets/lilToon/Shader/lts_oo.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonOutlineOnly" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_overlay.shader b/Assets/lilToon/Shader/lts_overlay.shader index 1a78f017..3bd3c531 100644 --- a/Assets/lilToon/Shader/lts_overlay.shader +++ b/Assets/lilToon/Shader/lts_overlay.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonOverlay" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_overlay_one.shader b/Assets/lilToon/Shader/lts_overlay_one.shader index 032ca85f..6a8dc5a8 100644 --- a/Assets/lilToon/Shader/lts_overlay_one.shader +++ b/Assets/lilToon/Shader/lts_overlay_one.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonOverlayOnePass" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_ref.shader b/Assets/lilToon/Shader/lts_ref.shader index aaa7ff6f..4cb6a477 100644 --- a/Assets/lilToon/Shader/lts_ref.shader +++ b/Assets/lilToon/Shader/lts_ref.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonRefraction" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_ref_blur.shader b/Assets/lilToon/Shader/lts_ref_blur.shader index 8492ace1..23b0c1ac 100644 --- a/Assets/lilToon/Shader/lts_ref_blur.shader +++ b/Assets/lilToon/Shader/lts_ref_blur.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonRefractionBlur" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess.shader b/Assets/lilToon/Shader/lts_tess.shader index f1729cbb..20795698 100644 --- a/Assets/lilToon/Shader/lts_tess.shader +++ b/Assets/lilToon/Shader/lts_tess.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellation" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_cutout.shader b/Assets/lilToon/Shader/lts_tess_cutout.shader index 2464802c..ad0f7853 100644 --- a/Assets/lilToon/Shader/lts_tess_cutout.shader +++ b/Assets/lilToon/Shader/lts_tess_cutout.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationCutout" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_cutout_o.shader b/Assets/lilToon/Shader/lts_tess_cutout_o.shader index 9a6eab97..e11a38e3 100644 --- a/Assets/lilToon/Shader/lts_tess_cutout_o.shader +++ b/Assets/lilToon/Shader/lts_tess_cutout_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationCutoutOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_o.shader b/Assets/lilToon/Shader/lts_tess_o.shader index e3517f0a..26bfa8bf 100644 --- a/Assets/lilToon/Shader/lts_tess_o.shader +++ b/Assets/lilToon/Shader/lts_tess_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_onetrans.shader b/Assets/lilToon/Shader/lts_tess_onetrans.shader index 819d2b4b..c294e58e 100644 --- a/Assets/lilToon/Shader/lts_tess_onetrans.shader +++ b/Assets/lilToon/Shader/lts_tess_onetrans.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationOnePassTransparent" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_onetrans_o.shader b/Assets/lilToon/Shader/lts_tess_onetrans_o.shader index 812c1907..88f7bd81 100644 --- a/Assets/lilToon/Shader/lts_tess_onetrans_o.shader +++ b/Assets/lilToon/Shader/lts_tess_onetrans_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationOnePassTransparentOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_trans.shader b/Assets/lilToon/Shader/lts_tess_trans.shader index f15f1225..b8b40a11 100644 --- a/Assets/lilToon/Shader/lts_tess_trans.shader +++ b/Assets/lilToon/Shader/lts_tess_trans.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationTransparent" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_trans_o.shader b/Assets/lilToon/Shader/lts_tess_trans_o.shader index 8d7a16cf..c0c24eb1 100644 --- a/Assets/lilToon/Shader/lts_tess_trans_o.shader +++ b/Assets/lilToon/Shader/lts_tess_trans_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationTransparentOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_twotrans.shader b/Assets/lilToon/Shader/lts_tess_twotrans.shader index d593858d..28004354 100644 --- a/Assets/lilToon/Shader/lts_tess_twotrans.shader +++ b/Assets/lilToon/Shader/lts_tess_twotrans.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationTwoPassTransparent" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_tess_twotrans_o.shader b/Assets/lilToon/Shader/lts_tess_twotrans_o.shader index 74823652..0efc1632 100644 --- a/Assets/lilToon/Shader/lts_tess_twotrans_o.shader +++ b/Assets/lilToon/Shader/lts_tess_twotrans_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTessellationTwoPassTransparentOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_trans.shader b/Assets/lilToon/Shader/lts_trans.shader index 0c4e208a..7bab434c 100644 --- a/Assets/lilToon/Shader/lts_trans.shader +++ b/Assets/lilToon/Shader/lts_trans.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTransparent" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_trans_o.shader b/Assets/lilToon/Shader/lts_trans_o.shader index 591c1371..9421c2d5 100644 --- a/Assets/lilToon/Shader/lts_trans_o.shader +++ b/Assets/lilToon/Shader/lts_trans_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTransparentOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_trans_oo.shader b/Assets/lilToon/Shader/lts_trans_oo.shader index d71541b8..b50cffc5 100644 --- a/Assets/lilToon/Shader/lts_trans_oo.shader +++ b/Assets/lilToon/Shader/lts_trans_oo.shader @@ -191,6 +191,10 @@ Shader "_lil/[Optional] lilToonOutlineOnlyTransparent" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_twotrans.shader b/Assets/lilToon/Shader/lts_twotrans.shader index 09acf426..8a4c08c8 100644 --- a/Assets/lilToon/Shader/lts_twotrans.shader +++ b/Assets/lilToon/Shader/lts_twotrans.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTwoPassTransparent" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/lts_twotrans_o.shader b/Assets/lilToon/Shader/lts_twotrans_o.shader index b563c1b6..52f05288 100644 --- a/Assets/lilToon/Shader/lts_twotrans_o.shader +++ b/Assets/lilToon/Shader/lts_twotrans_o.shader @@ -191,6 +191,10 @@ Shader "Hidden/lilToonTwoPassTransparentOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/ltsmulti.shader b/Assets/lilToon/Shader/ltsmulti.shader index 3d82f469..0bab250d 100644 --- a/Assets/lilToon/Shader/ltsmulti.shader +++ b/Assets/lilToon/Shader/ltsmulti.shader @@ -195,6 +195,10 @@ Shader "_lil/lilToonMulti" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/ltsmulti_fur.shader b/Assets/lilToon/Shader/ltsmulti_fur.shader index 6968b59d..3359dd2d 100644 --- a/Assets/lilToon/Shader/ltsmulti_fur.shader +++ b/Assets/lilToon/Shader/ltsmulti_fur.shader @@ -195,6 +195,10 @@ Shader "Hidden/lilToonMultiFur" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/ltsmulti_gem.shader b/Assets/lilToon/Shader/ltsmulti_gem.shader index 896a0111..1f5b64c9 100644 --- a/Assets/lilToon/Shader/ltsmulti_gem.shader +++ b/Assets/lilToon/Shader/ltsmulti_gem.shader @@ -182,6 +182,10 @@ Shader "Hidden/lilToonMultiGem" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/ltsmulti_o.shader b/Assets/lilToon/Shader/ltsmulti_o.shader index 7dfd1306..b77e61c4 100644 --- a/Assets/lilToon/Shader/ltsmulti_o.shader +++ b/Assets/lilToon/Shader/ltsmulti_o.shader @@ -195,6 +195,10 @@ Shader "Hidden/lilToonMultiOutline" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/Shader/ltsmulti_ref.shader b/Assets/lilToon/Shader/ltsmulti_ref.shader index 28e92bb9..381daa06 100644 --- a/Assets/lilToon/Shader/ltsmulti_ref.shader +++ b/Assets/lilToon/Shader/ltsmulti_ref.shader @@ -195,6 +195,10 @@ Shader "Hidden/lilToonMultiRefraction" [lilHDR] _ReflectionColor ("Color", Color) = (1,1,1,1) [NoScaleOffset] _ReflectionColorTex ("Color", 2D) = "white" {} [lilToggle] _ReflectionApplyTransparency ("Apply Transparency", Int) = 1 + [NoScaleOffset] _ReflectionCubeTex ("Cubemap Fallback", Cube) = "black" {} + [lilHDR] _ReflectionCubeColor ("Color", Color) = (0,0,0,1) + [lilToggle] _ReflectionCubeOverride ("Override", Int) = 0 + _ReflectionCubeEnableLighting ("Enable Lighting", Range(0, 1)) = 1 //---------------------------------------------------------------------------------------------------------------------- // MatCap diff --git a/Assets/lilToon/package.json b/Assets/lilToon/package.json index e85a4851..64bfaf34 100644 --- a/Assets/lilToon/package.json +++ b/Assets/lilToon/package.json @@ -1,6 +1,6 @@ { "name": "jp.lilxyzw.liltoon", - "version": "1.2.8", + "version": "1.2.9", "displayName": "lilToon", "description": "Feature-rich toon shader.", "unity": "2017.1", diff --git a/version.json b/version.json index 5726706c..1986ad34 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{"latest_vertion_name": "1.2.8", "latest_vertion_value": 21} \ No newline at end of file +{"latest_vertion_name": "1.2.9", "latest_vertion_value": 22} \ No newline at end of file