From b913602c9122eba131c083602c1110dd50a44302 Mon Sep 17 00:00:00 2001 From: Meliodas <31974197+Melioli@users.noreply.github.com> Date: Mon, 26 Aug 2024 06:23:34 +0200 Subject: [PATCH] Rename Nyx State to NightSoul --- Editor.meta | 8 + Editor/Manager.meta | 8 + Editor/Manager/HoyoToonManager.json | 341 ++++++++++++++++++ Editor/Manager/HoyoToonManager.json.meta | 7 + Shaders/Genshin Impact/HoyoToonGenshin.shader | 6 +- .../HoyoToonHonkaiImpactPart2.shader | 4 + package.json | 2 +- 7 files changed, 372 insertions(+), 4 deletions(-) create mode 100644 Editor.meta create mode 100644 Editor/Manager.meta create mode 100644 Editor/Manager/HoyoToonManager.json create mode 100644 Editor/Manager/HoyoToonManager.json.meta diff --git a/Editor.meta b/Editor.meta new file mode 100644 index 0000000..47cba89 --- /dev/null +++ b/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28d8d385ce54b0b4bb376217e08ff51a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Manager.meta b/Editor/Manager.meta new file mode 100644 index 0000000..a017e74 --- /dev/null +++ b/Editor/Manager.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1f194b8446609ff408b5e998983ec5b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Manager/HoyoToonManager.json b/Editor/Manager/HoyoToonManager.json new file mode 100644 index 0000000..04ebbb8 --- /dev/null +++ b/Editor/Manager/HoyoToonManager.json @@ -0,0 +1,341 @@ +{ + "Textures": { + "ClampKeyword": ["Dissolve", "ramp", "Star", "_Skin"], + "NonSRGBKeywords": [ + "normalmap", + "lightmap", + "face_shadow", + "face01_shadow", + "specular_ramp", + "gradient", + "Grain", + "Dissolve", + "Repeat", + "Stockings", + "ExpressionMap", + "FaceMap", + "materialidvalueslut", + "ColorMask", + "_Mask", + "_Normal" + ], + "EndsWithNonSRGBKeywords": [ + "_HM", + "_N", + "_HET", + "_ID", + "_SDF", + "_CUBE", + "_EG", + "_EM", + "T_Caustic" + ], + "NonPower2Keywords": ["materialidvalueslut"] + }, + "Shaders": { + "HSRShader": ["HoyoToon/Star Rail/Character"], + "GIShader": ["HoyoToon/Genshin/Character"], + "Hi3Shader": ["HoyoToon/Honkai Impact/Character Part 1"], + "Hi3P2Shader": ["HoyoToon/Honkai Impact/Character Part 2"], + "WuWaShader": ["HoyoToon/Wuthering Waves/Character"] + }, + "ShaderKeywords": { + "HSRShader": [ + "_ScreenLineInst", + "_DissolveDistortionIntensity", + "_DissolveRate" + ], + "GIShader": ["_UtilityDisplay1", "_DisableCGP", "UseGlassSpecularToggle"], + "Hi3Shader": ["_SPCubeMapIntensity"], + "Hi3P2Shader": ["_MetalMapGrp", "_MicsGrp"], + "WuWaShader": ["ShadingModel"] + }, + "MaterialSettings": { + "HoyoToon/Star Rail/Character": { + "Face": { + "variant_selector": 1, + "_BaseMaterial": 0, + "_HairMaterial": 0, + "_FaceMaterial": 1, + "_EyeShadowMat": 0, + "_CullMode": 2, + "_SrcBlend": 1, + "_DstBlend": 0, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 5, + "_StencilCompB": 5, + "_StencilRef": 100, + "renderQueue": 2010 + }, + "EyeShadow": { + "variant_selector": 2, + "_BaseMaterial": 0, + "_HairMaterial": 0, + "_FaceMaterial": 0, + "_EyeShadowMat": 1, + "_CullMode": 0, + "_SrcBlend": 2, + "_DstBlend": 0, + "_EnableStencil": 0, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 0, + "_StencilCompB": 8, + "_StencilRef": 0, + "renderQueue": 2015 + }, + "FaceMask": { + "variant_selector": 1, + "_BaseMaterial": 0, + "_HairMaterial": 0, + "_FaceMaterial": 1, + "_EyeShadowMat": 0, + "_CullMode": 0, + "_SrcBlend": 1, + "_DstBlend": 0, + "_EnableStencil": 0, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 5, + "_StencilCompB": 5, + "_StencilRef": 99, + "_OutlineWidth": 0, + "renderQueue": 2010 + }, + "Trans": { + "_IsTransparent": 1, + "variant_selector": 0, + "_BaseMaterial": 1, + "_HairMaterial": 0, + "_FaceMaterial": 0, + "_EyeShadowMat": 0, + "_CullMode": 0, + "_SrcBlend": 5, + "_DstBlend": 10, + "_EnableStencil": 0, + "_StencilPassA": 2, + "_StencilPassB": 0, + "_StencilCompA": 0, + "_StencilCompB": 0, + "_StencilRef": 0, + "renderQueue": 2041 + }, + "Hair": { + "variant_selector": 3, + "_BaseMaterial": 0, + "_HairMaterial": 1, + "_FaceMaterial": 0, + "_EyeShadowMat": 0, + "_CullMode": 0, + "_SrcBlend": 1, + "_DstBlend": 0, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 0, + "_StencilCompA": 5, + "_StencilCompB": 8, + "_StencilRef": 100, + "_UseSelfShadow": 1, + "renderQueue": 2020 + }, + "Default": { + "variant_selector": 0, + "_BaseMaterial": 1, + "_HairMaterial": 0, + "_FaceMaterial": 0, + "_EyeShadowMat": 0, + "_CullMode": 0, + "_SrcBlend": 5, + "_DstBlend": 10, + "_EnableStencil": 0, + "_StencilPassA": 2, + "_StencilPassB": 0, + "_StencilCompA": 0, + "_StencilCompB": 0, + "_StencilRef": 0, + "_OutlineScale": 0.187, + "_RimWidth": 1, + "_UseSelfShadow": 1, + "renderQueue": 2040 + } + }, + "HoyoToon/Genshin/Character": { + "Face": { + "variant_selector": 1, + "_UseFaceMapNew": 1, + "_UseSelfShadow": 0 + }, + "Equip": { + "variant_selector": 2, + "_UseWeapon": 1 + }, + "Glass_Eff": { + "_SrcBlend": "_SrcBlendMode", + "_DstBlend": "_DstBlendMode", + "variant_selector": 3, + "_UseWeapon": 1 + }, + "Default": { + "variant_selector": 0 + } + }, + "HoyoToon/Honkai Impact/Character Part 1": { + "Face": { + "variant_selector": 1, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 6, + "_StencilCompB": 8, + "_StencilRef": 16, + "renderQueue": 2000 + }, + "Hair": { + "variant_selector": 2, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 6, + "_StencilCompB": 8, + "_StencilRef": 16, + "renderQueue": 2002 + }, + "Eye": { + "variant_selector": 3, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 6, + "_StencilCompB": 8, + "_StencilRef": 16, + "renderQueue": 2001 + }, + "Alpha": { + "_AlphaType": 1, + "_SrcBlend": 5, + "_DstBlend": 10, + "renderQueue": 2003 + } + }, + "HoyoToon/Honkai Impact/Character Part 2": { + "Face": { + "variant_selector": 1, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 6, + "_StencilCompB": 8, + "_StencilRef": 16, + "renderQueue": 2000 + }, + "Hair": { + "variant_selector": 2, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 6, + "_StencilCompB": 8, + "_StencilRef": 16, + "renderQueue": 2002 + }, + "Eye": { + "variant_selector": 3, + "_EnableStencil": 1, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 6, + "_StencilCompB": 8, + "_StencilRef": 16, + "renderQueue": 2001 + } + }, + "HoyoToon/Wuthering Waves/Character": { + "Bangs": { + "_MaterialType": 3, + "_SrcBlend": 1, + "_DstBlend": 0, + "_StencilPassA": 0, + "_StencilPassB": 0, + "_StencilPassShadow": 0, + "_StencilCompA": 5, + "_StencilCompB": 8, + "_StencilCompShadow": 5, + "_StencilRef": 100, + "_StencilRefShadow": 100, + "_EnableHairShadow": 1.0, + "renderQueue": 2020 + }, + "Eye": { + "_MaterialType": 2, + "_SrcBlend": 1, + "_DstBlend": 0, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 5, + "_StencilCompB": 5, + "_StencilRef": 100, + "renderQueue": 2012 + }, + "Face": { + "_MaterialType": 1, + "_SrcBlend": 1, + "_DstBlend": 0, + "_StencilPassA": 0, + "_StencilPassB": 2, + "_StencilCompA": 5, + "_StencilCompB": 5, + "_StencilRef": 100, + "renderQueue": 2010 + }, + "Hair": { + "_MaterialType": 4, + "_SrcBlend": 5, + "_DstBlend": 10, + "_StencilPassA": 2, + "_StencilPassB": 0, + "_StencilCompA": 0, + "_StencilCompB": 0, + "_StencilRef": 0, + "renderQueue": 2030 + }, + "Glass": { + "_MaterialType": 5, + "_AlphaMode": 2, + "_SrcBlend": 5, + "_DstBlend": 10, + "_StencilPassA": 2, + "_StencilPassB": 0, + "_StencilCompA": 0, + "_StencilCompB": 0, + "_StencilRef": 0, + "renderQueue": 2030 + }, + "XingStar": { + "_MaterialType": 6, + "_AlphaMode": 2, + "_SrcBlend": 5, + "_DstBlend": 10, + "_StencilPassA": 2, + "_StencilPassB": 0, + "_StencilCompA": 0, + "_StencilCompB": 0, + "_StencilRef": 0, + "renderQueue": 2050 + }, + "Default": { + "_MaterialType": 0, + "_SrcBlend": 5, + "_DstBlend": 10, + "_StencilPassA": 2, + "_StencilPassB": 0, + "_StencilCompA": 0, + "_StencilCompB": 0, + "_StencilRef": 0, + "renderQueue": 2040 + } + } + }, + "SkipMeshes": ["Eyes", "Eye"] +} diff --git a/Editor/Manager/HoyoToonManager.json.meta b/Editor/Manager/HoyoToonManager.json.meta new file mode 100644 index 0000000..36dd198 --- /dev/null +++ b/Editor/Manager/HoyoToonManager.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fdc868a225472cb4f910675a34e8ff1a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Genshin Impact/HoyoToonGenshin.shader b/Shaders/Genshin Impact/HoyoToonGenshin.shader index b6903bd..c61f338 100644 --- a/Shaders/Genshin Impact/HoyoToonGenshin.shader +++ b/Shaders/Genshin Impact/HoyoToonGenshin.shader @@ -636,8 +636,8 @@ Shader "HoyoToon/Genshin/Character" [HideInInspector] end_hueshift ("", float) = 0 //endex // Nyx State - [HideInInspector] start_nyx("Nyx State--{reference_property:_EnableNyxState}", Float) = 0 - [Toggle] _EnableNyxState ("Enable Nyx State--{on_value_actions:[{value:0,actions:[{type:SET_PROPERTY,data:_EnableNyxBody=0},{type:SET_PROPERTY,data:_EnableNyxOutline=0}]}, {value:1,actions:[{type:SET_PROPERTY,data:_EnableNyxBody=1},{type:SET_PROPERTY,data:_EnableNyxOutline=1}]}]}", Float) = 0 + [HideInInspector] start_nyx("NightSoul--{reference_property:_EnableNyxState}", Float) = 0 + [Toggle] _EnableNyxState ("Enable NightSoul--{on_value_actions:[{value:0,actions:[{type:SET_PROPERTY,data:_EnableNyxBody=0},{type:SET_PROPERTY,data:_EnableNyxOutline=0}]}, {value:1,actions:[{type:SET_PROPERTY,data:_EnableNyxBody=1},{type:SET_PROPERTY,data:_EnableNyxOutline=1}]}]}", Float) = 0 [NoScaleOffset] _NyxStateOutlineColorRamp ("Color Ramp", 2D) = "gray" { } [NoScaleOffset] _NyxStateOutlineNoise ("Noise(RG)", 2D) = "gray" { } [Vector2] _NyxStateOutlineColorNoiseScale ("Noise Scale", Vector) = (2,2,0,0) @@ -672,7 +672,7 @@ Shader "HoyoToon/Genshin/Character" [HideInInspector] end_nyxvert ("", Float) = 0 [HideInInspector] end_nyxoutline ("", Float) = 0 - [HideInInspector] end_nyx("Nyx State", Float) = 0 + [HideInInspector] end_nyx("NightSoul", Float) = 0 [HideInInspector] end_specialeffects ("", Float) = 0 //Special Effects End diff --git a/Shaders/Honkai Impact/HoyoToonHonkaiImpactPart2.shader b/Shaders/Honkai Impact/HoyoToonHonkaiImpactPart2.shader index 8e0ce5f..88ad93d 100644 --- a/Shaders/Honkai Impact/HoyoToonHonkaiImpactPart2.shader +++ b/Shaders/Honkai Impact/HoyoToonHonkaiImpactPart2.shader @@ -2,6 +2,10 @@ Shader "HoyoToon/Honkai Impact/Character Part 2" { Properties { + [HideInInspector] shader_is_using_HoyoToon_editor("", Float)=0 + [HideInInspector] shader_is_using_HoyoToon_editor("", Float)=0 + [HideInInspector] shader_is_using_HoyoToon_editor("", Float)=0 + [HideInInspector] shader_is_using_HoyoToon_editor("", Float)=0 //Header //[HideInInspector] shader_master_label ("✧HoyoToon Honkai Impact Part 2✧", Float) = 0 [HideInInspector] ShaderBG ("UI/background", Float) = 0 diff --git a/package.json b/package.json index d78b174..7edbd9d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.meliverse.hoyotoon", "displayName": "HoyoToon", - "version": "4.1.0", + "version": "4.1.1", "description": "Shader for Unity (Built-in Rendering Pipeline) attempting to replicate the shading of miHoYo developed games.\nThis is for datamined assets, not custom-made ones nor the MMD variants.", "dependencies": { "com.unity.nuget.newtonsoft-json": "2.0.2",