diff --git a/.gitignore b/.gitignore index 5a142d0..97dce89 100644 --- a/.gitignore +++ b/.gitignore @@ -10,9 +10,6 @@ /[Ll]ogs/ /[Mm]emoryCaptures/ -# Asset meta data should only be ignored when the corresponding asset is also ignored -!/[Aa]ssets/**/*.meta - # Uncomment this line if you wish to ignore the asset store tools plugin # /[Aa]ssets/AssetStoreTools* @@ -43,18 +40,9 @@ ExportedObj/ *.opendb *.VC.db -# Unity3D generated meta files -*.pidb.meta -*.pdb.meta -*.mdb.meta - -#Ignore all .meta file -*.meta -#But not source file with postfix. which is everything but a folder -!*.*.meta -*.shader.meta -*.md.meta -*.cginc.meta +# Backup files +.bak +.bkp # Unity3D generated file on crash reports sysinfo.txt @@ -64,5 +52,4 @@ sysinfo.txt *.unitypackage # Crashlytics generated file -crashlytics-build.properties - +crashlytics-build.properties \ No newline at end of file diff --git a/LICENSE.meta b/LICENSE.meta new file mode 100644 index 0000000..3692f3f --- /dev/null +++ b/LICENSE.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 658ae7e3deb16ca40a7f09d69d0a550e +timeCreated: 1704967847 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Material.meta b/Material.meta new file mode 100644 index 0000000..ef79893 --- /dev/null +++ b/Material.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 28a4aeee86986f949aff50376b22a1ca +folderAsset: yes +timeCreated: 1579022660 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Material/m_EyePlus.mat b/Material/m_EyePlus.mat new file mode 100644 index 0000000..b540f4d --- /dev/null +++ b/Material/m_EyePlus.mat @@ -0,0 +1,241 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_EyePlus + m_Shader: {fileID: 4800000, guid: 59a7b0c747d3fda439396b983ddca7d8, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 2800000, guid: 2aaeab3cbdeab0448a9753b4fd72f081, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 2800000, guid: 2aaeab3cbdeab0448a9753b4fd72f081, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _expression: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _ExpressionDepth: 1 + - _ExpressionSize: 0.35 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 0 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _exppower: 1 + - _isHighLight: 0 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _rotation: 0 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} + - _shadowcolor: {r: 0.6298235, g: 0.6403289, b: 0.747, a: 1} diff --git a/Material/m_EyePlus.mat.meta b/Material/m_EyePlus.mat.meta new file mode 100644 index 0000000..54d895a --- /dev/null +++ b/Material/m_EyePlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 84de7642a92eaa842b9406691e9214a7 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_EyePlusTess.mat b/Material/m_EyePlusTess.mat new file mode 100644 index 0000000..224f047 --- /dev/null +++ b/Material/m_EyePlusTess.mat @@ -0,0 +1,241 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_EyePlusTess + m_Shader: {fileID: 4800000, guid: 0f1790519b8fee14e916c9fb9efe58b7, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 2800000, guid: 2aaeab3cbdeab0448a9753b4fd72f081, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 2800000, guid: 2aaeab3cbdeab0448a9753b4fd72f081, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _expression: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _ExpressionDepth: 1 + - _ExpressionSize: 0.35 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 0 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _exppower: 1 + - _isHighLight: 0 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _rotation: 0 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} + - _shadowcolor: {r: 0.6298235, g: 0.6403289, b: 0.747, a: 1} diff --git a/Material/m_EyePlusTess.mat.meta b/Material/m_EyePlusTess.mat.meta new file mode 100644 index 0000000..6d01210 --- /dev/null +++ b/Material/m_EyePlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 793b66941dc058f40bb617bc30a9ef76 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_EyeWPlus.mat b/Material/m_EyeWPlus.mat new file mode 100644 index 0000000..67aa1fe --- /dev/null +++ b/Material/m_EyeWPlus.mat @@ -0,0 +1,233 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_EyeWPlus + m_Shader: {fileID: 4800000, guid: e6c16f5a39a5ffa4db72bf62937057fd, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} + - _shadowcolor: {r: 0.6298235, g: 0.6403289, b: 0.747, a: 1} diff --git a/Material/m_EyeWPlus.mat.meta b/Material/m_EyeWPlus.mat.meta new file mode 100644 index 0000000..e4a01b4 --- /dev/null +++ b/Material/m_EyeWPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1b13f60690a549c4a9b9ee0ca6ad150e +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_EyeWPlusTess.mat b/Material/m_EyeWPlusTess.mat new file mode 100644 index 0000000..ed5274b --- /dev/null +++ b/Material/m_EyeWPlusTess.mat @@ -0,0 +1,233 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_EyeWPlusTess + m_Shader: {fileID: 4800000, guid: a38912cbc49d6e84c87d80dcacd57697, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} + - _shadowcolor: {r: 0.6298235, g: 0.6403289, b: 0.747, a: 1} diff --git a/Material/m_EyeWPlusTess.mat.meta b/Material/m_EyeWPlusTess.mat.meta new file mode 100644 index 0000000..542e27d --- /dev/null +++ b/Material/m_EyeWPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0156ec3069e3a6e40ae9c3cec6a5af23 +timeCreated: 1705103732 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairFrontPlus.mat b/Material/m_HairFrontPlus.mat new file mode 100644 index 0000000..3c5c8ce --- /dev/null +++ b/Material/m_HairFrontPlus.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairFrontPlus + m_Shader: {fileID: 4800000, guid: b87fb5d0be14c64498d801687be0c4e7, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairFrontPlus.mat.meta b/Material/m_HairFrontPlus.mat.meta new file mode 100644 index 0000000..2dd64a2 --- /dev/null +++ b/Material/m_HairFrontPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0781cf312213a1f4a917afdedc477134 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairFrontPlusReflect.mat b/Material/m_HairFrontPlusReflect.mat new file mode 100644 index 0000000..67bb55b --- /dev/null +++ b/Material/m_HairFrontPlusReflect.mat @@ -0,0 +1,163 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairFrontPlusReflect + m_Shader: {fileID: 4800000, guid: a049e3d36cc6f1449b847bd015e51018, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisableMatcapWithRamp: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairFrontPlusReflect.mat.meta b/Material/m_HairFrontPlusReflect.mat.meta new file mode 100644 index 0000000..cafb4fe --- /dev/null +++ b/Material/m_HairFrontPlusReflect.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c2dce3aed1b081140b62f64e0787bc04 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairFrontPlusTess.mat b/Material/m_HairFrontPlusTess.mat new file mode 100644 index 0000000..214a5a3 --- /dev/null +++ b/Material/m_HairFrontPlusTess.mat @@ -0,0 +1,154 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairFrontPlusTess + m_Shader: {fileID: 4800000, guid: 90304c540a1356c46aea4e2f197525b1, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairFrontPlusTess.mat.meta b/Material/m_HairFrontPlusTess.mat.meta new file mode 100644 index 0000000..fff4f3c --- /dev/null +++ b/Material/m_HairFrontPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 38883a213e6b5854580154c7d04ba272 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairFrontPlusTessReflect.mat b/Material/m_HairFrontPlusTessReflect.mat new file mode 100644 index 0000000..0d4ba17 --- /dev/null +++ b/Material/m_HairFrontPlusTessReflect.mat @@ -0,0 +1,179 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairFrontPlusTessReflect + m_Shader: {fileID: 4800000, guid: 85972ffba83fda94a92560e04d512985, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisableMatcapWithRamp: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairFrontPlusTessReflect.mat.meta b/Material/m_HairFrontPlusTessReflect.mat.meta new file mode 100644 index 0000000..8ab6225 --- /dev/null +++ b/Material/m_HairFrontPlusTessReflect.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d970bbefd5024e34c850bc597af08a56 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairPlus.mat b/Material/m_HairPlus.mat new file mode 100644 index 0000000..9b1134a --- /dev/null +++ b/Material/m_HairPlus.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairPlus + m_Shader: {fileID: 4800000, guid: 4fefb229824596d42a564d7c13a6638d, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairPlus.mat.meta b/Material/m_HairPlus.mat.meta new file mode 100644 index 0000000..31eaf50 --- /dev/null +++ b/Material/m_HairPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6e4b613a998f32a429cf56e057a44b53 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairPlusReflect.mat b/Material/m_HairPlusReflect.mat new file mode 100644 index 0000000..5a6da1a --- /dev/null +++ b/Material/m_HairPlusReflect.mat @@ -0,0 +1,162 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairPlusReflect + m_Shader: {fileID: 4800000, guid: db5a78ae71a0b6a4fa22da708e34af80, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairPlusReflect.mat.meta b/Material/m_HairPlusReflect.mat.meta new file mode 100644 index 0000000..26e5716 --- /dev/null +++ b/Material/m_HairPlusReflect.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 903cc6783b73e0447ba5c6cb0a90179e +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairPlusTess.mat b/Material/m_HairPlusTess.mat new file mode 100644 index 0000000..0268f73 --- /dev/null +++ b/Material/m_HairPlusTess.mat @@ -0,0 +1,154 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairPlusTess + m_Shader: {fileID: 4800000, guid: 4e5494473a9de7b41933bb0c17eef95f, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairPlusTess.mat.meta b/Material/m_HairPlusTess.mat.meta new file mode 100644 index 0000000..c3ee03f --- /dev/null +++ b/Material/m_HairPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3af67fcd4bf2dfb418f52fa27000ce50 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_HairPlusTessReflect.mat b/Material/m_HairPlusTessReflect.mat new file mode 100644 index 0000000..fffcae3 --- /dev/null +++ b/Material/m_HairPlusTessReflect.mat @@ -0,0 +1,178 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_HairPlusTessReflect + m_Shader: {fileID: 4800000, guid: 2b77e5896e92fc14eacaaa896ecc118b, type: 3} + m_ShaderKeywords: _USELIGHTCOLORSPECULAR_ON _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_HairPlusTessReflect.mat.meta b/Material/m_HairPlusTessReflect.mat.meta new file mode 100644 index 0000000..15c3838 --- /dev/null +++ b/Material/m_HairPlusTessReflect.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 29efbf654a099fc45b94c9d22a98bf93 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainAlphaPlus.mat b/Material/m_MainAlphaPlus.mat new file mode 100644 index 0000000..1a242dc --- /dev/null +++ b/Material/m_MainAlphaPlus.mat @@ -0,0 +1,247 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainAlphaPlus + m_Shader: {fileID: 4800000, guid: 5384bc1d1aae69d4bacc9d1b743e69f5, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _Alpha: 1 + - _AlphaOptionCutoff: 1 + - _AlphaOptionZWrite: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainAlphaPlus.mat.meta b/Material/m_MainAlphaPlus.mat.meta new file mode 100644 index 0000000..905d2b9 --- /dev/null +++ b/Material/m_MainAlphaPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 79b03fc03a79c9d4c9f8c99a4db0ee45 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainAlphaPlusTess.mat b/Material/m_MainAlphaPlusTess.mat new file mode 100644 index 0000000..69f03f2 --- /dev/null +++ b/Material/m_MainAlphaPlusTess.mat @@ -0,0 +1,249 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainAlphaPlusTess + m_Shader: {fileID: 4800000, guid: 05815dbd21eb6bb42ac975d25367314c, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _Alpha: 1 + - _AlphaOptionCutoff: 1 + - _AlphaOptionZWrite: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 0 + - _ShrinkVal: 1 + - _ShrinkVerticalAdjust: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainAlphaPlusTess.mat.meta b/Material/m_MainAlphaPlusTess.mat.meta new file mode 100644 index 0000000..6ee09e4 --- /dev/null +++ b/Material/m_MainAlphaPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: edf006a18abec6a458e67e8fa08294ba +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemAlphaPlus.mat b/Material/m_MainItemAlphaPlus.mat new file mode 100644 index 0000000..79651b1 --- /dev/null +++ b/Material/m_MainItemAlphaPlus.mat @@ -0,0 +1,249 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemAlphaPlus + m_Shader: {fileID: 4800000, guid: ac4054d27c47a8a4fa8092d02515af92, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _Alpha: 1 + - _AlphaOptionCutoff: 1 + - _AlphaOptionZWrite: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 2 + - _Cutoff: 0.5 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemAlphaPlus.mat.meta b/Material/m_MainItemAlphaPlus.mat.meta new file mode 100644 index 0000000..6aad1e9 --- /dev/null +++ b/Material/m_MainItemAlphaPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4e069d64799c40d4ca99774a877e05e4 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemAlphaPlusTess.mat b/Material/m_MainItemAlphaPlusTess.mat new file mode 100644 index 0000000..b45b69b --- /dev/null +++ b/Material/m_MainItemAlphaPlusTess.mat @@ -0,0 +1,252 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemAlphaPlusTess + m_Shader: {fileID: 4800000, guid: 403e9e278d2c15746ab085b3101b3bd6, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _Alpha: 1 + - _AlphaOptionCutoff: 1 + - _AlphaOptionZWrite: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 2 + - _Cutoff: 0.5 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _ShrinkVal: 1 + - _ShrinkVerticalAdjust: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _ClockDisp: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemAlphaPlusTess.mat.meta b/Material/m_MainItemAlphaPlusTess.mat.meta new file mode 100644 index 0000000..797be2a --- /dev/null +++ b/Material/m_MainItemAlphaPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ddadb4cad16f2bf4f822170350bbaf0b +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemPlus.mat b/Material/m_MainItemPlus.mat new file mode 100644 index 0000000..5c4b846 --- /dev/null +++ b/Material/m_MainItemPlus.mat @@ -0,0 +1,247 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemPlus + m_Shader: {fileID: 4800000, guid: 2402ddf9cbb3d6d4da5f6fb2083fe8e1, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _AlphaOptionCutoff: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.355 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemPlus.mat.meta b/Material/m_MainItemPlus.mat.meta new file mode 100644 index 0000000..7ff88aa --- /dev/null +++ b/Material/m_MainItemPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 21d2d364f31270e4190945c8f5bbe610 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemPlusTess.mat b/Material/m_MainItemPlusTess.mat new file mode 100644 index 0000000..58be7c5 --- /dev/null +++ b/Material/m_MainItemPlusTess.mat @@ -0,0 +1,252 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemPlusTess + m_Shader: {fileID: 4800000, guid: e5e23da4bbd8b404a87ee8f49a824fec, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _Alpha: 1 + - _AlphaOptionCutoff: 1 + - _AlphaOptionZWrite: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.355 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _ShrinkVal: 1 + - _ShrinkVerticalAdjust: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _ClockDisp: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemPlusTess.mat.meta b/Material/m_MainItemPlusTess.mat.meta new file mode 100644 index 0000000..d687d4a --- /dev/null +++ b/Material/m_MainItemPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0862ddeaf4beb3549a2e6a5764ca4122 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemStudioAlphaPlus.mat b/Material/m_MainItemStudioAlphaPlus.mat new file mode 100644 index 0000000..1ecf699 --- /dev/null +++ b/Material/m_MainItemStudioAlphaPlus.mat @@ -0,0 +1,274 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemStudioAlphaPlus + m_Shader: {fileID: 4800000, guid: 51583935ccf6e3b4997d1fd89efed40d, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _AlphaOptionCutoff: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.355 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _EmissionPower: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _ambientshadowOFF: 0 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _patternclamp1: 0 + - _patternclamp2: 0 + - _patternclamp3: 0 + - _patternrotator1: 0 + - _patternrotator2: 0 + - _patternrotator3: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color1_2: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color2_2: {r: 1, g: 1, b: 1, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color3_2: {r: 1, g: 1, b: 1, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _Patternuv1: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv2: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv3: {r: 0, g: 0, b: 1, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemStudioAlphaPlus.mat.meta b/Material/m_MainItemStudioAlphaPlus.mat.meta new file mode 100644 index 0000000..56d2174 --- /dev/null +++ b/Material/m_MainItemStudioAlphaPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8d615b415f0dc4542a4463a90bd06007 +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemStudioAlphaPlusTess.mat b/Material/m_MainItemStudioAlphaPlusTess.mat new file mode 100644 index 0000000..46773f6 --- /dev/null +++ b/Material/m_MainItemStudioAlphaPlusTess.mat @@ -0,0 +1,277 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemStudioAlphaPlusTess + m_Shader: {fileID: 4800000, guid: 124e802e24fa3aa4d933edcb968f7e62, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _AlphaOptionCutoff: 1 + - _AlphaOptionZWrite: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.355 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _EmissionPower: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _ShrinkVal: 1 + - _ShrinkVerticalAdjust: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _ambientshadowOFF: 0 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _patternclamp1: 0 + - _patternclamp2: 0 + - _patternclamp3: 0 + - _patternrotator1: 0 + - _patternrotator2: 0 + - _patternrotator3: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color1_2: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color2_2: {r: 1, g: 1, b: 1, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color3_2: {r: 1, g: 1, b: 1, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _Patternuv1: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv2: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv3: {r: 0, g: 0, b: 1, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemStudioAlphaPlusTess.mat.meta b/Material/m_MainItemStudioAlphaPlusTess.mat.meta new file mode 100644 index 0000000..6c31bc8 --- /dev/null +++ b/Material/m_MainItemStudioAlphaPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b8124c615e80a3a4382b953684df22b1 +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemStudioPlus.mat b/Material/m_MainItemStudioPlus.mat new file mode 100644 index 0000000..f165967 --- /dev/null +++ b/Material/m_MainItemStudioPlus.mat @@ -0,0 +1,273 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemStudioPlus + m_Shader: {fileID: 4800000, guid: 59ddb829fb390a5489ccefd105b41c19, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _AlphaOptionCutoff: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.355 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _EmissionPower: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _ambientshadowOFF: 0 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _patternclamp1: 0 + - _patternclamp2: 0 + - _patternclamp3: 0 + - _patternrotator1: 0 + - _patternrotator2: 0 + - _patternrotator3: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color1_2: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color2_2: {r: 1, g: 1, b: 1, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color3_2: {r: 1, g: 1, b: 1, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _Patternuv1: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv2: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv3: {r: 0, g: 0, b: 1, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemStudioPlus.mat.meta b/Material/m_MainItemStudioPlus.mat.meta new file mode 100644 index 0000000..612e6ed --- /dev/null +++ b/Material/m_MainItemStudioPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a5e268b9dcf05747b84cced167a8fcf +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainItemStudioPlusTess.mat b/Material/m_MainItemStudioPlusTess.mat new file mode 100644 index 0000000..3b27e24 --- /dev/null +++ b/Material/m_MainItemStudioPlusTess.mat @@ -0,0 +1,275 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainItemStudioPlusTess + m_Shader: {fileID: 4800000, guid: 9f7dc4b00a87990408e507d084be3351, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _PatternMask3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _AlphaOptionCutoff: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.355 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _EmissionPower: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 0.75 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 1 + - _ShrinkVal: 1 + - _ShrinkVerticalAdjust: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _ambientshadowOFF: 0 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _patternclamp1: 0 + - _patternclamp2: 0 + - _patternclamp3: 0 + - _patternrotator1: 0 + - _patternrotator2: 0 + - _patternrotator3: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color1_2: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color2_2: {r: 1, g: 1, b: 1, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color3_2: {r: 1, g: 1, b: 1, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _Patternuv1: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv2: {r: 0, g: 0, b: 1, a: 1} + - _Patternuv3: {r: 0, g: 0, b: 1, a: 1} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainItemStudioPlusTess.mat.meta b/Material/m_MainItemStudioPlusTess.mat.meta new file mode 100644 index 0000000..03d2e05 --- /dev/null +++ b/Material/m_MainItemStudioPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8f1d3d3e1cdb5d04bafe1c82b88284e4 +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainOpaquePlus.mat b/Material/m_MainOpaquePlus.mat new file mode 100644 index 0000000..33e2527 --- /dev/null +++ b/Material/m_MainOpaquePlus.mat @@ -0,0 +1,246 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainOpaquePlus + m_Shader: {fileID: 4800000, guid: fe91f80e337b9f4478bda3ed090fba9f, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _NOTUSETEXSPECULAR_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _AlphaOptionCutoff: 1 + - _AnotherRampFull: 0 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadoweMatcap: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 1 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 1 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainOpaquePlus.mat.meta b/Material/m_MainOpaquePlus.mat.meta new file mode 100644 index 0000000..a0931ee --- /dev/null +++ b/Material/m_MainOpaquePlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6bf1ae0131d39c049b91cf17c6d0e4cc +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_MainOpaquePlusTess.mat b/Material/m_MainOpaquePlusTess.mat new file mode 100644 index 0000000..d980d8c --- /dev/null +++ b/Material/m_MainOpaquePlusTess.mat @@ -0,0 +1,261 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_MainOpaquePlusTess + m_Shader: {fileID: 4800000, guid: 0424c4cb2dc0e91489386a71575905d0, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _NOTUSETEXSPECULAR_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON _USERAMPFORSHADOWS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectPattern: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectPatternasd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _AlphaOptionCutoff: 1 + - _AnotherRampFull: 1 + - _BumpScale: 1 + - _CullOption: 0 + - _Cutoff: 0.5 + - _DetailBLineG: 0 + - _DetailNormalMapScale: 1 + - _DetailRLineR: 0 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Reflective: 1 + - _ReflectiveBlend: 0.05 + - _ReflectiveMulOrAdd: 1 + - _ReflectiveOverlayed: 0 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _ShadowExtendAnother: 0 + - _ShrinkVal: 1 + - _ShrinkVerticalAdjust: 0 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKMetal: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 1 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_MainOpaquePlusTess.mat.meta b/Material/m_MainOpaquePlusTess.mat.meta new file mode 100644 index 0000000..9f1f2f0 --- /dev/null +++ b/Material/m_MainOpaquePlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 41eccbd8ca958004389e841c17ca8be9 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_SkinPlus.mat b/Material/m_SkinPlus.mat new file mode 100644 index 0000000..eae4aa5 --- /dev/null +++ b/Material/m_SkinPlus.mat @@ -0,0 +1,203 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_SkinPlus + m_Shader: {fileID: 4800000, guid: d820fcf50db6831439cef30c94145ce7, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Diffuse: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Normal: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ShadowColor: {r: 0.627451, g: 0.627451, b: 0.627451, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_SkinPlus.mat.meta b/Material/m_SkinPlus.mat.meta new file mode 100644 index 0000000..536695b --- /dev/null +++ b/Material/m_SkinPlus.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bcbb63346dd10c845aef6d55928971c8 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_SkinPlusReflect.mat b/Material/m_SkinPlusReflect.mat new file mode 100644 index 0000000..2974b79 --- /dev/null +++ b/Material/m_SkinPlusReflect.mat @@ -0,0 +1,219 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_SkinPlusReflect + m_Shader: {fileID: 4800000, guid: 0e6d3be3e71a87e449bcb0a8eed111f1, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON _USERAMPFORSHADOWS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.627451, g: 0.627451, b: 0.627451, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_SkinPlusReflect.mat.meta b/Material/m_SkinPlusReflect.mat.meta new file mode 100644 index 0000000..e16e108 --- /dev/null +++ b/Material/m_SkinPlusReflect.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e6110796fcbcd5743aea78ba00efe993 +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_SkinPlusTess.mat b/Material/m_SkinPlusTess.mat new file mode 100644 index 0000000..18c0118 --- /dev/null +++ b/Material/m_SkinPlusTess.mat @@ -0,0 +1,212 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_SkinPlusTess + m_Shader: {fileID: 4800000, guid: f059880ff480b7c4a876100c0ec65379, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 0 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_SkinPlusTess.mat.meta b/Material/m_SkinPlusTess.mat.meta new file mode 100644 index 0000000..ffad35d --- /dev/null +++ b/Material/m_SkinPlusTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 19345391ee85dbf499ac464c2a26ec4c +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_SkinPlusTessReflect.mat b/Material/m_SkinPlusTessReflect.mat new file mode 100644 index 0000000..4b7986d --- /dev/null +++ b/Material/m_SkinPlusTessReflect.mat @@ -0,0 +1,236 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_SkinPlusTessReflect + m_Shader: {fileID: 4800000, guid: 079540e42ce71e4479f822e82e1b3d64, type: 3} + m_ShaderKeywords: _ALPHA_A_ON _ALPHA_B_ON _LINETEXON_ON _USELIGHTCOLORSPECULAR_ON + _USERAMPFORLIGHTS_ON _USERAMPFORSHADOWS_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _AnotherRamp: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HairGloss: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapDetail: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ReflectionMapCap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _liquidmask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex1: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex2: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _overtex3: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AdjustBackfaceNormals: 0 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisableMapLights: 0 + - _DisablePointLights: 0 + - _DisableShadowedMatcap: 0 + - _DisplaceFull: 0 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _EmissionIntensity: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _KKPRimAsDiffuse: 0 + - _KKPRimIntensity: 0.75 + - _KKPRimRotateX: 0 + - _KKPRimRotateY: 0 + - _KKPRimSoft: 1.5 + - _LineWidthS: 1 + - _Metallic: 0 + - _Mode: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _OutlineOn: 1 + - _Parallax: 0.02 + - _ReflBlendDst: 0 + - _ReflBlendSrc: 2 + - _ReflBlendVal: 1 + - _ReflectColAlphaOpt: 0 + - _ReflectColColorOpt: 0 + - _ReflectColMix: 1 + - _ReflectRotation: 0 + - _ReflectionVal: 1 + - _Roughness: 0.75 + - _ShadowExtend: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpeclarHeight: 0.85 + - _SpecularHairPower: 1 + - _SpecularHeightInvert: 0 + - _SpecularHighlights: 1 + - _SpecularIsHighLightsPow: 64 + - _SpecularIsHighlights: 0 + - _SpecularIsHighlightsRange: 5 + - _SpecularPower: 0 + - _SpecularPowerNail: 0 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 4 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDetailRAsSpecularMap: 0 + - _UseKKPRim: 0 + - _UseLightColorSpecular: 1 + - _UseMatCapReflection: 1 + - _UseMeshSpecular: 0 + - _UseRampForLights: 1 + - _UseRampForShadows: 1 + - _UseRampForSpecular: 0 + - _ZWrite: 1 + - _alpha_a: 1 + - _alpha_b: 1 + - _linetexon: 1 + - _liquidbbot: 0 + - _liquidbtop: 0 + - _liquidface: 0 + - _liquidfbot: 0 + - _liquidftop: 0 + - _nip: 0 + - _nip_specular: 0.5 + - _nipsize: 0.5 + - _notusetexspecular: 0 + - _rimReflectMode: 0 + - _rimV: 0.75 + - _rimpower: 0.5 + - _tex1mask: 0 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color2: {r: 0.7843137, g: 0.7843137, b: 0.7843137, a: 1} + - _Color3: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _CustomAmbient: {r: 0.6666667, g: 0.6666667, b: 0.6666667, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GlossColor: {r: 1, g: 1, b: 1, a: 1} + - _KKPRimColor: {r: 1, g: 1, b: 1, a: 1} + - _LineColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _LiquidTiling: {r: 0, g: 0, b: 2, a: 2} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 0} + - _ReflectCol: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0.628, g: 0.628, b: 0.628, a: 1} + - _ShadowHSV: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _overcolor1: {r: 1, g: 1, b: 1, a: 1} + - _overcolor2: {r: 1, g: 1, b: 1, a: 1} + - _overcolor3: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_SkinPlusTessReflect.mat.meta b/Material/m_SkinPlusTessReflect.mat.meta new file mode 100644 index 0000000..fe03d2d --- /dev/null +++ b/Material/m_SkinPlusTessReflect.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8ff6023295c6e10468d010a065d39e0e +timeCreated: 1701363617 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Material/m_WireframeTess.mat b/Material/m_WireframeTess.mat new file mode 100644 index 0000000..6a8d20c --- /dev/null +++ b/Material/m_WireframeTess.mat @@ -0,0 +1,98 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: m_WireframeTess + m_Shader: {fileID: 4800000, guid: 9c14b98a4a6636040b6463cb30f7d0e1, type: 3} + m_ShaderKeywords: _USEDISCARD_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplaceTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TessTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DisplaceMultiplier: 0 + - _DisplaceNormalMultiplier: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ShrinkVal: 1 + - _ShrinkVerticalAdjust: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _TessBias: 75 + - _TessMax: 12 + - _TessMin: 1 + - _TessSmooth: 0 + - _Tolerance: 0.0005 + - _UVSec: 0 + - _UseDiscard: 1 + - _WireThickness: 0.5 + - _ZWrite: 1 + m_Colors: + - _Clock: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _FillColor: {r: 0, g: 0, b: 0, a: 0} + - _LineColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Material/m_WireframeTess.mat.meta b/Material/m_WireframeTess.mat.meta new file mode 100644 index 0000000..94b284d --- /dev/null +++ b/Material/m_WireframeTess.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b0396a537c4392343a4f56249ad7645f +timeCreated: 1701364127 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab.meta b/Prefab.meta new file mode 100644 index 0000000..d8f497b --- /dev/null +++ b/Prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6e27194825d60f4458fad960310b5f59 +folderAsset: yes +timeCreated: 1579022660 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Prefab/a_EyePlus.prefab b/Prefab/a_EyePlus.prefab new file mode 100644 index 0000000..0142d2a --- /dev/null +++ b/Prefab/a_EyePlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_EyePlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 84de7642a92eaa842b9406691e9214a7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_EyePlus.prefab.meta b/Prefab/a_EyePlus.prefab.meta new file mode 100644 index 0000000..dea7aef --- /dev/null +++ b/Prefab/a_EyePlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7deb45754f3767f4b80b444fa43ec711 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_EyePlusTess.prefab b/Prefab/a_EyePlusTess.prefab new file mode 100644 index 0000000..923d172 --- /dev/null +++ b/Prefab/a_EyePlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_EyePlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 793b66941dc058f40bb617bc30a9ef76, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_EyePlusTess.prefab.meta b/Prefab/a_EyePlusTess.prefab.meta new file mode 100644 index 0000000..8536e51 --- /dev/null +++ b/Prefab/a_EyePlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c86da68935835e344b9851ebe04f4465 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_EyeWPlus.prefab b/Prefab/a_EyeWPlus.prefab new file mode 100644 index 0000000..42e2561 --- /dev/null +++ b/Prefab/a_EyeWPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_EyeWPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 1b13f60690a549c4a9b9ee0ca6ad150e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_EyeWPlus.prefab.meta b/Prefab/a_EyeWPlus.prefab.meta new file mode 100644 index 0000000..39043fb --- /dev/null +++ b/Prefab/a_EyeWPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 78aa44dace741e340a8e06de813ec9d6 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_EyeWPlusTess.prefab b/Prefab/a_EyeWPlusTess.prefab new file mode 100644 index 0000000..44c9a51 --- /dev/null +++ b/Prefab/a_EyeWPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_EyeWPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 0156ec3069e3a6e40ae9c3cec6a5af23, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_EyeWPlusTess.prefab.meta b/Prefab/a_EyeWPlusTess.prefab.meta new file mode 100644 index 0000000..647c413 --- /dev/null +++ b/Prefab/a_EyeWPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5b1d316a7126c584884dd13e4d8e66ad +timeCreated: 1705103732 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairFrontPlus.prefab b/Prefab/a_HairFrontPlus.prefab new file mode 100644 index 0000000..9fcbc81 --- /dev/null +++ b/Prefab/a_HairFrontPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairFrontPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 0781cf312213a1f4a917afdedc477134, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairFrontPlus.prefab.meta b/Prefab/a_HairFrontPlus.prefab.meta new file mode 100644 index 0000000..57d244b --- /dev/null +++ b/Prefab/a_HairFrontPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a82643b2e2af46840a4d76289e6418f8 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairFrontPlusReflect.prefab b/Prefab/a_HairFrontPlusReflect.prefab new file mode 100644 index 0000000..f02bdd5 --- /dev/null +++ b/Prefab/a_HairFrontPlusReflect.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairFrontPlusReflect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: c2dce3aed1b081140b62f64e0787bc04, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairFrontPlusReflect.prefab.meta b/Prefab/a_HairFrontPlusReflect.prefab.meta new file mode 100644 index 0000000..9848bcb --- /dev/null +++ b/Prefab/a_HairFrontPlusReflect.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2ff0af58b34c122438d5342649fda132 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairFrontPlusTess.prefab b/Prefab/a_HairFrontPlusTess.prefab new file mode 100644 index 0000000..bb6a370 --- /dev/null +++ b/Prefab/a_HairFrontPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairFrontPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 38883a213e6b5854580154c7d04ba272, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairFrontPlusTess.prefab.meta b/Prefab/a_HairFrontPlusTess.prefab.meta new file mode 100644 index 0000000..f6f7060 --- /dev/null +++ b/Prefab/a_HairFrontPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9b56b0a6015bb4b428e27a2c6656e839 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairFrontPlusTessReflect.prefab b/Prefab/a_HairFrontPlusTessReflect.prefab new file mode 100644 index 0000000..45702df --- /dev/null +++ b/Prefab/a_HairFrontPlusTessReflect.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairFrontPlusTessReflect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: d970bbefd5024e34c850bc597af08a56, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairFrontPlusTessReflect.prefab.meta b/Prefab/a_HairFrontPlusTessReflect.prefab.meta new file mode 100644 index 0000000..5022d48 --- /dev/null +++ b/Prefab/a_HairFrontPlusTessReflect.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f8371393b1825fe469faf847f3c30b52 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairPlus.prefab b/Prefab/a_HairPlus.prefab new file mode 100644 index 0000000..dab22fb --- /dev/null +++ b/Prefab/a_HairPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 6e4b613a998f32a429cf56e057a44b53, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairPlus.prefab.meta b/Prefab/a_HairPlus.prefab.meta new file mode 100644 index 0000000..20d1595 --- /dev/null +++ b/Prefab/a_HairPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e4e0f485265557544bb0a9e394bdf588 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairPlusReflect.prefab b/Prefab/a_HairPlusReflect.prefab new file mode 100644 index 0000000..3977a11 --- /dev/null +++ b/Prefab/a_HairPlusReflect.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairPlusReflect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 903cc6783b73e0447ba5c6cb0a90179e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairPlusReflect.prefab.meta b/Prefab/a_HairPlusReflect.prefab.meta new file mode 100644 index 0000000..c7cfa55 --- /dev/null +++ b/Prefab/a_HairPlusReflect.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: aabdaa75d54f7134886be366439cfd1d +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairPlusTess.prefab b/Prefab/a_HairPlusTess.prefab new file mode 100644 index 0000000..857687b --- /dev/null +++ b/Prefab/a_HairPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 3af67fcd4bf2dfb418f52fa27000ce50, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairPlusTess.prefab.meta b/Prefab/a_HairPlusTess.prefab.meta new file mode 100644 index 0000000..e712108 --- /dev/null +++ b/Prefab/a_HairPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f2560d9457e581b4b92bfb799a7b0547 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_HairPlusTessReflect.prefab b/Prefab/a_HairPlusTessReflect.prefab new file mode 100644 index 0000000..123598a --- /dev/null +++ b/Prefab/a_HairPlusTessReflect.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_HairPlusTessReflect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 29efbf654a099fc45b94c9d22a98bf93, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_HairPlusTessReflect.prefab.meta b/Prefab/a_HairPlusTessReflect.prefab.meta new file mode 100644 index 0000000..d463dfd --- /dev/null +++ b/Prefab/a_HairPlusTessReflect.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a4e98cf011baa054eb66a60873caf53d +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainAlphaPlus.prefab b/Prefab/a_MainAlphaPlus.prefab new file mode 100644 index 0000000..b8ef257 --- /dev/null +++ b/Prefab/a_MainAlphaPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainAlphaPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 79b03fc03a79c9d4c9f8c99a4db0ee45, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainAlphaPlus.prefab.meta b/Prefab/a_MainAlphaPlus.prefab.meta new file mode 100644 index 0000000..9805709 --- /dev/null +++ b/Prefab/a_MainAlphaPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e03ee15c0bf3aa643a347433e95ae7df +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainAlphaPlusTess.prefab b/Prefab/a_MainAlphaPlusTess.prefab new file mode 100644 index 0000000..723db0c --- /dev/null +++ b/Prefab/a_MainAlphaPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainAlphaPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: edf006a18abec6a458e67e8fa08294ba, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainAlphaPlusTess.prefab.meta b/Prefab/a_MainAlphaPlusTess.prefab.meta new file mode 100644 index 0000000..007bcc5 --- /dev/null +++ b/Prefab/a_MainAlphaPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2cb55af2f7307c245816263f239a3096 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemAlphaPlus.prefab b/Prefab/a_MainItemAlphaPlus.prefab new file mode 100644 index 0000000..5969275 --- /dev/null +++ b/Prefab/a_MainItemAlphaPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemAlphaPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 4e069d64799c40d4ca99774a877e05e4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemAlphaPlus.prefab.meta b/Prefab/a_MainItemAlphaPlus.prefab.meta new file mode 100644 index 0000000..bd369c9 --- /dev/null +++ b/Prefab/a_MainItemAlphaPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 722c0c67679d8e8449b36f25cf99678b +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemAlphaPlusTess.prefab b/Prefab/a_MainItemAlphaPlusTess.prefab new file mode 100644 index 0000000..ebf1586 --- /dev/null +++ b/Prefab/a_MainItemAlphaPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemAlphaPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: ddadb4cad16f2bf4f822170350bbaf0b, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemAlphaPlusTess.prefab.meta b/Prefab/a_MainItemAlphaPlusTess.prefab.meta new file mode 100644 index 0000000..99d12a6 --- /dev/null +++ b/Prefab/a_MainItemAlphaPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f3739a57ddcf9064ab2164c1305a844e +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemPlus.prefab b/Prefab/a_MainItemPlus.prefab new file mode 100644 index 0000000..6507bed --- /dev/null +++ b/Prefab/a_MainItemPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 21d2d364f31270e4190945c8f5bbe610, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemPlus.prefab.meta b/Prefab/a_MainItemPlus.prefab.meta new file mode 100644 index 0000000..efb438d --- /dev/null +++ b/Prefab/a_MainItemPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 182ae1ec0954a9c409134ebaf9293768 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemPlusTess.prefab b/Prefab/a_MainItemPlusTess.prefab new file mode 100644 index 0000000..7bfe633 --- /dev/null +++ b/Prefab/a_MainItemPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 0862ddeaf4beb3549a2e6a5764ca4122, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemPlusTess.prefab.meta b/Prefab/a_MainItemPlusTess.prefab.meta new file mode 100644 index 0000000..56eef06 --- /dev/null +++ b/Prefab/a_MainItemPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f600f833f4ddaa5408e132b96c8c69ae +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemStudioAlphaPlus.prefab b/Prefab/a_MainItemStudioAlphaPlus.prefab new file mode 100644 index 0000000..a8c9328 --- /dev/null +++ b/Prefab/a_MainItemStudioAlphaPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemStudioAlphaPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8d615b415f0dc4542a4463a90bd06007, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemStudioAlphaPlus.prefab.meta b/Prefab/a_MainItemStudioAlphaPlus.prefab.meta new file mode 100644 index 0000000..363d4b5 --- /dev/null +++ b/Prefab/a_MainItemStudioAlphaPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c782c843c80dc84baaf22843d9abc35 +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemStudioAlphaPlusTess.prefab b/Prefab/a_MainItemStudioAlphaPlusTess.prefab new file mode 100644 index 0000000..67188e1 --- /dev/null +++ b/Prefab/a_MainItemStudioAlphaPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemStudioAlphaPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: b8124c615e80a3a4382b953684df22b1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemStudioAlphaPlusTess.prefab.meta b/Prefab/a_MainItemStudioAlphaPlusTess.prefab.meta new file mode 100644 index 0000000..79182cb --- /dev/null +++ b/Prefab/a_MainItemStudioAlphaPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d986af53b7953a64e943fcf4209a878b +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemStudioPlus.prefab b/Prefab/a_MainItemStudioPlus.prefab new file mode 100644 index 0000000..cab88d4 --- /dev/null +++ b/Prefab/a_MainItemStudioPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemStudioPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 0a5e268b9dcf05747b84cced167a8fcf, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemStudioPlus.prefab.meta b/Prefab/a_MainItemStudioPlus.prefab.meta new file mode 100644 index 0000000..63a511b --- /dev/null +++ b/Prefab/a_MainItemStudioPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c8709cef84d32d4b986a19e4eba23e1 +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainItemStudioPlusTess.prefab b/Prefab/a_MainItemStudioPlusTess.prefab new file mode 100644 index 0000000..c98acce --- /dev/null +++ b/Prefab/a_MainItemStudioPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainItemStudioPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8f1d3d3e1cdb5d04bafe1c82b88284e4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainItemStudioPlusTess.prefab.meta b/Prefab/a_MainItemStudioPlusTess.prefab.meta new file mode 100644 index 0000000..3bc9c9e --- /dev/null +++ b/Prefab/a_MainItemStudioPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3ee7b3cd4fd01cc4ab1dc2b1eb6d6113 +timeCreated: 1705725509 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainOpaquePlus.prefab b/Prefab/a_MainOpaquePlus.prefab new file mode 100644 index 0000000..1841e6a --- /dev/null +++ b/Prefab/a_MainOpaquePlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainOpaquePlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 6bf1ae0131d39c049b91cf17c6d0e4cc, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainOpaquePlus.prefab.meta b/Prefab/a_MainOpaquePlus.prefab.meta new file mode 100644 index 0000000..5346faa --- /dev/null +++ b/Prefab/a_MainOpaquePlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4f32416ed4986094492a050ea3202f67 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_MainOpaquePlusTess.prefab b/Prefab/a_MainOpaquePlusTess.prefab new file mode 100644 index 0000000..3477a9c --- /dev/null +++ b/Prefab/a_MainOpaquePlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_MainOpaquePlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 41eccbd8ca958004389e841c17ca8be9, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_MainOpaquePlusTess.prefab.meta b/Prefab/a_MainOpaquePlusTess.prefab.meta new file mode 100644 index 0000000..fe6335d --- /dev/null +++ b/Prefab/a_MainOpaquePlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3cb6e769ffbe3c24b84ac3e4c2a6a49e +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_SkinPlus.prefab b/Prefab/a_SkinPlus.prefab new file mode 100644 index 0000000..2831074 --- /dev/null +++ b/Prefab/a_SkinPlus.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_SkinPlus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: bcbb63346dd10c845aef6d55928971c8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_SkinPlus.prefab.meta b/Prefab/a_SkinPlus.prefab.meta new file mode 100644 index 0000000..77c7ccd --- /dev/null +++ b/Prefab/a_SkinPlus.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4f8d4256a6791324aad98e663306859e +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_SkinPlusReflect.prefab b/Prefab/a_SkinPlusReflect.prefab new file mode 100644 index 0000000..2ba4752 --- /dev/null +++ b/Prefab/a_SkinPlusReflect.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_SkinPlusReflect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: e6110796fcbcd5743aea78ba00efe993, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_SkinPlusReflect.prefab.meta b/Prefab/a_SkinPlusReflect.prefab.meta new file mode 100644 index 0000000..41722ee --- /dev/null +++ b/Prefab/a_SkinPlusReflect.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9899861f460e9bb4b98d8e5c3244d5ad +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_SkinPlusTess.prefab b/Prefab/a_SkinPlusTess.prefab new file mode 100644 index 0000000..6d3815d --- /dev/null +++ b/Prefab/a_SkinPlusTess.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1427211805390726} + m_IsPrefabParent: 1 +--- !u!1 &1427211805390726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4764110498794466} + - component: {fileID: 33751977537682748} + - component: {fileID: 135719201586893358} + - component: {fileID: 23911842700600096} + - component: {fileID: 114026440146529810} + m_Layer: 10 + m_Name: a_SkinPlusTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4764110498794466 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23911842700600096 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 19345391ee85dbf499ac464c2a26ec4c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33751977537682748 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114026440146529810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23911842700600096} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135719201586893358 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1427211805390726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_SkinPlusTess.prefab.meta b/Prefab/a_SkinPlusTess.prefab.meta new file mode 100644 index 0000000..1eec822 --- /dev/null +++ b/Prefab/a_SkinPlusTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 50ccfef5594facb4f8fe3e282ac99632 +timeCreated: 1701364404 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_SkinPlusTessReflect.prefab b/Prefab/a_SkinPlusTessReflect.prefab new file mode 100644 index 0000000..f0f2401 --- /dev/null +++ b/Prefab/a_SkinPlusTessReflect.prefab @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1717055361528400} + m_IsPrefabParent: 1 +--- !u!1 &1717055361528400 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4752428235870822} + - component: {fileID: 33570163892335586} + - component: {fileID: 135253069656145064} + - component: {fileID: 23220334255066366} + - component: {fileID: 114876317821007656} + m_Layer: 10 + m_Name: a_SkinPlusTessReflect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4752428235870822 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1717055361528400} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23220334255066366 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1717055361528400} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 8ff6023295c6e10468d010a065d39e0e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33570163892335586 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1717055361528400} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &114876317821007656 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1717055361528400} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d263bf6a533ea429ec86cb7d9913d7, type: 3} + m_Name: + m_EditorClassIdentifier: + rendNormal: + - {fileID: 23220334255066366} + rendAlpha: [] + rendGlass: [] + info: + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + - useColor: 0 + defColor: {r: 1, g: 1, b: 1, a: 1} + usePattern: 1 + defColorPattern: {r: 1, g: 1, b: 1, a: 1} + defClamp: 1 + defUV: {x: 0, y: 0, z: 0, w: 0} + defRot: 0 + defShadow: {r: 1, g: 1, b: 1, a: 1} + alpha: 1 + defGlass: {r: 1, g: 1, b: 1, a: 1} + defLineColor: {r: 1, g: 1, b: 1, a: 1} + defLineWidth: 1 + defEmissionColor: {r: 1, g: 1, b: 1, a: 1} + defEmissionPower: 0 + defLightCancel: 0 + setcolor: 0 +--- !u!135 &135253069656145064 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1717055361528400} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_SkinPlusTessReflect.prefab.meta b/Prefab/a_SkinPlusTessReflect.prefab.meta new file mode 100644 index 0000000..77a3a15 --- /dev/null +++ b/Prefab/a_SkinPlusTessReflect.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 99a88e8402c9f3c4686a7aae5011c14c +timeCreated: 1701365611 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/Prefab/a_WireframeTess.prefab b/Prefab/a_WireframeTess.prefab new file mode 100644 index 0000000..c459291 --- /dev/null +++ b/Prefab/a_WireframeTess.prefab @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1784378117656772} + m_IsPrefabParent: 1 +--- !u!1 &1784378117656772 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4331619346906574} + - component: {fileID: 33848474899838288} + - component: {fileID: 135339091526163532} + - component: {fileID: 23373918564156864} + m_Layer: 10 + m_Name: a_WireframeTess + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4331619346906574 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1784378117656772} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23373918564156864 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1784378117656772} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: b0396a537c4392343a4f56249ad7645f, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33848474899838288 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1784378117656772} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!135 &135339091526163532 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1784378117656772} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Prefab/a_WireframeTess.prefab.meta b/Prefab/a_WireframeTess.prefab.meta new file mode 100644 index 0000000..76a1d13 --- /dev/null +++ b/Prefab/a_WireframeTess.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d2cc976581f4e594c9c0fa1bff4e4f6d +timeCreated: 1701364368 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: chara/xukmi/shaders/vanillaplus.unity3d + assetBundleVariant: diff --git a/README.md.meta b/README.md.meta new file mode 100644 index 0000000..717318a --- /dev/null +++ b/README.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd0ef1829e98e184e9bd056ae5ac0918 +timeCreated: 1704967847 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders.meta b/Shaders.meta index 4ee064d..372d830 100644 --- a/Shaders.meta +++ b/Shaders.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: fb00a6fba8527704f8f3df54d67d1cf1 +guid: 9d1980a892b2d894ab584df088afe69b folderAsset: yes -timeCreated: 1639855733 +timeCreated: 1705466960 licenseType: Free DefaultImporter: userData: diff --git a/Shaders/Debug.meta b/Shaders/Debug.meta new file mode 100644 index 0000000..a620469 --- /dev/null +++ b/Shaders/Debug.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: abd825993b806a74d87b7216ad89913d +folderAsset: yes +timeCreated: 1705466960 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Debug/TessDebug.cginc.meta b/Shaders/Debug/TessDebug.cginc.meta new file mode 100644 index 0000000..98dc50c --- /dev/null +++ b/Shaders/Debug/TessDebug.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d9ae43d4fe2a8aa499758414ce1a7767 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Debug/WireframeTess.shader.meta b/Shaders/Debug/WireframeTess.shader.meta new file mode 100644 index 0000000..7ba3f04 --- /dev/null +++ b/Shaders/Debug/WireframeTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9c14b98a4a6636040b6463cb30f7d0e1 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye.meta b/Shaders/Eye.meta new file mode 100644 index 0000000..58d23c8 --- /dev/null +++ b/Shaders/Eye.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 38769f612dd2e1341ba7938ef8066aea +folderAsset: yes +timeCreated: 1705466960 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/EyePlus.shader b/Shaders/Eye/EyePlus.shader index 932fd4e..3c38bac 100644 --- a/Shaders/Eye/EyePlus.shader +++ b/Shaders/Eye/EyePlus.shader @@ -20,26 +20,43 @@ _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 } SubShader { LOD 600 Tags {"IgnoreProjector" = "true" - "Queue" = "Transparent" + "Queue" = "Transparent" "RenderType" = "Transparent" } + //Main Pass - Pass - { + Pass { Name "Forward" LOD 600 Tags { "IgnoreProjector" = "true" - "LightMode" = "ForwardBase" - "Queue" = "Transparent" + "LightMode" = "ForwardBase" + "Queue" = "Transparent" "RenderType" = "Transparent" "ShadowSupport" = "true" } Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha ZWrite Off + Stencil { Ref 2 Comp Always @@ -48,13 +65,14 @@ ZFail Keep } - CGPROGRAM #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #define KKP_EXPENSIVE_RAMP + #define MOVE_PUPILS //Unity Includes #include "UnityCG.cginc" @@ -63,6 +81,7 @@ #include "KKPEyeInput.cginc" + #include "KKPEyeDiffuse.cginc" #include "../KKPVertexLights.cginc" #include "../KKPEmission.cginc" @@ -79,110 +98,69 @@ o.uv0 = v.uv0; o.uv1 = v.uv1; o.uv2 = v.uv2; + 1; return o; } + #include "KKPEyePlusFrag.cginc" + + ENDCG + } + + //Reflection Pass + Pass { + Name "Reflect" + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "LIGHTMODE" = "FORWARDBASE" "QUEUE" = "Transparent" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment reflectfrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + #define MOVE_PUPILS + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPEyeInput.cginc" + #include "KKPEyeDiffuse.cginc" + #include "../KKPVertexLights.cginc" + + #include "KKPEyeReflect.cginc" - fixed4 frag (Varyings i) : SV_Target + Varyings vert (VertexData v) { + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; - float4 ambientShadow = 1 - _ambientshadowG.wxyz; - float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; - float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; - float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; - bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; - ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; - float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; - finalAmbientShadow = saturate(finalAmbientShadow); - float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - - finalAmbientShadow *= _shadowcolor.xyz; - finalAmbientShadow = finalAmbientShadow + finalAmbientShadow; - - //This gives a /slightly/ different color than just a one minus for whatever reason - //The KK shader does this so it's staying in - float3 shadowColor = _shadowcolor.xyz - 0.5; - shadowColor = -shadowColor * 2 + 1; - invertFinalAmbientShadow = -shadowColor * invertFinalAmbientShadow + 1; - bool3 shadowCheck = 0.5 < _shadowcolor; - { - float3 hlslcc_movcTemp = finalAmbientShadow; - hlslcc_movcTemp.x = (shadowCheck.x) ? invertFinalAmbientShadow.x : finalAmbientShadow.x; - hlslcc_movcTemp.y = (shadowCheck.y) ? invertFinalAmbientShadow.y : finalAmbientShadow.y; - hlslcc_movcTemp.z = (shadowCheck.z) ? invertFinalAmbientShadow.z : finalAmbientShadow.z; - finalAmbientShadow = hlslcc_movcTemp; - } - finalAmbientShadow = saturate(finalAmbientShadow); - float2 uv = i.uv0 - 0.5; - float angle = _rotation * 6.28318548; - float rotCos = cos(angle); - float rotSin = sin(angle); - float3 rotation = float3(-rotSin, rotCos, rotSin); - float2 dotRot = float2(dot(uv, rotation.yz), dot(uv, rotation.xy)); - uv = dotRot + 0.5; - uv = uv * _MainTex_ST.xy + _MainTex_ST.zw; - float4 iris = tex2D(_MainTex, uv); - float3 viewDir = normalize(_WorldSpaceCameraPos - i.posWS); - float2 expressionUV = float2(dot(i.tanWS, viewDir), - dot(i.bitanWS, viewDir)); - //Gives some depth - expressionUV = expressionUV * -0.059999998 * _ExpressionDepth + i.uv0; - expressionUV = expressionUV * _MainTex_ST.xy + _MainTex_ST.zw; //Makes expression follow eye - expressionUV -= 0.5; - expressionUV /= max(0.1, _ExpressionSize); - expressionUV += 0.5; - float4 expression = tex2D(_expression, expressionUV + float2(0, 0.1)); - expression.rgb = expression.rgb - iris.rgb; - expression.a *= _exppower; - float3 diffuse = expression.a * expression.rgb + iris.rgb; - - - float4 overTex1 = tex2D(_overtex1, i.uv1 * _overtex1_ST + _overtex1_ST.zw); - overTex1 = overTex1.a * _overcolor1.rgba; - float4 overTex2 = tex2D(_overtex2, i.uv2 * _overtex2_ST + _overtex2_ST.zw); - overTex2 = overTex2.a * _overcolor2.rgba; - float4 overTex = max(overTex1, overTex2); - float3 blendOverTex = overTex.rgb - diffuse; - overTex.a *= _isHighLight; - diffuse = overTex.a * blendOverTex + diffuse; - float alpha = max(max(overTex.a, expression.a), iris.a); - - float3 shadedDiffuse = diffuse * finalAmbientShadow; - finalAmbientShadow = -diffuse * finalAmbientShadow + diffuse; - - - KKVertexLight vertexLights[4]; - #ifdef VERTEXLIGHT_ON - GetVertexLights(vertexLights, i.posWS); - #endif - float4 vertexLighting = 0.0; - float vertexLightRamp = 1.0; - #ifdef VERTEXLIGHT_ON - vertexLighting = GetVertexLighting(vertexLights, i.normalWS); - float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; - vertexLightRamp = tex2D(_RampG, vertexLightRampUV).x; - float3 rampLighting = GetRampLighting(vertexLights, i.normalWS, vertexLightRamp); - vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; - #endif - float lambert = max(dot(_WorldSpaceLightPos0.xyz, i.normalWS.xyz), 0.0) + vertexLighting.a; - lambert = saturate(expression.a + overTex.a + lambert); - finalAmbientShadow = lambert * finalAmbientShadow + shadedDiffuse; - - float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient; - lightCol = max(lightCol, _ambientshadowG.xyz); - float3 finalCol = saturate(finalAmbientShadow * lightCol); - - float4 emission = GetEmission(expressionUV); - finalCol = finalCol * (1 - emission.a) + (emission.a * emission.rgb); - - return float4(finalCol, alpha); + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; } - - ENDCG } - - } Fallback "Diffuse" } diff --git a/Shaders/Eye/EyePlus.shader.meta b/Shaders/Eye/EyePlus.shader.meta new file mode 100644 index 0000000..00705a3 --- /dev/null +++ b/Shaders/Eye/EyePlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 59a7b0c747d3fda439396b983ddca7d8 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/EyePlusTess.shader b/Shaders/Eye/EyePlusTess.shader new file mode 100644 index 0000000..d6b2b31 --- /dev/null +++ b/Shaders/Eye/EyePlusTess.shader @@ -0,0 +1,199 @@ +Shader "xukmi/EyePlusTess" +{ + Properties + { + _MainTex ("MainTex", 2D) = "white" {} + [Gamma]_overcolor1 ("overcolor1", Vector) = (1,1,1,1) + _overtex1 ("overtex1", 2D) = "black" {} + [Gamma]_overcolor2 ("overcolor2", Vector) = (1,1,1,1) + _overtex2 ("overtex2", 2D) = "black" {} + [MaterialToggle] _isHighLight ("isHighLight", Float) = 0 + _expression ("expression", 2D) = "black" {} + _exppower ("exppower", Range(0, 1)) = 1 + _ExpressionSize ("Expression Size", Range(0, 1)) = 0.35 + _ExpressionDepth ("Expression Depth", Range(0, 2)) = 1 + [Gamma]_shadowcolor ("shadowcolor", Vector) = (0.6298235,0.6403289,0.747,1) + _rotation ("rotation", Range(0, 1)) = 0 + [HideInInspector] _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + } + SubShader + { + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "QUEUE" = "Transparent" "RenderType" = "Transparent" } + + //Main Pass + Pass { + Name "Forward" + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "LIGHTMODE" = "FORWARDBASE" "QUEUE" = "Transparent" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + ZWrite Off + + Stencil { + Ref 2 + Comp Always + Pass Replace + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + + #define KKP_EXPENSIVE_RAMP + #define MOVE_PUPILS + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + + #include "KKPEyeInput.cginc" + #include "KKPEyeDiffuse.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPEmission.cginc" + + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + o.uv1 = v.uv1; + o.uv2 = v.uv2; + 1; + return o; + } + + #include "KKPEyeTess.cginc" + + #include "KKPEyePlusFrag.cginc" + + ENDCG + } + + //Reflection Pass + Pass { + Name "Reflect" + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "LIGHTMODE" = "FORWARDBASE" "QUEUE" = "Transparent" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + ZWrite Off + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment reflectfrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + #define MOVE_PUPILS + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPEyeInput.cginc" + #include "KKPEyeDiffuse.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + + #include "KKPEyeReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPEyeTess.cginc" + + ENDCG + } + } + Fallback "Diffuse" +} diff --git a/Shaders/Eye/EyePlusTess.shader.meta b/Shaders/Eye/EyePlusTess.shader.meta new file mode 100644 index 0000000..15d110d --- /dev/null +++ b/Shaders/Eye/EyePlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0f1790519b8fee14e916c9fb9efe58b7 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/EyeWPlus.shader b/Shaders/Eye/EyeWPlus.shader index 7a2c533..ebade2f 100644 --- a/Shaders/Eye/EyeWPlus.shader +++ b/Shaders/Eye/EyeWPlus.shader @@ -5,28 +5,42 @@ [Gamma]_Color ("Color", Vector) = (0.5,0.5,0.5,1) _MainTex ("MainTex", 2D) = "white" {} [Gamma]_shadowcolor ("shadowcolor", Vector) = (0.6298235,0.6403289,0.747,1) - [HideInInspector] _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) } SubShader { LOD 600 - Tags {"IgnoreProjector" = "true" - "Queue" = "Transparent-1" - "RenderType" = "Transparent" } + Tags { "IGNOREPROJECTOR" = "true" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" } + //Main Pass - Pass - { + Pass { Name "Forward" LOD 600 - Tags { "IgnoreProjector" = "true" - "LightMode" = "ForwardBase" - "Queue" = "Transparent-1" - "RenderType" = "Transparent" - "ShadowSupport" = "true" } - + Tags { "IGNOREPROJECTOR" = "true" "LIGHTMODE" = "FORWARDBASE" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } ZWrite Off + Stencil { Ref 2 Comp Always @@ -35,14 +49,14 @@ ZFail Keep } - CGPROGRAM #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON - + #define KKP_EXPENSIVE_RAMP - + //Unity Includes #include "UnityCG.cginc" #include "AutoLight.cginc" @@ -50,7 +64,9 @@ #include "KKPEyeInput.cginc" - #include "..//KKPVertexLights.cginc" + #include "KKPEyeDiffuse.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPEmission.cginc" Varyings vert (VertexData v) { @@ -59,90 +75,74 @@ o.posCS = mul(UNITY_MATRIX_VP, o.posWS); o.normalWS = UnityObjectToWorldNormal(v.normal); o.uv0 = v.uv0; + 1; return o; } + #include "KKPEyeWPlusFrag.cginc" - fixed4 frag (Varyings i) : SV_Target - { + ENDCG + } + + //Reflection Pass + Pass { + Name "Reflect" + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "LIGHTMODE" = "FORWARDBASE" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + ZWrite Off - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); - float alpha = mainTex.a - 0.5; + CGPROGRAM + #pragma vertex vert + #pragma fragment reflectfrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu - //Because of the stencil the shader needs to alpha cilp otherwise the whole mesh shows over the hair - float clipVal = alpha < 0.0f; - if(clipVal * int(0xffffffffu) != 0) - discard; - alpha = mainTex.a; - - float4 ambientShadow = 1 - _ambientshadowG.wxyz; - float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; - float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; - float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; - bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; - ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; - float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; - finalAmbientShadow = saturate(finalAmbientShadow); - float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - - finalAmbientShadow *= _shadowcolor.xyz; - finalAmbientShadow = finalAmbientShadow + finalAmbientShadow; - - //This gives a /slightly/ different color than just a one minus for whatever reason - //The KK shader does this so it's staying in - float3 shadowColor = _shadowcolor.xyz - 0.5; - shadowColor = -shadowColor * 2 + 1; - invertFinalAmbientShadow = -shadowColor * invertFinalAmbientShadow + 1; - bool3 shadowCheck = 0.5 < _shadowcolor; - { - float3 hlslcc_movcTemp = finalAmbientShadow; - hlslcc_movcTemp.x = (shadowCheck.x) ? invertFinalAmbientShadow.x : finalAmbientShadow.x; - hlslcc_movcTemp.y = (shadowCheck.y) ? invertFinalAmbientShadow.y : finalAmbientShadow.y; - hlslcc_movcTemp.z = (shadowCheck.z) ? invertFinalAmbientShadow.z : finalAmbientShadow.z; - finalAmbientShadow = hlslcc_movcTemp; - } - finalAmbientShadow = saturate(finalAmbientShadow); - - float3 diffuse = mainTex.rgb * _Color.rgb; - float3 shadedDiffuse = diffuse * finalAmbientShadow; - float3 finalCol = mainTex.rgb * _Color.rgb - shadedDiffuse; - - - - KKVertexLight vertexLights[4]; - #ifdef VERTEXLIGHT_ON - GetVertexLights(vertexLights, i.posWS); - #endif - float4 vertexLighting = 0.0; - float vertexLightRamp = 1.0; - #ifdef VERTEXLIGHT_ON - vertexLighting = GetVertexLighting(vertexLights, i.normalWS); - float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; - vertexLightRamp = tex2D(_RampG, vertexLightRampUV).x; - float3 rampLighting = GetRampLighting(vertexLights, i.normalWS, vertexLightRamp); - vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; - #endif - - float lambert = dot(_WorldSpaceLightPos0.xyz, i.normalWS.xyz) + vertexLighting.a;; - float ramp = tex2D(_RampG, lambert * _RampG_ST.xy + _RampG_ST.zw); - finalCol = ramp * finalCol + shadedDiffuse; - - float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient; - lightCol = max(lightCol, _ambientshadowG.xyz); - finalCol *= lightCol; - - return float4(finalCol, 1); - } + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN - + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPEyeInput.cginc" + #include "KKPEyeDiffuse.cginc" + #include "../KKPVertexLights.cginc" + + #include "KKPEyeReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } ENDCG } + //ShadowCaster - Pass - { + Pass { Name "ShadowCaster" LOD 600 - Tags { "IgnoerProjector" = "true" "LightMode" = "ShadowCaster" "Queue" = "Transparent--1" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Tags { "IGNOREPROJECTOR" = "true" "IgnoerProjector" = "true" "LIGHTMODE" = "SHADOWCASTER" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } Offset 1, 1 Cull Back @@ -150,13 +150,13 @@ #pragma vertex vert #pragma fragment frag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" - sampler2D _MainTex; - float4 _MainTex_ST; + #include "KKPEyeInput.cginc" - struct v2f { + struct v2f { float2 uv0 : TEXCOORD1; V2F_SHADOW_CASTER; }; @@ -172,7 +172,7 @@ float4 frag(v2f i) : SV_Target { - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); float alphaVal = mainTex.a; float clipVal = (alphaVal.x - 0.5) < 0.0f; if(clipVal * int(0xffffffffu) != 0) @@ -180,13 +180,8 @@ SHADOW_CASTER_FRAGMENT(i) } - - ENDCG } - - - } Fallback "Diffuse" } diff --git a/Shaders/Eye/EyeWPlus.shader.meta b/Shaders/Eye/EyeWPlus.shader.meta new file mode 100644 index 0000000..c1ca886 --- /dev/null +++ b/Shaders/Eye/EyeWPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e6c16f5a39a5ffa4db72bf62937057fd +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/EyeWPlusTess.shader b/Shaders/Eye/EyeWPlusTess.shader new file mode 100644 index 0000000..78813c4 --- /dev/null +++ b/Shaders/Eye/EyeWPlusTess.shader @@ -0,0 +1,243 @@ +Shader "xukmi/EyeWPlusTess" +{ + Properties + { + [Gamma]_Color ("Color", Vector) = (0.5,0.5,0.5,1) + _MainTex ("MainTex", 2D) = "white" {} + [Gamma]_shadowcolor ("shadowcolor", Vector) = (0.6298235,0.6403289,0.747,1) + [HideInInspector] _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + } + SubShader + { + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" } + + //Main Pass + Pass { + Name "Forward" + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "LIGHTMODE" = "FORWARDBASE" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + ZWrite Off + + Stencil { + Ref 2 + Comp Always + Pass Replace + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + + #include "KKPEyeInput.cginc" + #include "KKPEyeDiffuse.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPEmission.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPEyeTess.cginc" + + #include "KKPEyeWPlusFrag.cginc" + + ENDCG + } + + //Reflection Pass + Pass { + Name "Reflect" + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "LIGHTMODE" = "FORWARDBASE" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + ZWrite Off + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment reflectfrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPEyeInput.cginc" + #include "KKPEyeDiffuse.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + + #include "KKPEyeReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPEyeTess.cginc" + + ENDCG + } + + //ShadowCaster + Pass { + Name "ShadowCaster" + LOD 600 + Tags { "IGNOREPROJECTOR" = "true" "IgnoerProjector" = "true" "LIGHTMODE" = "SHADOWCASTER" "QUEUE" = "Transparent-1" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Offset 1, 1 + Cull Back + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + + #include "UnityCG.cginc" + #include "KKPEyeInput.cginc" + #include "../KKPDisplace.cginc" + #define TESS_LOW + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + #include "KKPEyeTess.cginc" + + float4 frag(v2f i) : SV_Target + { + + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alphaVal = mainTex.a; + float clipVal = (alphaVal.x - 0.5) < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Diffuse" +} diff --git a/Shaders/Eye/EyeWPlusTess.shader.meta b/Shaders/Eye/EyeWPlusTess.shader.meta new file mode 100644 index 0000000..a117907 --- /dev/null +++ b/Shaders/Eye/EyeWPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a38912cbc49d6e84c87d80dcacd57697 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/KKPEyeDiffuse.cginc b/Shaders/Eye/KKPEyeDiffuse.cginc new file mode 100644 index 0000000..5c2fc50 --- /dev/null +++ b/Shaders/Eye/KKPEyeDiffuse.cginc @@ -0,0 +1,37 @@ +#ifndef KKP_HAIR_DIFFUSE_INC +#define KKP_HAIR_DIFFUSE_INC + +float3 HUEtoRGB(in float H) +{ + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R,G,B)); +} + +float Epsilon = 1e-10; +float3 RGBtoHCV(in float3 RGB) +{ + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0/3.0) : float4(RGB.gb, 0.0, -1.0/3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); +} + +float3 RGBtoHSL(in float3 RGB) +{ + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); +} +float3 HSLtoRGB(in float3 HSL) +{ + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return (RGB - 0.5) * C + HSL.z; +} + +#endif \ No newline at end of file diff --git a/Shaders/Eye/KKPEyeDiffuse.cginc.meta b/Shaders/Eye/KKPEyeDiffuse.cginc.meta new file mode 100644 index 0000000..a71c0a8 --- /dev/null +++ b/Shaders/Eye/KKPEyeDiffuse.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0d993eb93d2fc1549ad2886a2ed1bd4f +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/KKPEyeInput.cginc b/Shaders/Eye/KKPEyeInput.cginc index 13904ef..b05c4c9 100644 --- a/Shaders/Eye/KKPEyeInput.cginc +++ b/Shaders/Eye/KKPEyeInput.cginc @@ -1,5 +1,8 @@ #ifndef KKP_EYE_INPUT #define KKP_EYE_INPUT + +#include "../KKPDeclarations.cginc" + struct VertexData { float4 vertex : POSITION; @@ -20,19 +23,18 @@ float3 normalWS : TEXCOORD4; float4 tanWS : TEXCOORD5; float3 bitanWS : TEXCOORD6; + #ifdef SHADOWS_SCREEN + float4 shadowCoordinate : TEXCOORD7; + #endif }; - - - - //Input Textures - sampler2D _MainTex; - sampler2D _overtex1; - sampler2D _overtex2; - sampler2D _expression; + DECLARE_TEX2D(_MainTex); + DECLARE_TEX2D(_expression); + DECLARE_TEX2D(_overtex1); + DECLARE_TEX2D(_overtex2); - sampler2D _RampG; + DECLARE_TEX2D(_RampG); bool _UseRampForLights; //UV Offsets @@ -47,14 +49,17 @@ float4 _CustomAmbient; float4 _shadowcolor; + float4 _ShadowHSV; float _isHighLight; float _exppower; float _ExpressionSize; float _ExpressionDepth; float _rotation; + float _Cutoff; //Global light params set by KK float4 _ambientshadowG; - + float _DisablePointLights; + float _DisableShadowedMatcap; #endif \ No newline at end of file diff --git a/Shaders/Eye/KKPEyeInput.cginc.meta b/Shaders/Eye/KKPEyeInput.cginc.meta new file mode 100644 index 0000000..3f363a3 --- /dev/null +++ b/Shaders/Eye/KKPEyeInput.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7afe54c74c851704cae443fe95ef208f +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/KKPEyePlusFrag.cginc b/Shaders/Eye/KKPEyePlusFrag.cginc new file mode 100644 index 0000000..63b7eb1 --- /dev/null +++ b/Shaders/Eye/KKPEyePlusFrag.cginc @@ -0,0 +1,121 @@ +#ifndef ROTATEUV +float2 rotateUV(float2 uv, float2 pivot, float rotation) { + float cosa = cos(rotation); + float sina = sin(rotation); + uv -= pivot; + return float2( + cosa * uv.x - sina * uv.y, + cosa * uv.y + sina * uv.x + ) + pivot; +} +#endif + +fixed4 frag (Varyings i) : SV_Target { + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + finalAmbientShadow *= _shadowcolor.xyz; + finalAmbientShadow = finalAmbientShadow + finalAmbientShadow; + + //This gives a /slightly/ different color than just a one minus for whatever reason + //The KK shader does this so it's staying in + float3 shadowColor = _shadowcolor.xyz - 0.5; + shadowColor = -shadowColor * 2 + 1; + invertFinalAmbientShadow = -shadowColor * invertFinalAmbientShadow + 1; + bool3 shadowCheck = 0.5 < _shadowcolor; + { + float3 hlslcc_movcTemp = finalAmbientShadow; + hlslcc_movcTemp.x = (shadowCheck.x) ? invertFinalAmbientShadow.x : finalAmbientShadow.x; + hlslcc_movcTemp.y = (shadowCheck.y) ? invertFinalAmbientShadow.y : finalAmbientShadow.y; + hlslcc_movcTemp.z = (shadowCheck.z) ? invertFinalAmbientShadow.z : finalAmbientShadow.z; + finalAmbientShadow = hlslcc_movcTemp; + } + finalAmbientShadow = saturate(finalAmbientShadow); + float2 mainUV = rotateUV(i.uv0, float2(0.5, 0.5), -_rotation*6.28318548); + mainUV = mainUV * _MainTex_ST.xy + _MainTex_ST.zw; + float4 iris = SAMPLE_TEX2D(_MainTex, mainUV); + float3 viewDir = normalize(_WorldSpaceCameraPos - i.posWS); + float2 expressionUV = float2(dot(i.tanWS, viewDir), + dot(i.bitanWS, viewDir)); + //Gives some depth + expressionUV = expressionUV * -0.059999998 * _ExpressionDepth + i.uv0; + expressionUV = expressionUV * _MainTex_ST.xy + _MainTex_ST.zw; //Makes expression follow eye + expressionUV -= 0.5; + expressionUV /= max(0.1, _ExpressionSize); + expressionUV += 0.5; + float4 expression = SAMPLE_TEX2D(_expression, expressionUV + float2(0, 0.1)); + expression.rgb = expression.rgb - iris.rgb; + expression.a *= _exppower; + float3 diffuse = expression.a * expression.rgb + iris.rgb; + + + float4 overTex1 = SAMPLE_TEX2D(_overtex1, i.uv1 * _overtex1_ST + _overtex1_ST.zw); + overTex1 = overTex1.a * _overcolor1.rgba; + float4 overTex2 = SAMPLE_TEX2D(_overtex2, i.uv2 * _overtex2_ST + _overtex2_ST.zw); + overTex2 = overTex2.a * _overcolor2.rgba; + float4 overTex = 1 - (1 - overTex1) * (1- overTex2); + float3 blendOverTex = overTex.rgb - diffuse; + overTex.a = saturate(overTex.a * _isHighLight); + diffuse = overTex.a * blendOverTex + diffuse; + float alpha = saturate(overTex.a + expression.a + iris.a); + if (alpha < 0.01) discard; + + float3 shadedDiffuse = diffuse * finalAmbientShadow; + finalAmbientShadow = -diffuse * finalAmbientShadow + diffuse; + + + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, i.normalWS); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, i.normalWS, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + float lambert = max(dot(_WorldSpaceLightPos0.xyz, i.normalWS.xyz), 0.0) + vertexLighting.a; + lambert = saturate(expression.a + overTex.a + lambert); + finalAmbientShadow = lambert * finalAmbientShadow + shadedDiffuse; + + float shadowAttenuation = saturate(SAMPLE_TEX2D(_RampG, lambert * _RampG_ST.xy + _RampG_ST.zw).x); + #ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + shadowAttenuation *= shadowMap; + #endif + + float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient; + lightCol = max(lightCol, _ambientshadowG.xyz); + float3 finalCol = finalAmbientShadow * lightCol; + + float3 hsl = RGBtoHSL(finalCol); + hsl.x = hsl.x + _ShadowHSV.x; + hsl.y = hsl.y + _ShadowHSV.y; + hsl.z = hsl.z + _ShadowHSV.z; + finalCol = lerp(HSLtoRGB(hsl), finalCol, saturate(shadowAttenuation + 0.5)); + + // Overlay emission over expression + float2 emissionUV = rotateUV(i.uv0, float2(0.5, 0.5), -_rotation*6.28318548); + emissionUV = emissionUV + float2(dot(i.tanWS, viewDir), dot(i.bitanWS, viewDir)) * -0.06 * _ExpressionDepth; + emissionUV = emissionUV * _MainTex_ST.xy + _MainTex_ST.zw; + emissionUV = emissionUV * _EmissionMask_ST.xy + _EmissionMask_ST.zw; + + float4 emissionMask = SAMPLE_TEX2D(_EmissionMask, emissionUV); + float3 emissionCol = _EmissionColor.rgb * _EmissionIntensity * emissionMask.rgb; + float4 emission = float4(emissionCol, emissionMask.a * _EmissionColor.a * iris.a); + + finalCol = max(finalCol, 1E-06) + emission.rgb * emission.a; + + return float4(max(finalCol, 1E-06), alpha); +} \ No newline at end of file diff --git a/Shaders/Eye/KKPEyePlusFrag.cginc.meta b/Shaders/Eye/KKPEyePlusFrag.cginc.meta new file mode 100644 index 0000000..05053e5 --- /dev/null +++ b/Shaders/Eye/KKPEyePlusFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 18ab3aa0e6efb894b9b29900b7d308d3 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/KKPEyeReflect.cginc b/Shaders/Eye/KKPEyeReflect.cginc new file mode 100644 index 0000000..805d924 --- /dev/null +++ b/Shaders/Eye/KKPEyeReflect.cginc @@ -0,0 +1,123 @@ +#ifndef KKP_EYE_REFLECT +#define KKP_EYE_REFLECT +DECLARE_TEX2D(_ReflectMap); +float4 _ReflectMap_ST; +DECLARE_TEX2D(_ReflectionMapCap); +float4 _ReflectionMapCap_ST; +float _Roughness; +float _ReflectionVal; +float _UseMatCapReflection; +float _ReflBlendVal; +float _ReflBlendSrc; +float _ReflBlendDst; +float4 _ReflectCol; +float _ReflectColMix; + +float _ReflectRotation; +DECLARE_TEX2D(_ReflectMask); +float4 _ReflectMask_ST; + +#ifndef ROTATEUV +float2 rotateUV(float2 uv, float2 pivot, float rotation) { + float cosa = cos(rotation); + float sina = sin(rotation); + uv -= pivot; + return float2( + cosa * uv.x - sina * uv.y, + cosa * uv.y + sina * uv.x + ) + pivot; +} +#endif + +fixed4 reflectfrag (Varyings i) : SV_Target +{ + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, i.normalWS); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, i.normalWS, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + float lambert = max(dot(_WorldSpaceLightPos0.xyz, i.normalWS.xyz), 0.0) + vertexLighting.a; + float shadowAttenuation = saturate(SAMPLE_TEX2D(_RampG, lambert * _RampG_ST.xy + _RampG_ST.zw).x); + #ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + shadowAttenuation *= shadowMap; + #endif + float matcapAttenuation = 1 - (1 - shadowAttenuation)*_DisableShadowedMatcap; + + //Reflection begins here + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + float3 normal = i.normalWS.xyz; + float2 reflectMapUV = (i.uv0 *_ReflectMap_ST.xy + _ReflectMap_ST.zw); +#ifdef MOVE_PUPILS + reflectMapUV = rotateUV(reflectMapUV, float2(0.5, 0.5), -_rotation*6.28318548); + reflectMapUV = reflectMapUV * _MainTex_ST.xy + _MainTex_ST.zw; +#endif + float reflectMap = SAMPLE_TEX2D(_ReflectMap, reflectMapUV).r; + + float3 reflectionDir = reflect(-viewDir, normal); + float roughness = 1 - (_Roughness); + roughness *= 1.7 - 0.7 * roughness; + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 env = DecodeHDR(envSample, unity_SpecCube0_HDR); + + float3 viewNormal = mul((float3x3)UNITY_MATRIX_V, normal); + float2 matcapUV = viewNormal.xy * 0.5 * _ReflectionMapCap_ST.xy + 0.5 + _ReflectionMapCap_ST.zw; + matcapUV = rotateUV(matcapUV, float2(0.5, 0.5), radians(_ReflectRotation)); + + float2 reflectMaskUV = (i.uv0 *_ReflectMask_ST.xy + _ReflectMask_ST.zw); +#ifdef MOVE_PUPILS + reflectMaskUV = rotateUV(reflectMaskUV, float2(0.5, 0.5), -_rotation*6.28318548); + reflectMaskUV = reflectMaskUV * _MainTex_ST.xy + _MainTex_ST.zw; +#endif + float reflectMask = SAMPLE_TEX2D(_ReflectMask, reflectMaskUV).r; + + float4 matcap = SAMPLE_TEX2D(_ReflectionMapCap, matcapUV); + matcap = pow(matcap, 0.454545); + float3 matcapRGBcolored = lerp(matcap.rgb, matcap.rgb * _ReflectCol.rgb, _ReflectColMix); + env = lerp(env, matcapRGBcolored, _UseMatCapReflection * reflectMask); + + float alphaLerp = 1; + float reflectMulOrAdd = 1.0; + float src = floor(_ReflBlendSrc); + float dst = floor(_ReflBlendDst); + //Add + if(src == 1.0 && dst == 1.0){ + reflectMulOrAdd = 0.0; + alphaLerp = _ReflectCol.a; + } + //Mul + else if(src == 2.0 && dst == 0.0){ + reflectMulOrAdd = 1.0; + alphaLerp = _ReflectCol.a; + } + // Alpha Blend & Premultiplied Alpha + else if(dst == 10.0 && (src == 5.0 || src == 1.0)){ + reflectMulOrAdd = 0.0; + env *= _ReflectCol.a; + } + else { + reflectMulOrAdd = _ReflBlendVal; + alphaLerp = _ReflectCol.a; + } + + env *= matcapAttenuation * matcap.a; + + float2 mainUV = i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw; + + _ReflectionVal *= SAMPLE_TEX2D(_MainTex, mainUV).a; + + float3 reflCol = lerp(env, reflectMulOrAdd, 1 - _ReflectionVal * reflectMap * matcapAttenuation * matcap.a * alphaLerp); + + return float4(max(reflCol, 1E-06), _ReflectionVal * reflectMap * _ReflectCol.a); +} + +#endif \ No newline at end of file diff --git a/Shaders/Eye/KKPEyeReflect.cginc.meta b/Shaders/Eye/KKPEyeReflect.cginc.meta new file mode 100644 index 0000000..d2db01a --- /dev/null +++ b/Shaders/Eye/KKPEyeReflect.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 109d55722ef2df04fb277fedcd6b839e +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/KKPEyeTess.cginc b/Shaders/Eye/KKPEyeTess.cginc new file mode 100644 index 0000000..c387c1f --- /dev/null +++ b/Shaders/Eye/KKPEyeTess.cginc @@ -0,0 +1,216 @@ +#ifndef KKP_EYETESS_INC +#define KKP_EYETESS_INC + +#define NUM_BEZ_POINTS + +struct TessellationControlPoint +{ + float4 vertex : INTERNALTESSPOS; + float4 posCS : CLIPPOS; + float4 posWS : WORLDPOS; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; +}; + + +struct TessellationFactors { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + float3 bezierPoints[7] : BEZIERPOS; +}; + +TessellationControlPoint TessVert(VertexData v){ + TessellationControlPoint p; + p.vertex = v.vertex; + p.posWS = mul(unity_ObjectToWorld, v.vertex); + p.posCS = mul(UNITY_MATRIX_VP, p.posWS); + p.normal = v.normal; + p.tangent = v.tangent; + p.uv0 = v.uv0; + p.uv1 = v.uv1; + p.uv2 = v.uv2; + return p; +} + +DECLARE_TEX2D(_TessTex); +float _TessMax; +float _TessMin; +float _TessBias; +float _TessSmooth; +float _Tolerance; + + + +bool ShouldBackFaceCull(float4 p0PositionCS, float4 p1PositionCS, float4 p2PositionCS) { + float3 point0 = p0PositionCS.xyz / p0PositionCS.w; + float3 point1 = p1PositionCS.xyz / p1PositionCS.w; + float3 point2 = p2PositionCS.xyz / p2PositionCS.w; + // In clip space, the view direction is float3(0, 0, 1), so we can just test the z coord +#if UNITY_REVERSED_Z + return cross(point1 - point0, point2 - point0).z < -_Tolerance; +#else // In OpenGL, the test is reversed + return cross(point1 - point0, point2 - point0).z > _Tolerance; +#endif +} + +bool IsOutOfBounds(float3 p, float3 lower, float3 higher) { + return p.x < lower.x || p.x > higher.x || p.y < lower.y || p.y > higher.y || p.z < lower.z || p.z > higher.z; +} + +bool IsPointOutOfFrustum(float4 positionCS) { + float3 culling = positionCS.xyz; + float w = positionCS.w; + float3 lowerBounds = float3(-w - _Tolerance, -w - _Tolerance, -w * 0 - _Tolerance); + float3 higherBounds = float3(w + _Tolerance, w + _Tolerance, w + _Tolerance); + return IsOutOfBounds(culling, lowerBounds, higherBounds); +} + +bool ShouldClipPatch(float4 p0PositionCS, float4 p1PositionCS, float4 p2PositionCS) { + bool allOutside = IsPointOutOfFrustum(p0PositionCS) && IsPointOutOfFrustum(p1PositionCS) && IsPointOutOfFrustum(p2PositionCS); + bool backFace = ShouldBackFaceCull(p0PositionCS, p1PositionCS, p2PositionCS); + return allOutside; +} + +[UNITY_domain("tri")] +[UNITY_outputcontrolpoints(3)] +[UNITY_outputtopology("triangle_cw")] +[UNITY_partitioning("fractional_odd")] +[UNITY_patchconstantfunc("patchFunc")] +TessellationControlPoint hull(InputPatch patch, uint id: SV_OUTPUTCONTROLPOINTID){ + return patch[id]; +} + + +float EdgeTessellationFactor(float3 p0PositionWS, float2 p0UV, float3 p1PositionWS, float2 p1UV) { + float length = distance(p0PositionWS, p1PositionWS) * _TessBias * 3; + float distanceToCamera = distance(_WorldSpaceCameraPos, (p0PositionWS + p1PositionWS) * 0.5); + + float2 tessUV = (p0UV + p1UV) * 0.5; +#ifdef MOVE_PUPILS + tessUV = tessUV * _MainTex_ST.xy + _MainTex_ST.zw; + tessUV = rotateUV(tessUV, float2(0.5, 0.5), -_rotation*6.28318548); +#endif + + float tessTex = SAMPLE_TEX2D_LOD(_TessTex, float4(tessUV, 0, 0), 0).x; + float factor = length / (distanceToCamera * distanceToCamera); + factor = min(_TessMax, factor); + float multiplier = 1.0; + #ifdef TESS_MID + multiplier = 0.35; + #endif + #ifdef TESS_LOW + multiplier = 0.1; + #endif + return max(_TessMin, factor * tessTex * multiplier); +} + + + +float3 CalculateBezierControlPoint(float3 p0PositionWS, float3 aNormalWS, float3 p1PositionWS, float3 bNormalWS) { + float w = dot(p1PositionWS - p0PositionWS, aNormalWS); + return (p0PositionWS * 2 + p1PositionWS - w * aNormalWS) / 3.0; +} + +void CalculateBezierControlPoints(inout float3 bezierPoints[7], + float3 p0PositionWS, float3 p0NormalWS, float3 p1PositionWS, float3 p1NormalWS, float3 p2PositionWS, float3 p2NormalWS) { + bezierPoints[0] = CalculateBezierControlPoint(p0PositionWS, p0NormalWS, p1PositionWS, p1NormalWS); + bezierPoints[1] = CalculateBezierControlPoint(p1PositionWS, p1NormalWS, p0PositionWS, p0NormalWS); + bezierPoints[2] = CalculateBezierControlPoint(p1PositionWS, p1NormalWS, p2PositionWS, p2NormalWS); + bezierPoints[3] = CalculateBezierControlPoint(p2PositionWS, p2NormalWS, p1PositionWS, p1NormalWS); + bezierPoints[4] = CalculateBezierControlPoint(p2PositionWS, p2NormalWS, p0PositionWS, p0NormalWS); + bezierPoints[5] = CalculateBezierControlPoint(p0PositionWS, p0NormalWS, p2PositionWS, p2NormalWS); + float3 avgBezier = 0; + [unroll] for (int i = 0; i < 6; i++) { + avgBezier += bezierPoints[i]; + } + avgBezier /= 6.0; + float3 avgControl = (p0PositionWS + p1PositionWS + p2PositionWS) / 3.0; + bezierPoints[6] = avgBezier + (avgBezier - avgControl) / 2.0; +} + +TessellationFactors patchFunc(InputPatch patch){ + TessellationFactors f; + if(ShouldClipPatch(patch[0].posCS, patch[1].posCS, patch[2].posCS)){ + f.edge[0] = 0; + f.edge[1] = 0; + f.edge[2] = 0; + f.inside = 0; + } + else{ + f.edge[0] = EdgeTessellationFactor(patch[1].posWS, patch[1].uv0, patch[2].posWS, patch[2].uv0); + f.edge[1] = EdgeTessellationFactor(patch[2].posWS, patch[2].uv0, patch[0].posWS, patch[0].uv0); + f.edge[2] = EdgeTessellationFactor(patch[0].posWS, patch[0].uv0, patch[1].posWS, patch[1].uv0); + f.inside = (f.edge[0] + f.edge[1] + f.edge[2]) / 3.0; + CalculateBezierControlPoints(f.bezierPoints, patch[0].vertex, patch[0].normal, + patch[1].vertex, patch[1].normal, patch[2].vertex, patch[2].normal); + } + + return f; +} + + +float3 PhongProjectedPosition(float3 flatPosition, float3 cornerPosition, float3 normal) { + return flatPosition - dot(flatPosition - cornerPosition, normal) * normal; +} + +float3 BarycentricInterpolate(float3 bary, float3 p0, float3 p1, float3 p2){ + return bary.x * p0 + bary.y * p1 +bary.z * p2; +} + +float3 CalculatePhongPosition(float3 bary, float smoothing, float3 p0Position, float3 p0Normal, + float3 p1Position, float3 p1Normal, float3 p2Position, float3 p2Normal) { + float3 flatPosition = BarycentricInterpolate(bary, p0Position, p1Position, p2Position); + float3 smoothedPosition = + bary.x * PhongProjectedPosition(flatPosition, p0Position, p0Normal) + + bary.y * PhongProjectedPosition(flatPosition, p1Position, p1Normal) + + bary.z * PhongProjectedPosition(flatPosition, p2Position, p2Normal); + return lerp(flatPosition, smoothedPosition, smoothing); +} + +float3 CalculateBezierPosition(float3 bary, float smoothing, float3 bezierPoints[7], + float3 p0PositionWS, float3 p1PositionWS, float3 p2PositionWS) { + float3 flatPositionWS = BarycentricInterpolate(bary, p0PositionWS, p1PositionWS, p2PositionWS); + float3 smoothedPositionWS = + p0PositionWS * (bary.x * bary.x * bary.x) + + p1PositionWS * (bary.y * bary.y * bary.y) + + p2PositionWS * (bary.z * bary.z * bary.z) + + bezierPoints[0] * (3 * bary.x * bary.x * bary.y) + + bezierPoints[1] * (3 * bary.y * bary.y * bary.x) + + bezierPoints[2] * (3 * bary.y * bary.y * bary.z) + + bezierPoints[3] * (3 * bary.z * bary.z * bary.y) + + bezierPoints[4] * (3 * bary.z * bary.z * bary.x) + + bezierPoints[5] * (3 * bary.x * bary.x * bary.z) + + bezierPoints[6] * (6 * bary.x * bary.y * bary.z); + return lerp(flatPositionWS, smoothedPositionWS, smoothing); +} + +#define INTERPOLATE_TRI(param) data.param = patch[0].param * barycentricCoordinates.x + patch[1].param * barycentricCoordinates.y + patch[2].param * barycentricCoordinates.z; + +[UNITY_domain("tri")] +#ifdef SHADOW_CASTER_PASS +v2f +#else +Varyings +#endif +domain(TessellationFactors factors, OutputPatch patch, float3 barycentricCoordinates : SV_DomainLocation){ + VertexData data; + float smoothing = _TessSmooth * 0.5; + float3 pos = CalculatePhongPosition(barycentricCoordinates, smoothing, + patch[0].vertex, patch[0].normal, + patch[1].vertex, patch[1].normal, + patch[2].vertex, patch[2].normal); + float4 vertex = float4(pos, 1); + data.vertex = vertex; + + INTERPOLATE_TRI(normal); + INTERPOLATE_TRI(tangent); + INTERPOLATE_TRI(uv0); + INTERPOLATE_TRI(uv1); + INTERPOLATE_TRI(uv2); + + return vert(data); +} +#endif \ No newline at end of file diff --git a/Shaders/Eye/KKPEyeTess.cginc.meta b/Shaders/Eye/KKPEyeTess.cginc.meta new file mode 100644 index 0000000..0338320 --- /dev/null +++ b/Shaders/Eye/KKPEyeTess.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 705417a83c7da4e479c24368d9ea886d +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Eye/KKPEyeWPlusFrag.cginc b/Shaders/Eye/KKPEyeWPlusFrag.cginc new file mode 100644 index 0000000..7e2dc71 --- /dev/null +++ b/Shaders/Eye/KKPEyeWPlusFrag.cginc @@ -0,0 +1,85 @@ +fixed4 frag (Varyings i) : SV_Target +{ + + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = mainTex.a - _Cutoff; + + //Because of the stencil the shader needs to alpha cilp otherwise the whole mesh shows over the hair + float clipVal = alpha < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + alpha = mainTex.a; + + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + finalAmbientShadow *= _shadowcolor.xyz; + finalAmbientShadow = finalAmbientShadow + finalAmbientShadow; + + //This gives a /slightly/ different color than just a one minus for whatever reason + //The KK shader does this so it's staying in + float3 shadowColor = _shadowcolor.xyz - 0.5; + shadowColor = -shadowColor * 2 + 1; + invertFinalAmbientShadow = -shadowColor * invertFinalAmbientShadow + 1; + bool3 shadowCheck = 0.5 < _shadowcolor; + { + float3 hlslcc_movcTemp = finalAmbientShadow; + hlslcc_movcTemp.x = (shadowCheck.x) ? invertFinalAmbientShadow.x : finalAmbientShadow.x; + hlslcc_movcTemp.y = (shadowCheck.y) ? invertFinalAmbientShadow.y : finalAmbientShadow.y; + hlslcc_movcTemp.z = (shadowCheck.z) ? invertFinalAmbientShadow.z : finalAmbientShadow.z; + finalAmbientShadow = hlslcc_movcTemp; + } + finalAmbientShadow = saturate(finalAmbientShadow); + + float3 diffuse = mainTex.rgb * _Color.rgb; + float3 shadedDiffuse = diffuse * finalAmbientShadow; + float3 finalCol = mainTex.rgb * _Color.rgb - shadedDiffuse; + + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, i.normalWS); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, i.normalWS, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + + float lambert = dot(_WorldSpaceLightPos0.xyz, i.normalWS.xyz) + vertexLighting.a;; + float ramp = SAMPLE_TEX2D(_RampG, lambert * _RampG_ST.xy + _RampG_ST.zw); + finalCol = ramp * finalCol + shadedDiffuse; + + float shadowAttenuation = saturate(ramp); + #ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + shadowAttenuation *= shadowMap; + #endif + + float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient; + lightCol = max(lightCol, _ambientshadowG.xyz); + finalCol *= lightCol; + + float3 hsl = RGBtoHSL(finalCol); + hsl.x = hsl.x + _ShadowHSV.x; + hsl.y = hsl.y + _ShadowHSV.y; + hsl.z = hsl.z + _ShadowHSV.z; + finalCol = lerp(HSLtoRGB(hsl), finalCol, saturate(shadowAttenuation + 0.5)); + + // Overlay emission over everything + float4 emission = GetEmission(i.uv0); + finalCol = finalCol * (1 - emission.a) + (emission.a * emission.rgb); + + return float4(max(finalCol, 1E-06), alpha); +} \ No newline at end of file diff --git a/Shaders/Eye/KKPEyeWPlusFrag.cginc.meta b/Shaders/Eye/KKPEyeWPlusFrag.cginc.meta new file mode 100644 index 0000000..8137ce5 --- /dev/null +++ b/Shaders/Eye/KKPEyeWPlusFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ce113dff7b0573640842fb2d097fcc30 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair.meta b/Shaders/Hair.meta new file mode 100644 index 0000000..250e6cc --- /dev/null +++ b/Shaders/Hair.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 78c253d220929f64baa2da4441d90619 +folderAsset: yes +timeCreated: 1705466960 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairFrontPlus.shader b/Shaders/Hair/HairFrontPlus.shader index 7ec4ae2..7b72bbe 100644 --- a/Shaders/Hair/HairFrontPlus.shader +++ b/Shaders/Hair/HairFrontPlus.shader @@ -21,9 +21,10 @@ [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) _NormalMapScale ("NormalMapScale", Float) = 1 - [HideInInspector] _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 @@ -46,17 +47,27 @@ _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + _transparency ("Hair Transparency", Float) = 1.0 + _src ("Src", Float) = 5.0 + _dst ("Dst", Float) = 10.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 } SubShader { LOD 600 - Tags {"Queue" = "Transparent+40" "RenderType" = "Transparent" } - //Outline + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" } + // Outline Pass { Name "Outline" LOD 600 - Tags {"Queue" = "Transparent+40" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha Cull Front Stencil { Ref 2 @@ -65,9 +76,11 @@ Fail Keep ZFail Keep } + CGPROGRAM #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -79,8 +92,8 @@ { Varyings o; - float alphaMask = tex2Dlod(_AlphaMask, float4(v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0, 0)).r; - float mainAlpha = tex2Dlod(_MainTex, float4(v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0, 0)).a; + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; float alpha = alphaMask * mainAlpha; o.posWS = mul(unity_ObjectToWorld, v.vertex); @@ -92,7 +105,7 @@ viewVal *= lineVal * _LineWidthS; alpha *= viewVal; - float4 detailMask = tex2Dlod(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); float inverseMask = 1 - detailMask.z; alpha *= inverseMask; @@ -101,17 +114,102 @@ u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; o.posCS = UnityObjectToClipPos(u_xlat0.xyz); o.uv0 = v.uv0; - + 1; return o; } + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + } + + ENDCG + } + + // Outline Alpha 1 + Pass + { + Name "OutlineAlpha1" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Front + Stencil { + Ref 2 + Comp Equal + Pass IncrSat + Fail Keep + ZFail Keep + } - fixed4 frag (Varyings i) : SV_Target + CGPROGRAM + #pragma vertex vert + #pragma fragment transparencyFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + + Varyings vert (VertexData v) { + Varyings o; - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); float3 diffuse = GetDiffuse(i.uv0); @@ -138,20 +236,108 @@ return float4(diffuse, 1); } - + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } ENDCG } + // Outline Alpha 2 + Pass + { + Name "OutlineAlpha2" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst] + Cull Front + + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail DecrSat + ZFail Keep + } - //Main Pass + CGPROGRAM + #pragma vertex vert + #pragma fragment transparencyFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Main Pass Pass { Name "Forward" LOD 600 - Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent+40" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha - Cull Off + Cull [_CullOption] Stencil { Ref 2 Comp NotEqual @@ -165,6 +351,7 @@ #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -177,6 +364,7 @@ #include "KKPHairInput.cginc" #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" @@ -188,14 +376,66 @@ ENDCG } + + // Main Alpha + Pass + { + Name "MainAlpha" + Tags { "LightMode" = "ForwardBase" "QUEUE" = "AlphaTest-400" "RenderType" = "TransparentCutout" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Back + + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 3.0 + #pragma vertex vert + #pragma fragment transparencyFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #define HAIR_FRONT + #include "KKPHairVertFrag.cginc" //Vert Frag here + + fixed4 transparencyFrag (Varyings i, int frontFace : VFACE) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i, frontFace); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } - //ShadowCaster + // ShadowCaster Pass { Name "ShadowCaster" LOD 600 - Tags { "LightMode" = "ShadowCaster" "Queue" = "Transparent+40" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Tags { "LightMode" = "ShadowCaster" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } Offset 1, 1 Cull Back @@ -203,13 +443,16 @@ #pragma vertex vert #pragma fragment frag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" + + #include "KKPHairInput.cginc" - sampler2D _MainTex; - float4 _MainTex_ST; - sampler2D _AlphaMask; - float4 _AlphaMask_ST; + //DECLARE_TEX2D(_MainTex); + //float4 _MainTex_ST; + //DECLARE_TEX2D(_AlphaMask); + //float4 _AlphaMask_ST; struct v2f { float2 uv0 : TEXCOORD1; @@ -226,12 +469,11 @@ float4 frag(v2f i) : SV_Target { - - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float alphaVal = alphaMask.x * mainTex.a; - float clipVal = (alphaVal.x - 0.5) < 0.0f; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; if(clipVal * int(0xffffffffu) != 0) discard; @@ -243,5 +485,6 @@ } } + Fallback "Unlit/Texture" } diff --git a/Shaders/Hair/HairFrontPlus.shader.meta b/Shaders/Hair/HairFrontPlus.shader.meta new file mode 100644 index 0000000..bd9d2ad --- /dev/null +++ b/Shaders/Hair/HairFrontPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b87fb5d0be14c64498d801687be0c4e7 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairFrontPlusReflect.shader b/Shaders/Hair/HairFrontPlusReflect.shader new file mode 100644 index 0000000..215f039 --- /dev/null +++ b/Shaders/Hair/HairFrontPlusReflect.shader @@ -0,0 +1,646 @@ +Shader "xukmi/HairFrontPlusReflect" +{ + Properties + { + _AnotherRamp ("Another Ramp(ViewDir)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _AlphaMask ("Alpha Mask", 2D) = "white" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _HairGloss ("Gloss Mask", 2D) = "black" {} + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.85 + _SpecularHairPower ("Specular Power", Range(0, 1)) = 1 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.75 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 0.5 + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Vector) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Vector) = (0.7843137,0.7843137,0.7843137,1) + [Gamma]_Color3 ("Color3", Vector) = (0.5,0.5,0.5,1) + [Gamma]_GlossColor ("GlossColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 + _SpecularIsHighLightsPow ("Specular is highlight", Range(0,128)) = 64 + _SpecularIsHighlightsRange ("Specular is highlight Range", Range(0, 20)) = 5 + [MaterialToggle] _UseMeshSpecular ("Use Mesh Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 + [Enum(Off,0,On,1)]_SpecularHeightInvert ("Specular Height Invert", Float) = 0 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + _transparency ("Hair Transparency", Float) = 1.0 + _src ("Src", Float) = 5.0 + _dst ("Dst", Float) = 10.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" } + // Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull Front + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + 1; + return o; + } + + + + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + + ENDCG + } + + // Outline Alpha 1 + Pass + { + Name "OutlineAlpha1" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Front + Stencil { + Ref 2 + Comp Equal + Pass IncrSat + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment transparencyFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Outline Alpha 2 + Pass + { + Name "OutlineAlpha2" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst] + Cull Front + + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail DecrSat + ZFail Keep + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment transparencyFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull [_CullOption] + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 3.0 + + #pragma vertex vert + #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #define HAIR_FRONT + #include "KKPHairVertFrag.cginc" //Vert Frag here + + + + ENDCG + } + + // Main Alpha + Pass + { + Name "ALPHA" + Tags { "LightMode" = "ForwardBase" "QUEUE" = "AlphaTest-400" "RenderType" = "TransparentCutout" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Back + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 3.0 + + #pragma vertex vert + #pragma fragment transparencyFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #define HAIR_FRONT + #include "KKPHairVertFrag.cginc" //Vert Frag here + + fixed4 transparencyFrag (Varyings i, int frontFace : VFACE) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i, frontFace); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Reflection Pass 1 + Pass + { + Name "Reflect1" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 3.0 + #pragma vertex vert + #pragma fragment reflectfrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + + #include "KKPHairReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + ENDCG + + } + + // Reflection Pass 2 + Pass + { + Name "Reflect2" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + Cull Back + + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 3.0 + #pragma vertex vert + #pragma fragment reflectfrag2 + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + + #include "KKPHairReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + fixed4 reflectfrag2 (Varyings i) : SV_Target + { + _ReflectionVal *= 1 - _transparency; + return reflectfrag(i); + } + + ENDCG + + } + + // ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Back + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + + #include "KKPHairInput.cginc" + + //DECLARE_TEX2D(_MainTex); + //float4 _MainTex_ST; + //DECLARE_TEX2D(_AlphaMask); + //float4 _AlphaMask_ST; + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(appdata_base v) + { + v2f o; + o.uv0 = v.texcoord; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + float4 frag(v2f i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float alphaVal = alphaMask.x * mainTex.a; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + + + ENDCG + } + + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Hair/HairFrontPlusReflect.shader.meta b/Shaders/Hair/HairFrontPlusReflect.shader.meta new file mode 100644 index 0000000..6e25f54 --- /dev/null +++ b/Shaders/Hair/HairFrontPlusReflect.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a049e3d36cc6f1449b847bd015e51018 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairFrontPlusTess.shader b/Shaders/Hair/HairFrontPlusTess.shader new file mode 100644 index 0000000..65eb676 --- /dev/null +++ b/Shaders/Hair/HairFrontPlusTess.shader @@ -0,0 +1,554 @@ +Shader "xukmi/HairFrontPlusTess" +{ + Properties + { + _AnotherRamp ("Another Ramp(ViewDir)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _AlphaMask ("Alpha Mask", 2D) = "white" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _HairGloss ("Gloss Mask", 2D) = "black" {} + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.85 + _SpecularHairPower ("Specular Power", Range(0, 1)) = 1 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.75 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 0.5 + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Vector) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Vector) = (0.7843137,0.7843137,0.7843137,1) + [Gamma]_Color3 ("Color3", Vector) = (0.5,0.5,0.5,1) + [Gamma]_GlossColor ("GlossColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 + _SpecularIsHighLightsPow ("Specular is highlight", Range(0,128)) = 64 + _SpecularIsHighlightsRange ("Specular is highlight Range", Range(0, 20)) = 5 + [MaterialToggle] _UseMeshSpecular ("Use Mesh Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 + [Enum(Off,0,On,1)]_SpecularHeightInvert ("Specular Height Invert", Float) = 0 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + _transparency ("Hair Transparency", Float) = 1.0 + _src ("Src", Float) = 5.0 + _dst ("Dst", Float) = 10.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" } + // Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull Front + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + #define TESS_MID + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + + ENDCG + } + + // Outline Alpha 1 + Pass + { + Name "OutlineAlpha1" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Front + Stencil { + Ref 2 + Comp Equal + Pass IncrSat + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment transparencyFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + #define TESS_MID + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Outline Alpha 2 + Pass + { + Name "OutlineAlpha2" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst] + Cull Front + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail DecrSat + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment transparencyFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + #define TESS_MID + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull [_CullOption] + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + #define TESS_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #define HAIR_FRONT + #include "KKPHairVertFrag.cginc" //Vert Frag here + + #include "KKPHairTess.cginc" + + ENDCG + } + + // Main Alpha + Pass + { + Name "ALPHA" + Tags { "LightMode" = "ForwardBase" "QUEUE" = "AlphaTest-400" "RenderType" = "TransparentCutout" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Back + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment transparencyFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #define HAIR_FRONT + #include "KKPHairVertFrag.cginc" //Vert Frag here + #include "KKPHairTess.cginc" + + fixed4 transparencyFrag (Varyings i, int frontFace : VFACE) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i, frontFace); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Back + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + + #include "UnityCG.cginc" + + #include "KKPHairInput.cginc" + #include "../KKPDisplace.cginc" + #define TESS_LOW + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + #include "KKPHairTess.cginc" + + float4 frag(v2f i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float alphaVal = alphaMask.x * mainTex.a; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + + + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Hair/HairFrontPlusTess.shader.meta b/Shaders/Hair/HairFrontPlusTess.shader.meta new file mode 100644 index 0000000..90b1faa --- /dev/null +++ b/Shaders/Hair/HairFrontPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 90304c540a1356c46aea4e2f197525b1 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairFrontPlusTessReflect.shader b/Shaders/Hair/HairFrontPlusTessReflect.shader new file mode 100644 index 0000000..4380a17 --- /dev/null +++ b/Shaders/Hair/HairFrontPlusTessReflect.shader @@ -0,0 +1,730 @@ +Shader "xukmi/HairFrontPlusTessReflect" +{ + Properties + { + _AnotherRamp ("Another Ramp(ViewDir)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _AlphaMask ("Alpha Mask", 2D) = "white" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _HairGloss ("Gloss Mask", 2D) = "black" {} + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.85 + _SpecularHairPower ("Specular Power", Range(0, 1)) = 1 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.75 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 0.5 + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Vector) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Vector) = (0.7843137,0.7843137,0.7843137,1) + [Gamma]_Color3 ("Color3", Vector) = (0.5,0.5,0.5,1) + [Gamma]_GlossColor ("GlossColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 + _SpecularIsHighLightsPow ("Specular is highlight", Range(0,128)) = 64 + _SpecularIsHighlightsRange ("Specular is highlight Range", Range(0, 20)) = 5 + [MaterialToggle] _UseMeshSpecular ("Use Mesh Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 + [Enum(Off,0,On,1)]_SpecularHeightInvert ("Specular Height Invert", Float) = 0 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + _transparency ("Hair Transparency", Float) = 1.0 + _src ("Src", Float) = 5.0 + _dst ("Dst", Float) = 10.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" } + // Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull Front + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define TESS_MID + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + } + ENDCG + } + + // Outline Alpha 1 + Pass + { + Name "OutlineAlpha1" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Front + Stencil { + Ref 2 + Comp Equal + Pass IncrSat + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment transparencyFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + #define TESS_MID + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Outline Alpha 2 + Pass + { + Name "OutlineAlpha2" + Tags { "QUEUE" = "AlphaTest-400" "RenderType" = "Transparent" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst] + Cull Front + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail DecrSat + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment transparencyFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + #define TESS_MID + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + fixed4 transparencyFrag(Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull [_CullOption] + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + #define TESS_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #define HAIR_FRONT + #include "KKPHairVertFrag.cginc" //Vert Frag here + + #include "KKPHairTess.cginc" + + ENDCG + } + + // Main Alpha + Pass + { + Name "ALPHA" + Tags { "LightMode" = "ForwardBase" "QUEUE" = "AlphaTest-400" "RenderType" = "TransparentCutout" "SHADOWSUPPORT" = "true" } + Blend [_src] [_dst], SrcAlpha OneMinusSrcAlpha + Cull Back + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment transparencyFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #define HAIR_FRONT + #include "KKPHairVertFrag.cginc" //Vert Frag here + #include "KKPHairTess.cginc" + + fixed4 transparencyFrag (Varyings i, int frontFace : VFACE) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + float4 col = frag(i, frontFace); + return float4(col.rgb, 1 - _transparency); + } + + ENDCG + } + + // Reflection Pass 1 + Pass + { + Name "Reflect1" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + + Stencil { + Ref 2 + Comp NotEqual + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment reflectfrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + + #include "KKPHairReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPHairTess.cginc" + + ENDCG + + } + + // Reflection Pass 2 + Pass + { + Name "Reflect2" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + Cull Back + + Stencil { + Ref 2 + Comp Equal + Pass Keep + Fail Keep + ZFail Keep + } + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment reflectfrag2 + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + + #include "KKPHairReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 reflectfrag2 (Varyings i) : SV_Target + { + _ReflectionVal *= 1 - _transparency; + return reflectfrag(i); + } + + ENDCG + + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "AlphaTest+25" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Back + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + #define TESS_LOW + + #include "UnityCG.cginc" + + #include "KKPHairInput.cginc" + #include "../KKPDisplace.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + #include "KKPHairTess.cginc" + + float4 frag(v2f i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float alphaVal = alphaMask.x * mainTex.a; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Hair/HairFrontPlusTessReflect.shader.meta b/Shaders/Hair/HairFrontPlusTessReflect.shader.meta new file mode 100644 index 0000000..89b4517 --- /dev/null +++ b/Shaders/Hair/HairFrontPlusTessReflect.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85972ffba83fda94a92560e04d512985 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairPlus.shader b/Shaders/Hair/HairPlus.shader index e6ea0a6..e0c26e8 100644 --- a/Shaders/Hair/HairPlus.shader +++ b/Shaders/Hair/HairPlus.shader @@ -21,9 +21,10 @@ [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) _NormalMapScale ("NormalMapScale", Float) = 1 - [HideInInspector] _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 @@ -46,6 +47,13 @@ _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 } SubShader { @@ -62,6 +70,7 @@ CGPROGRAM #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -74,8 +83,8 @@ { Varyings o; - float alphaMask = tex2Dlod(_AlphaMask, float4(v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0, 0)).r; - float mainAlpha = tex2Dlod(_MainTex, float4(v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0, 0)).a; + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; float alpha = alphaMask * mainAlpha; o.posWS = mul(unity_ObjectToWorld, v.vertex); @@ -87,7 +96,7 @@ viewVal *= lineVal * _LineWidthS; alpha *= viewVal; - float4 detailMask = tex2Dlod(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); float inverseMask = 1 - detailMask.z; alpha *= inverseMask; @@ -96,7 +105,7 @@ u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; o.posCS = UnityObjectToClipPos(u_xlat0.xyz); o.uv0 = v.uv0; - + 1; return o; } @@ -105,8 +114,7 @@ fixed4 frag (Varyings i) : SV_Target { - - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); float3 diffuse = GetDiffuse(i.uv0); @@ -145,7 +153,7 @@ Name "Forward" LOD 600 Tags { "LightMode" = "ForwardBase" "RenderType" = "Opaque" "ShadowSupport" = "true" } - Cull Off + Cull [_CullOption] CGPROGRAM @@ -153,6 +161,7 @@ #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -165,6 +174,7 @@ #include "KKPHairInput.cginc" #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" @@ -190,13 +200,16 @@ #pragma vertex vert #pragma fragment frag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" - sampler2D _MainTex; - float4 _MainTex_ST; - sampler2D _AlphaMask; - float4 _AlphaMask_ST; + #include "KKPHairInput.cginc" + + //DECLARE_TEX2D(_MainTex); + //float4 _MainTex_ST; + //DECLARE_TEX2D(_AlphaMask); + //float4 _AlphaMask_ST; struct v2f { float2 uv0 : TEXCOORD1; @@ -213,12 +226,11 @@ float4 frag(v2f i) : SV_Target { - - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float alphaVal = alphaMask.x * mainTex.a; - float clipVal = (alphaVal.x - 0.5) < 0.0f; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; if(clipVal * int(0xffffffffu) != 0) discard; diff --git a/Shaders/Hair/HairPlus.shader.meta b/Shaders/Hair/HairPlus.shader.meta new file mode 100644 index 0000000..3a0d909 --- /dev/null +++ b/Shaders/Hair/HairPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4fefb229824596d42a564d7c13a6638d +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairPlusReflect.shader b/Shaders/Hair/HairPlusReflect.shader new file mode 100644 index 0000000..8f39fd0 --- /dev/null +++ b/Shaders/Hair/HairPlusReflect.shader @@ -0,0 +1,309 @@ +Shader "xukmi/HairPlusReflect" +{ + Properties + { + _AnotherRamp ("Another Ramp(ViewDir)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _AlphaMask ("Alpha Mask", 2D) = "white" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _HairGloss ("Gloss Mask", 2D) = "black" {} + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.85 + _SpecularHairPower ("Specular Power", Range(0, 1)) = 1 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.75 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 0.5 + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Vector) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Vector) = (0.7843137,0.7843137,0.7843137,1) + [Gamma]_Color3 ("Color3", Vector) = (0.5,0.5,0.5,1) + [Gamma]_GlossColor ("GlossColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 + _SpecularIsHighLightsPow ("Specular is highlight", Range(0,128)) = 64 + _SpecularIsHighlightsRange ("Specular is highlight Range", Range(0, 20)) = 5 + [MaterialToggle] _UseMeshSpecular ("Use Mesh Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 + [Enum(Off,0,On,1)]_SpecularHeightInvert ("Specular Height Invert", Float) = 0 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags {"RenderType" = "Opaque" } + //Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"RenderType" = "Opaque" "ShadowSupport" = "true" } + Cull Front + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + + + Varyings vert (VertexData v) + { + Varyings o; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + 1; + return o; + } + + + + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + + } + + + ENDCG + } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "RenderType" = "Opaque" "ShadowSupport" = "true" } + Cull [_CullOption] + + CGPROGRAM + #pragma target 3.0 + + #pragma vertex vert + #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #include "KKPHairVertFrag.cginc" //Vert Frag here + + ENDCG + } + + //Reflection Pass + Pass{ + Name "Reflect" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent-100" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + CGPROGRAM + #pragma target 3.0 + #pragma vertex vert + #pragma fragment reflectfrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + + #include "KKPHairReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + + ENDCG + + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "RenderType" = "Opaque" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Back + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #include "UnityCG.cginc" + + #include "KKPHairInput.cginc" + + //DECLARE_TEX2D(_MainTex); + //float4 _MainTex_ST; + //DECLARE_TEX2D(_AlphaMask); + //float4 _AlphaMask_ST; + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(appdata_base v) + { + v2f o; + o.uv0 = v.texcoord; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + float4 frag(v2f i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float alphaVal = alphaMask.x * mainTex.a; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Hair/HairPlusReflect.shader.meta b/Shaders/Hair/HairPlusReflect.shader.meta new file mode 100644 index 0000000..f29ef0f --- /dev/null +++ b/Shaders/Hair/HairPlusReflect.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: db5a78ae71a0b6a4fa22da708e34af80 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairPlusTess.shader b/Shaders/Hair/HairPlusTess.shader new file mode 100644 index 0000000..995f7ed --- /dev/null +++ b/Shaders/Hair/HairPlusTess.shader @@ -0,0 +1,276 @@ +Shader "xukmi/HairPlusTess" +{ + Properties + { + _AnotherRamp ("Another Ramp(ViewDir)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _AlphaMask ("Alpha Mask", 2D) = "white" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _HairGloss ("Gloss Mask", 2D) = "black" {} + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.85 + _SpecularHairPower ("Specular Power", Range(0, 1)) = 1 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.75 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 0.5 + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Vector) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Vector) = (0.7843137,0.7843137,0.7843137,1) + [Gamma]_Color3 ("Color3", Vector) = (0.5,0.5,0.5,1) + [Gamma]_GlossColor ("GlossColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 + _SpecularIsHighLightsPow ("Specular is highlight", Range(0,128)) = 64 + _SpecularIsHighlightsRange ("Specular is highlight Range", Range(0, 20)) = 5 + [MaterialToggle] _UseMeshSpecular ("Use Mesh Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 + [Enum(Off,0,On,1)]_SpecularHeightInvert ("Specular Height Invert", Float) = 0 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags {"RenderType" = "Opaque" } + //Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"RenderType" = "Opaque" "ShadowSupport" = "true" } + Cull Front + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define TESS_MID + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + } + ENDCG + } + + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "RenderType" = "Opaque" "ShadowSupport" = "true" } + Cull [_CullOption] + + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + #define TESS_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #include "KKPHairVertFrag.cginc" //Vert Frag here + + #include "KKPHairTess.cginc" + + ENDCG + } + + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "RenderType" = "Opaque" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Back + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + #define TESS_LOW + + #include "UnityCG.cginc" + + #include "KKPHairInput.cginc" + #include "../KKPDisplace.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + #include "KKPHairTess.cginc" + + float4 frag(v2f i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float alphaVal = alphaMask.x * mainTex.a; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Hair/HairPlusTess.shader.meta b/Shaders/Hair/HairPlusTess.shader.meta new file mode 100644 index 0000000..48a5366 --- /dev/null +++ b/Shaders/Hair/HairPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4e5494473a9de7b41933bb0c17eef95f +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/HairPlusTessReflect.shader b/Shaders/Hair/HairPlusTessReflect.shader new file mode 100644 index 0000000..588df3d --- /dev/null +++ b/Shaders/Hair/HairPlusTessReflect.shader @@ -0,0 +1,353 @@ +Shader "xukmi/HairPlusTessReflect" +{ + Properties + { + _AnotherRamp ("Another Ramp(ViewDir)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _AlphaMask ("Alpha Mask", 2D) = "white" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _HairGloss ("Gloss Mask", 2D) = "black" {} + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.85 + _SpecularHairPower ("Specular Power", Range(0, 1)) = 1 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.75 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 0.5 + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Vector) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Vector) = (0.7843137,0.7843137,0.7843137,1) + [Gamma]_Color3 ("Color3", Vector) = (0.5,0.5,0.5,1) + [Gamma]_GlossColor ("GlossColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_SpecularColor ("SpecularColor", Vector) = (1.0,1.0,1.0,1.0) + [Gamma]_LineColor ("LineColor", Vector) = (0.5,0.5,0.5,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _SpecularIsHighlights ("Specular is highlight", Float) = 0 + _SpecularIsHighLightsPow ("Specular is highlight", Range(0,128)) = 64 + _SpecularIsHighlightsRange ("Specular is highlight Range", Range(0, 20)) = 5 + [MaterialToggle] _UseMeshSpecular ("Use Mesh Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 + [Enum(Off,0,On,1)]_SpecularHeightInvert ("Specular Height Invert", Float) = 0 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectMap ("Reflect Body Map", 2D) = "white" {} + _Roughness ("Roughness", Range(0, 1)) = 0.75 + _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectionMapCap ("Matcap", 2D) = "white" {} + _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 + _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 + _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 + _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags {"RenderType" = "Opaque" } + //Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"RenderType" = "Opaque" "ShadowSupport" = "true" } + Cull Front + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define TESS_MID + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "../KKPDisplace.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + float alphaMask = SAMPLE_TEX2D_LOD(_AlphaMask, v.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw, 0).r; + float mainAlpha = SAMPLE_TEX2D_LOD(_MainTex, v.uv0 * _MainTex_ST.xy + _MainTex_ST.zw, 0).a; + float alpha = alphaMask * mainAlpha; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + + float3 viewDir = o.posWS - _WorldSpaceCameraPos.xyz; //This is inverted? + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal * _LineWidthS; + alpha *= viewVal; + + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw, 0, 0), 0); + float inverseMask = 1 - detailMask.z; + alpha *= inverseMask; + + //Not too sure what's going on, some viewspace based outlines? + float4 u_xlat0; + u_xlat0.xyz = v.normal.xyz * alpha + v.vertex.xyz; + o.posCS = UnityObjectToClipPos(u_xlat0.xyz); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPHairTess.cginc" + + fixed4 frag (Varyings i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float alpha = AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 diffuse = GetDiffuse(i.uv0); + float3 diffuseMainTex = -diffuse * mainTex.xyz + 1; + diffuse = mainTex * diffuse; + diffuse *= _LineColor.rgb; + diffuse += diffuse; + float3 lineColor = _LineColor.rgb - 0.5; + lineColor = -lineColor * 2 + 1; + lineColor = -lineColor * diffuseMainTex + 1; + + bool3 colCheck = 0.5 < _LineColor.rgb; + { + float3 hlslcc_movcTemp = diffuse; + hlslcc_movcTemp.x = (colCheck.x) ? lineColor.x : diffuse.x; + hlslcc_movcTemp.y = (colCheck.y) ? lineColor.y : diffuse.y; + hlslcc_movcTemp.z = (colCheck.z) ? lineColor.z : diffuse.z; + diffuse = hlslcc_movcTemp; + } + diffuse = saturate(diffuse); + float3 lightCol = _LightColor0.xyz * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + diffuse *= lightCol; + + return float4(diffuse, 1); + } + ENDCG + } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "RenderType" = "Opaque" "ShadowSupport" = "true" } + Cull [_CullOption] + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + #define TESS_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + + #include "KKPHairVertFrag.cginc" //Vert Frag here + + #include "KKPHairTess.cginc" + + ENDCG + } + + //Reflection Pass + Pass{ + Name "Reflect" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent-100" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Blend [_ReflBlendSrc] [_ReflBlendDst] + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment reflectfrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP + + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #include "KKPHairInput.cginc" + #include "KKPHairDiffuse.cginc" + #include "KKPHairNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + + #include "KKPHairReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = UnityObjectToClipPos(v.vertex); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPHairTess.cginc" + + ENDCG + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "RenderType" = "Opaque" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Back + + CGPROGRAM + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + #define TESS_LOW + + #include "UnityCG.cginc" + + #include "KKPHairInput.cginc" + #include "../KKPDisplace.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + #include "KKPHairTess.cginc" + + float4 frag(v2f i) : SV_Target + { + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float alphaVal = alphaMask.x * mainTex.a; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Hair/HairPlusTessReflect.shader.meta b/Shaders/Hair/HairPlusTessReflect.shader.meta new file mode 100644 index 0000000..1d8e002 --- /dev/null +++ b/Shaders/Hair/HairPlusTessReflect.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2b77e5896e92fc14eacaaa896ecc118b +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/KKPHairDiffuse.cginc b/Shaders/Hair/KKPHairDiffuse.cginc index 66bab57..8da3dd7 100644 --- a/Shaders/Hair/KKPHairDiffuse.cginc +++ b/Shaders/Hair/KKPHairDiffuse.cginc @@ -47,7 +47,7 @@ void AmbientShadowAdjust(out float3 a){ float3 GetDiffuse(float2 uv){ float3 diffuse = _Color.rgb - 1; - float4 colorMask = tex2D(_ColorMask, uv * _ColorMask_ST.xy + _ColorMask_ST.zw); + float4 colorMask = SAMPLE_TEX2D(_ColorMask, uv * _ColorMask_ST.xy + _ColorMask_ST.zw); diffuse = colorMask.x * diffuse + 1; float3 color2 = _Color2.rgb - diffuse; diffuse = colorMask.y * color2 + diffuse; @@ -56,11 +56,44 @@ float3 GetDiffuse(float2 uv){ return diffuse; } +float3 HUEtoRGB(in float H) +{ + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R,G,B)); +} + +float Epsilon = 1e-10; +float3 RGBtoHCV(in float3 RGB) +{ + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0/3.0) : float4(RGB.gb, 0.0, -1.0/3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); +} + +float3 RGBtoHSL(in float3 RGB) +{ + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); +} +float3 HSLtoRGB(in float3 HSL) +{ + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return (RGB - 0.5) * C + HSL.z; +} + float AlphaClip(float2 uv, float mainTexAlpha){ float2 alphaUV = uv * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float alphaVal = alphaMask.x * mainTexAlpha; - float clipVal = (alphaVal.x - 0.5) < 0.0f; + float clipVal = (alphaVal.x - _Cutoff) < 0.0f; if(clipVal * int(0xffffffffu) != 0) discard; return alphaVal; diff --git a/Shaders/Hair/KKPHairDiffuse.cginc.meta b/Shaders/Hair/KKPHairDiffuse.cginc.meta new file mode 100644 index 0000000..eee0cec --- /dev/null +++ b/Shaders/Hair/KKPHairDiffuse.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f245bd4995bc4f243baf064be311350e +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/KKPHairInput.cginc b/Shaders/Hair/KKPHairInput.cginc index 3378930..0262559 100644 --- a/Shaders/Hair/KKPHairInput.cginc +++ b/Shaders/Hair/KKPHairInput.cginc @@ -1,5 +1,8 @@ #ifndef KKP_HAIR_INPUT #define KKP_HAIR_INPUT + +#include "../KKPDeclarations.cginc" + struct VertexData { float4 vertex : POSITION; @@ -38,6 +41,7 @@ bool _SpecularHeightInvert; float _NormalMapScale; + float _SpecularNormalScale; bool _UseKKPRim; float4 _KKPRimColor; @@ -48,14 +52,15 @@ float _KKPRimRotateY; //Input Textures - sampler2D _MainTex; - sampler2D _AlphaMask; - sampler2D _NormalMap; - sampler2D _ColorMask; - sampler2D _HairGloss; - sampler2D _DetailMask; - sampler2D _RampG; - sampler2D _AnotherRamp; + DECLARE_TEX2D(_MainTex); + DECLARE_TEX2D(_AlphaMask); + DECLARE_TEX2D(_NormalMap); + DECLARE_TEX2D(_ColorMask); + DECLARE_TEX2D(_HairGloss); + DECLARE_TEX2D(_DetailMask); + DECLARE_TEX2D(_RampG); + DECLARE_TEX2D(_AnotherRamp); + //UV Offsets float4 _MainTex_ST; float4 _AlphaMask_ST; @@ -66,7 +71,6 @@ float4 _RampG_ST; float4 _AnotherRamp_ST; - float _rimpower; float _rimV; @@ -77,6 +81,7 @@ float4 _SpecularColor; float4 _ShadowColor; + float4 _ShadowHSV; float _SpeclarHeight; float _ShadowExtend; @@ -85,5 +90,21 @@ //Global light params set by KK float _linewidthG; float4 _ambientshadowG; - + + float _AdjustBackfaceNormals; + float _DisablePointLights; + float _DisableShadowedMatcap; + int _CullOption; + float _Cutoff; + float _rimReflectMode; + float _transparency; + float _src; + float _dst; + + // Required for Matcap light-masking + DECLARE_TEX2D(_NormalMask); + float4 _NormalMask_ST; + float _FaceShadowG; + float _FaceNormalG; + bool _UseRampForShadows; #endif \ No newline at end of file diff --git a/Shaders/Hair/KKPHairInput.cginc.meta b/Shaders/Hair/KKPHairInput.cginc.meta new file mode 100644 index 0000000..afd0759 --- /dev/null +++ b/Shaders/Hair/KKPHairInput.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: af9cfe5fccaea1140b4c4adbfcfa6188 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/KKPHairLighting.cginc b/Shaders/Hair/KKPHairLighting.cginc new file mode 100644 index 0000000..c84723f --- /dev/null +++ b/Shaders/Hair/KKPHairLighting.cginc @@ -0,0 +1,43 @@ +#ifndef KKP_HAIR_LIGHTING_INC +#define KKP_HAIR_LIGHTING_INC + +float GetLambert(float3 lightPos, float3 normal){ + return max(dot(lightPos, normal), 0.0); +} + +//Shadows +float GetShadowAttenuation(Varyings i, float vertexLightingShadowAtten, float3 normal, float3 worldLightPos, float3 viewDir){ + + //Normal adjustment for the face I suppose it keeps the face more lit? + float3 viewNorm = viewDir - normal; + float2 normalMaskUV = i.uv0 * _NormalMask_ST.xy + _NormalMask_ST.zw; + float3 normalMask = SAMPLE_TEX2D(_NormalMask, normalMaskUV).rgb; + normalMask.xy = normalMask.yz * float2(_FaceNormalG, _FaceShadowG); + viewNorm = normalMask.x * viewNorm + normal; + float maskG = max(normalMask.g, 1.0); + + #ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + float shadowAttenuation = saturate(shadowMap.x * 2.0 - 1.0); + shadowAttenuation = max(shadowAttenuation, normalMask.y); + #else + float shadowAttenuation = maskG; + #endif + + float shadowAttenLambert = _UseRampForShadows ? shadowAttenuation : 1; + float rampAtten = _UseRampForShadows ? 1 : shadowAttenuation; + + float lambertShadows = GetLambert(worldLightPos, normal) * shadowAttenLambert; + float vertexShadows = vertexLightingShadowAtten; + float blendShadows = max(vertexShadows, lambertShadows); + float2 rampUV = blendShadows * _RampG_ST.xy + _RampG_ST.zw; + float ramp = SAMPLE_TEX2D(_RampG, rampUV).x * rampAtten; + + + + return ramp; + +} + +#endif \ No newline at end of file diff --git a/Shaders/Hair/KKPHairLighting.cginc.meta b/Shaders/Hair/KKPHairLighting.cginc.meta new file mode 100644 index 0000000..77325bd --- /dev/null +++ b/Shaders/Hair/KKPHairLighting.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cb398ca6b9cc95c43a1ae0280e707ced +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/KKPHairNormals.cginc b/Shaders/Hair/KKPHairNormals.cginc new file mode 100644 index 0000000..32235a0 --- /dev/null +++ b/Shaders/Hair/KKPHairNormals.cginc @@ -0,0 +1,30 @@ +#ifndef KKP_HAIRNORMAL_INC +#define KKP_HAIRNORMAL_INC + +float3 GetNormal(Varyings i){ + //Normals + float2 normalUV = i.uv0 * _NormalMap_ST.xy + _NormalMap_ST.zw; + return UnpackScaleNormal(SAMPLE_TEX2D(_NormalMap, normalUV), _NormalMapScale); +} + +float3 CreateBinormal (float3 normal, float3 tangent, float binormalSign) { + return cross(normal, tangent.xyz) * + (binormalSign * unity_WorldTransformParams.w); +} + +float3 NormalAdjust(Varyings i, float3 finalCombinedNormal, int faceDir = 0){ + float3 normal = finalCombinedNormal; + + float3 binormal = CreateBinormal(i.normalWS, i.tanWS.xyz, i.tanWS.w); + normal = normalize( + finalCombinedNormal.x * i.tanWS + + finalCombinedNormal.y * binormal + + finalCombinedNormal.z * i.normalWS + ); + + //This give some items correct shading on backfaces but messes up mirror shading + int adjust = int(floor(_AdjustBackfaceNormals)); + return adjust ? normal * (faceDir <= 0 ? -1 : 1) : normal; +} + +#endif \ No newline at end of file diff --git a/Shaders/Hair/KKPHairNormals.cginc.meta b/Shaders/Hair/KKPHairNormals.cginc.meta new file mode 100644 index 0000000..cca87ca --- /dev/null +++ b/Shaders/Hair/KKPHairNormals.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 255fbfb70b16279419160a56051d769f +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/KKPHairReflect.cginc b/Shaders/Hair/KKPHairReflect.cginc new file mode 100644 index 0000000..8c934d4 --- /dev/null +++ b/Shaders/Hair/KKPHairReflect.cginc @@ -0,0 +1,139 @@ +#ifndef KKP_HAIR_REFLECT +#define KKP_HAIR_REFLECT +DECLARE_TEX2D(_ReflectMap); +float4 _ReflectMap_ST; +DECLARE_TEX2D(_ReflectionMapCap); +float4 _ReflectionMapCap_ST; +float _Roughness; +float _ReflectionVal; +float _UseMatCapReflection; +float _ReflBlendVal; +float _ReflBlendSrc; +float _ReflBlendDst; +float4 _ReflectCol; +float _ReflectColMix; + +float _ReflectRotation; +DECLARE_TEX2D(_ReflectMask); +float4 _ReflectMask_ST; + +#ifndef ROTATEUV +float2 rotateUV(float2 uv, float2 pivot, float rotation) { + float cosa = cos(rotation); + float sina = sin(rotation); + uv -= pivot; + return float2( + cosa * uv.x - sina * uv.y, + cosa * uv.y + sina * uv.x + ) + pivot; +} +#endif + +fixed4 reflectfrag (Varyings i) : SV_Target +{ + + + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + + float3 viewDir = normalize(_WorldSpaceCameraPos - i.posWS); + float3 worldLight = normalize(_WorldSpaceLightPos0.xyz); //Directional light + + float2 normalUV = i.uv0 * _NormalMap_ST.xy + _NormalMap_ST.zw; + float3 normalMatcap = UnpackScaleNormal(SAMPLE_TEX2D(_NormalMap, normalUV), _NormalMapScale); + + float3 binormal = CreateBinormal(i.normalWS, i.tanWS.xyz, i.tanWS.w); + normalMatcap = normalize( + normalMatcap.x * i.tanWS + + normalMatcap.y * binormal + + normalMatcap.z * i.normalWS + ); + float3 adjustedNormal = normalize(normalMatcap); + + + float fresnel = max(0.0, dot(viewDir, adjustedNormal)); + float anotherRamp = SAMPLE_TEX2D(_AnotherRamp, fresnel * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw).x; + + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, adjustedNormal); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, adjustedNormal, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + + float lambert = saturate(dot(worldLight, adjustedNormal)) + vertexLighting.a; + float ramp = SAMPLE_TEX2D(_RampG, lambert * _RampG_ST.xy + _RampG_ST.zw).x; + float shadowAttenuation = saturate(min(ramp, anotherRamp)); + #ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + shadowAttenuation *= shadowMap; + #endif + + float4 detailMask = SAMPLE_TEX2D(_DetailMask, i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw); + float2 invertDetailGB = 1 - detailMask.gb; + float matcapAttenuation = shadowAttenuation * invertDetailGB.x; + matcapAttenuation = 1 - (1 - matcapAttenuation)*_DisableShadowedMatcap; + + float3 normal = GetNormal(i); + normal = NormalAdjust(i, normal); + float reflectMap = SAMPLE_TEX2D(_ReflectMap, (i.uv0 *_ReflectMap_ST.xy) + _ReflectMap_ST.zw).r; + + + float3 reflectionDir = reflect(-viewDir, normal); + float roughness = 1 - (_Roughness); + roughness *= 1.7 - 0.7 * roughness; + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 env = DecodeHDR(envSample, unity_SpecCube0_HDR); + + float3 viewNormal = mul((float3x3)UNITY_MATRIX_V, normal); + float2 matcapUV = viewNormal.xy * 0.5 * _ReflectionMapCap_ST.xy + 0.5 + _ReflectionMapCap_ST.zw; + matcapUV = rotateUV(matcapUV, float2(0.5, 0.5), radians(_ReflectRotation)); + float reflectMask = SAMPLE_TEX2D(_ReflectMask, i.uv0 * _ReflectMask_ST.xy + _ReflectMask_ST.zw).r; + + float4 matcap = SAMPLE_TEX2D(_ReflectionMapCap, matcapUV); + matcap = pow(matcap, 0.454545); + float3 matcapRGBcolored = lerp(matcap.rgb, matcap.rgb * _ReflectCol.rgb, _ReflectColMix); + env = lerp(env, matcapRGBcolored, _UseMatCapReflection * reflectMask); + + float alphaLerp = 1; + float reflectMulOrAdd = 1.0; + float src = floor(_ReflBlendSrc); + float dst = floor(_ReflBlendDst); + //Add + if(src == 1.0 && dst == 1.0){ + reflectMulOrAdd = 0.0; + alphaLerp = _ReflectCol.a; + } + //Mul + else if(src == 2.0 && dst == 0.0){ + reflectMulOrAdd = 1.0; + alphaLerp = _ReflectCol.a; + } + // Alpha Blend & Premultiplied Alpha + else if(dst == 10.0 && (src == 5.0 || src == 1.0)){ + reflectMulOrAdd = 0.0; + env *= _ReflectCol.a; + } + else { + reflectMulOrAdd = _ReflBlendVal; + alphaLerp = _ReflectCol.a; + } + + env *= matcapAttenuation * matcap.a; + + float modifiedReflectionVal = _ReflectionVal * reflectMap; + + float3 reflCol = lerp(env, reflectMulOrAdd, 1 - modifiedReflectionVal * matcapAttenuation * matcap.a * alphaLerp); + + return float4(max(reflCol, 1E-06), modifiedReflectionVal * reflectMap * _ReflectCol.a); +} + +#endif \ No newline at end of file diff --git a/Shaders/Hair/KKPHairReflect.cginc.meta b/Shaders/Hair/KKPHairReflect.cginc.meta new file mode 100644 index 0000000..f8c99c0 --- /dev/null +++ b/Shaders/Hair/KKPHairReflect.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 514d7849cbd834a4aa94317902f35e0f +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/KKPHairTess.cginc b/Shaders/Hair/KKPHairTess.cginc new file mode 100644 index 0000000..f3f244d --- /dev/null +++ b/Shaders/Hair/KKPHairTess.cginc @@ -0,0 +1,206 @@ +#ifndef KKP_EYETESS_INC +#define KKP_EYETESS_INC + +#define NUM_BEZ_POINTS + +struct TessellationControlPoint +{ + float4 vertex : INTERNALTESSPOS; + float4 posCS : CLIPPOS; + float4 posWS : WORLDPOS; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; +}; + +struct TessellationFactors { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + float3 bezierPoints[7] : BEZIERPOS; +}; + +TessellationControlPoint TessVert(VertexData v){ + TessellationControlPoint p; + p.vertex = v.vertex; + p.posWS = mul(unity_ObjectToWorld, v.vertex); + p.posCS = mul(UNITY_MATRIX_VP, p.posWS); + p.normal = v.normal; + p.tangent = v.tangent; + p.uv0 = v.uv0; + p.uv1 = v.uv1; + return p; +} + +DECLARE_TEX2D(_TessTex); +float _TessMax; +float _TessMin; +float _TessBias; +float _TessSmooth; +float _Tolerance; + +bool ShouldBackFaceCull(float4 p0PositionCS, float4 p1PositionCS, float4 p2PositionCS) { + float3 point0 = p0PositionCS.xyz / p0PositionCS.w; + float3 point1 = p1PositionCS.xyz / p1PositionCS.w; + float3 point2 = p2PositionCS.xyz / p2PositionCS.w; + // In clip space, the view direction is float3(0, 0, 1), so we can just test the z coord +#if UNITY_REVERSED_Z + return cross(point1 - point0, point2 - point0).z < -_Tolerance; +#else // In OpenGL, the test is reversed + return cross(point1 - point0, point2 - point0).z > _Tolerance; +#endif +} + +bool IsOutOfBounds(float3 p, float3 lower, float3 higher) { + return p.x < lower.x || p.x > higher.x || p.y < lower.y || p.y > higher.y || p.z < lower.z || p.z > higher.z; +} + +bool IsPointOutOfFrustum(float4 positionCS) { + float3 culling = positionCS.xyz; + float w = positionCS.w; + float3 lowerBounds = float3(-w - _Tolerance, -w - _Tolerance, -w * 0 - _Tolerance); + float3 higherBounds = float3(w + _Tolerance, w + _Tolerance, w + _Tolerance); + return IsOutOfBounds(culling, lowerBounds, higherBounds); +} + +bool ShouldClipPatch(float4 p0PositionCS, float4 p1PositionCS, float4 p2PositionCS) { + bool allOutside = IsPointOutOfFrustum(p0PositionCS) && IsPointOutOfFrustum(p1PositionCS) && IsPointOutOfFrustum(p2PositionCS); + bool backFace = ShouldBackFaceCull(p0PositionCS, p1PositionCS, p2PositionCS); + return allOutside; +} + +[UNITY_domain("tri")] +[UNITY_outputcontrolpoints(3)] +[UNITY_outputtopology("triangle_cw")] +[UNITY_partitioning("fractional_odd")] +[UNITY_patchconstantfunc("patchFunc")] +TessellationControlPoint hull(InputPatch patch, uint id: SV_OUTPUTCONTROLPOINTID){ + return patch[id]; +} + + +float EdgeTessellationFactor(float3 p0PositionWS, float2 p0UV, float3 p1PositionWS, float2 p1UV) { + float length = distance(p0PositionWS, p1PositionWS) * _TessBias * 3; + float distanceToCamera = distance(_WorldSpaceCameraPos, (p0PositionWS + p1PositionWS) * 0.5); + + float2 tessUV = (p0UV + p1UV) * 0.5; + + float tessTex = SAMPLE_TEX2D_LOD(_TessTex, float4(tessUV, 0, 0), 0).x; + float factor = length / (distanceToCamera * distanceToCamera); + factor = min(_TessMax, factor); + float multiplier = 1.0; + #ifdef TESS_MID + multiplier = 0.35; + #endif + #ifdef TESS_LOW + multiplier = 0.1; + #endif + return max(_TessMin, factor * tessTex * multiplier); +} + + + +float3 CalculateBezierControlPoint(float3 p0PositionWS, float3 aNormalWS, float3 p1PositionWS, float3 bNormalWS) { + float w = dot(p1PositionWS - p0PositionWS, aNormalWS); + return (p0PositionWS * 2 + p1PositionWS - w * aNormalWS) / 3.0; +} + +void CalculateBezierControlPoints(inout float3 bezierPoints[7], + float3 p0PositionWS, float3 p0NormalWS, float3 p1PositionWS, float3 p1NormalWS, float3 p2PositionWS, float3 p2NormalWS) { + bezierPoints[0] = CalculateBezierControlPoint(p0PositionWS, p0NormalWS, p1PositionWS, p1NormalWS); + bezierPoints[1] = CalculateBezierControlPoint(p1PositionWS, p1NormalWS, p0PositionWS, p0NormalWS); + bezierPoints[2] = CalculateBezierControlPoint(p1PositionWS, p1NormalWS, p2PositionWS, p2NormalWS); + bezierPoints[3] = CalculateBezierControlPoint(p2PositionWS, p2NormalWS, p1PositionWS, p1NormalWS); + bezierPoints[4] = CalculateBezierControlPoint(p2PositionWS, p2NormalWS, p0PositionWS, p0NormalWS); + bezierPoints[5] = CalculateBezierControlPoint(p0PositionWS, p0NormalWS, p2PositionWS, p2NormalWS); + float3 avgBezier = 0; + [unroll] for (int i = 0; i < 6; i++) { + avgBezier += bezierPoints[i]; + } + avgBezier /= 6.0; + float3 avgControl = (p0PositionWS + p1PositionWS + p2PositionWS) / 3.0; + bezierPoints[6] = avgBezier + (avgBezier - avgControl) / 2.0; +} + +TessellationFactors patchFunc(InputPatch patch){ + TessellationFactors f; + if(ShouldClipPatch(patch[0].posCS, patch[1].posCS, patch[2].posCS)){ + f.edge[0] = 0; + f.edge[1] = 0; + f.edge[2] = 0; + f.inside = 0; + } + else{ + f.edge[0] = EdgeTessellationFactor(patch[1].posWS, patch[1].uv0, patch[2].posWS, patch[2].uv0); + f.edge[1] = EdgeTessellationFactor(patch[2].posWS, patch[2].uv0, patch[0].posWS, patch[0].uv0); + f.edge[2] = EdgeTessellationFactor(patch[0].posWS, patch[0].uv0, patch[1].posWS, patch[1].uv0); + f.inside = (f.edge[0] + f.edge[1] + f.edge[2]) / 3.0; + CalculateBezierControlPoints(f.bezierPoints, patch[0].vertex, patch[0].normal, + patch[1].vertex, patch[1].normal, patch[2].vertex, patch[2].normal); + } + + return f; +} + + +float3 PhongProjectedPosition(float3 flatPosition, float3 cornerPosition, float3 normal) { + return flatPosition - dot(flatPosition - cornerPosition, normal) * normal; +} + +float3 BarycentricInterpolate(float3 bary, float3 p0, float3 p1, float3 p2){ + return bary.x * p0 + bary.y * p1 +bary.z * p2; +} + +float3 CalculatePhongPosition(float3 bary, float smoothing, float3 p0Position, float3 p0Normal, + float3 p1Position, float3 p1Normal, float3 p2Position, float3 p2Normal) { + float3 flatPosition = BarycentricInterpolate(bary, p0Position, p1Position, p2Position); + float3 smoothedPosition = + bary.x * PhongProjectedPosition(flatPosition, p0Position, p0Normal) + + bary.y * PhongProjectedPosition(flatPosition, p1Position, p1Normal) + + bary.z * PhongProjectedPosition(flatPosition, p2Position, p2Normal); + return lerp(flatPosition, smoothedPosition, smoothing); +} + +float3 CalculateBezierPosition(float3 bary, float smoothing, float3 bezierPoints[7], + float3 p0PositionWS, float3 p1PositionWS, float3 p2PositionWS) { + float3 flatPositionWS = BarycentricInterpolate(bary, p0PositionWS, p1PositionWS, p2PositionWS); + float3 smoothedPositionWS = + p0PositionWS * (bary.x * bary.x * bary.x) + + p1PositionWS * (bary.y * bary.y * bary.y) + + p2PositionWS * (bary.z * bary.z * bary.z) + + bezierPoints[0] * (3 * bary.x * bary.x * bary.y) + + bezierPoints[1] * (3 * bary.y * bary.y * bary.x) + + bezierPoints[2] * (3 * bary.y * bary.y * bary.z) + + bezierPoints[3] * (3 * bary.z * bary.z * bary.y) + + bezierPoints[4] * (3 * bary.z * bary.z * bary.x) + + bezierPoints[5] * (3 * bary.x * bary.x * bary.z) + + bezierPoints[6] * (6 * bary.x * bary.y * bary.z); + return lerp(flatPositionWS, smoothedPositionWS, smoothing); +} + +#define INTERPOLATE_TRI(param) data.param = patch[0].param * barycentricCoordinates.x + patch[1].param * barycentricCoordinates.y + patch[2].param * barycentricCoordinates.z; + +[UNITY_domain("tri")] +#ifdef SHADOW_CASTER_PASS +v2f +#else +Varyings +#endif +domain(TessellationFactors factors, OutputPatch patch, float3 barycentricCoordinates : SV_DomainLocation){ + VertexData data; + float smoothing = _TessSmooth; + float3 pos = CalculatePhongPosition(barycentricCoordinates, smoothing, + patch[0].vertex, patch[0].normal, + patch[1].vertex, patch[1].normal, + patch[2].vertex, patch[2].normal); + float4 vertex = float4(pos, 1); + data.vertex = vertex; + + INTERPOLATE_TRI(normal); + INTERPOLATE_TRI(tangent); + INTERPOLATE_TRI(uv0); + INTERPOLATE_TRI(uv1); + + return vert(data); +} +#endif \ No newline at end of file diff --git a/Shaders/Hair/KKPHairTess.cginc.meta b/Shaders/Hair/KKPHairTess.cginc.meta new file mode 100644 index 0000000..329d42f --- /dev/null +++ b/Shaders/Hair/KKPHairTess.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 055e8b500dc8438419ccc5a0f4c8c0d1 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Hair/KKPHairVertFrag.cginc b/Shaders/Hair/KKPHairVertFrag.cginc index 9bb6c9e..16d2846 100644 --- a/Shaders/Hair/KKPHairVertFrag.cginc +++ b/Shaders/Hair/KKPHairVertFrag.cginc @@ -4,6 +4,15 @@ Varyings vert (VertexData v) { Varyings o; + +#ifdef TESS_SHADER + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; +#endif + o.posWS = mul(unity_ObjectToWorld, v.vertex); o.posCS = mul(UNITY_MATRIX_VP, o.posWS); o.normalWS = UnityObjectToWorldNormal(v.normal); @@ -38,12 +47,6 @@ Varyings vert (VertexData v) #endif return o; } - - -float3 CreateBinormal (float3 normal, float3 tangent, float binormalSign) { - return cross(normal, tangent.xyz) * - (binormalSign * unity_WorldTransformParams.w); -} float3x3 AngleAxis3x3(float angle, float3 axis) { @@ -64,40 +67,33 @@ float3x3 AngleAxis3x3(float angle, float3 axis) fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target { + + float3 viewDir = normalize(_WorldSpaceCameraPos - i.posWS); float3 worldLight = normalize(_WorldSpaceLightPos0.xyz); //Directional light - - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); float alpha = AlphaClip(i.uv0, mainTex.a); float3 diffuse = GetDiffuse(i.uv0) * mainTex.rgb; float3 ambientShadowExtendAdjust; AmbientShadowAdjust(ambientShadowExtendAdjust); - float2 normalUV = i.uv0 * _NormalMap_ST.xy + _NormalMap_ST.zw; - float3 normal = UnpackScaleNormal(tex2D(_NormalMap, normalUV), _NormalMapScale); - - float3 binormal = CreateBinormal(i.normalWS, i.tanWS.xyz, i.tanWS.w); - normal = normalize( - normal.x * i.tanWS + - normal.y * binormal + - normal.z * i.normalWS - ); - float3 adjustedNormal = normalize(normal); - + float3 adjustedNormal = NormalAdjust(i, GetNormal(i), frontFace); + _NormalMapScale *= _SpecularNormalScale; + float3 specularNormal = NormalAdjust(i, GetNormal(i), frontFace); + float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); float3 adjustedViewDir = frontFace == 1 ? viewDir : -viewDir; float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); - float kkpFres = max(0.1, dot(normal, rotView)); + float kkpFres = max(0.1, dot(adjustedNormal, rotView)); kkpFres = saturate(pow(1-kkpFres, _KKPRimSoft) * _KKPRimIntensity); _KKPRimColor.a *= (_UseKKPRim); - float3 kkpFresCol = kkpFres * _KKPRimColor; - diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse); + float3 kkpFresCol = kkpFres * _KKPRimColor + (1 - kkpFres) * diffuse; float fresnel = max(0.0, dot(viewDir, adjustedNormal)); - float anotherRamp = tex2D(_AnotherRamp, fresnel * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw).x; + float anotherRamp = SAMPLE_TEX2D(_AnotherRamp, fresnel * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw).x; fresnel = 1 - fresnel; fresnel = log2(fresnel); float rimPow = _rimpower * 9.0 + 1.0; @@ -110,20 +106,20 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target KKVertexLight vertexLights[4]; #ifdef VERTEXLIGHT_ON - GetVertexLights(vertexLights, i.posWS); + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); #endif float4 vertexLighting = 0.0; float vertexLightRamp = 1.0; #ifdef VERTEXLIGHT_ON vertexLighting = GetVertexLighting(vertexLights, adjustedNormal); float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; - vertexLightRamp = tex2D(_RampG, vertexLightRampUV).x; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; float3 rampLighting = GetRampLighting(vertexLights, adjustedNormal, vertexLightRamp); vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; #endif float3 halfVector = normalize(viewDir + worldLight); - float specularMesh = max(dot(halfVector, adjustedNormal), 0.0); + float specularMesh = max(dot(halfVector, specularNormal), 0.0); specularMesh = log2(specularMesh); float specularPowerMesh = _SpecularHairPower * 256; specularPowerMesh = specularPowerMesh * specularMesh; @@ -135,7 +131,7 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target #ifdef KKP_EXPENSIVE_RAMP float2 lightRampUV = specularPowerMesh * _RampG_ST.xy + _RampG_ST.zw; - specularPowerMesh = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + specularPowerMesh * (1 - _UseRampForSpecular); + specularPowerMesh = SAMPLE_TEX2D(_RampG, lightRampUV) * _UseRampForSpecular + specularPowerMesh * (1 - _UseRampForSpecular); #endif float3 specularLightColor = _UseLightColorSpecular ? _LightColor0.rgb * _SpecularColor.a: _SpecularColor.rgb * _SpecularColor.a; @@ -145,13 +141,13 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target specularColorMesh.a = specularMask; #ifdef VERTEXLIGHT_ON float3 specularColorVertex = 0; - specularColorMesh += GetVertexSpecularHair(vertexLights, adjustedNormal, viewDir, _SpecularIsHighLightsPow, _SpecularHairPower); + specularColorMesh += GetVertexSpecularHair(vertexLights, specularNormal, viewDir, _SpecularIsHighLightsPow, _SpecularHairPower); #endif float specular = specularColorMesh.a; //Mask float3 specularColor = specularColorMesh.rgb; //Color float lambert = saturate(dot(worldLight, adjustedNormal)) + vertexLighting.a; - float ramp = tex2D(_RampG, lambert * _RampG_ST.xy + _RampG_ST.zw).x; + float ramp = SAMPLE_TEX2D(_RampG, lambert * _RampG_ST.xy + _RampG_ST.zw).x; float bitanFres = dot(viewDir, i.bitanWS); float specularHeight = _SpeclarHeight - 1.0; float3 hairGlossVal; @@ -168,8 +164,8 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target hairGlossVal.y = hairGlossVal.z + 0.00800000038; float4 hairGlossUV = hairGlossVal.xyxz * _HairGloss_ST.xyxy + _HairGloss_ST.zwzw; - float4 hairGloss1 = tex2D(_HairGloss, hairGlossUV.xy); - float4 hairGloss2 = tex2D(_HairGloss, hairGlossUV.zw); + float4 hairGloss1 = SAMPLE_TEX2D(_HairGloss, hairGlossUV.xy); + float4 hairGloss2 = SAMPLE_TEX2D(_HairGloss, hairGlossUV.zw); float hairGloss = (hairGloss1 - hairGloss2) * 0.5f; float4 ambientShadow = 1 - _ambientshadowG.wxyz; @@ -182,13 +178,13 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target finalAmbientShadow = saturate(finalAmbientShadow); float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - finalAmbientShadow = finalAmbientShadow * _ShadowColor.xyz; + finalAmbientShadow = finalAmbientShadow * (_ShadowColor.xyz+1E-06); finalAmbientShadow += finalAmbientShadow; - float3 shadowCol = _ShadowColor - 0.5; + float3 shadowCol = _ShadowColor+1E-06 - 0.5; shadowCol = -shadowCol * 2 + 1; invertFinalAmbientShadow = -shadowCol * invertFinalAmbientShadow + 1; - bool3 shadeCheck = 0.5 < _ShadowColor.xyz; + bool3 shadeCheck = 0.5 < (_ShadowColor.xyz+1E-06); { float3 hlslcc_movcTemp = finalAmbientShadow; hlslcc_movcTemp.x = (shadeCheck.x) ? invertFinalAmbientShadow.x : finalAmbientShadow.x; @@ -196,13 +192,7 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target hlslcc_movcTemp.z = (shadeCheck.z) ? invertFinalAmbientShadow.z : finalAmbientShadow.z; finalAmbientShadow = hlslcc_movcTemp; } - finalAmbientShadow = saturate(finalAmbientShadow); - float minusAmbientShadow = finalAmbientShadow - 1; - minusAmbientShadow = hairGloss * minusAmbientShadow + 1; - shadowCol = diffuse * minusAmbientShadow; - shadowCol *= finalAmbientShadow; - diffuse = diffuse * minusAmbientShadow - shadowCol; - + float shadowAttenuation = saturate(min(ramp, anotherRamp)); float rampAdjust = ramp * 0.5 + 0.5; #ifdef SHADOWS_SCREEN @@ -211,7 +201,17 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target shadowAttenuation *= shadowMap; #endif - float4 detailMask = tex2D(_DetailMask, i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw); + float rimPlace = lerp(lerp(1 - shadowAttenuation, 1, min(_rimReflectMode+1, 1)), shadowAttenuation, max(0, _rimReflectMode)); + diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse * rimPlace); + + finalAmbientShadow = saturate(finalAmbientShadow); + float minusAmbientShadow = finalAmbientShadow - 1; + minusAmbientShadow = hairGloss * minusAmbientShadow + 1; + shadowCol = diffuse * minusAmbientShadow; + shadowCol *= finalAmbientShadow; + diffuse = diffuse * minusAmbientShadow - shadowCol; + + float4 detailMask = SAMPLE_TEX2D(_DetailMask, i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw); float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; _SpecularHairPower *= specularMap; float2 invertDetailGB = 1 - detailMask.gb; @@ -225,7 +225,7 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target float hairGlossMask = hairGloss2.x * rampAdjust * _GlossColor.a; float3 hairGlossColor = hairGlossMask * _GlossColor.rgb * _GlossColor.a; diffuse = hairGlossColor + saturate(1 - hairGlossMask) * diffuse; - float rimVal = invertDetailGB.x * _rimV; + float rimVal = invertDetailGB.x * _rimV * rimPlace; rimVal *= invertDetailGB.y; float3 finalDiffuse = saturate(rimVal * ambientShadowExtendAdjust + diffuse) + _UseMeshSpecular * specularColor; @@ -238,14 +238,20 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target shading = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp)* float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; shading = max(shading, _ambientshadowG.rgb); finalDiffuse *= shading; + + float3 hsl = RGBtoHSL(finalDiffuse); + hsl.x = hsl.x + _ShadowHSV.x; + hsl.y = hsl.y + _ShadowHSV.y; + hsl.z = hsl.z + _ShadowHSV.z; + finalDiffuse = lerp(HSLtoRGB(hsl), finalDiffuse, saturate(shadowMasked + 0.5)); - finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * (1 - _KKPRimAsDiffuse)); + finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * rimPlace * (1 - _KKPRimAsDiffuse)); //Overlay Emission over everything float4 emission = GetEmission(i.uv0); finalDiffuse = finalDiffuse * (1 - emission.a) + (emission.a * emission.rgb); - return float4(finalDiffuse, alpha); + return float4(max(finalDiffuse, 1E-06), alpha); } #endif \ No newline at end of file diff --git a/Shaders/Hair/KKPHairVertFrag.cginc.meta b/Shaders/Hair/KKPHairVertFrag.cginc.meta new file mode 100644 index 0000000..bbb602f --- /dev/null +++ b/Shaders/Hair/KKPHairVertFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 747ea8c2a86457a429252ddd678926a0 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item.meta b/Shaders/Item.meta new file mode 100644 index 0000000..41f78c6 --- /dev/null +++ b/Shaders/Item.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3c4d976291fc65547bcbb3d313842dae +folderAsset: yes +timeCreated: 1705466960 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/KKPItemCoom.cginc b/Shaders/Item/KKPItemCoom.cginc deleted file mode 100644 index 3a7a17b..0000000 --- a/Shaders/Item/KKPItemCoom.cginc +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef KKP_ITEMCOOM_INC -#define KKP_ITEMCOOM_INC - -void GetCumVals(float2 uv, out float mask, out float3 normal){ - float2 liquidUV = uv * _LiquidTiling.zw + _LiquidTiling.xy; - float2 liquidUV2 = liquidUV * _Texture3_ST.xy + _Texture3_ST.zw; - liquidUV = liquidUV * _Texture2_ST.xy + _Texture2_ST.zw; - float4 liquidTex = tex2D(_Texture2, liquidUV); - float liquidValTop = max(saturate(_liquidftop - 1.0) * liquidTex.y, - saturate(_liquidftop) * liquidTex.x); - float2 liquidMaskUV = uv * _liquidmask_ST.xy + _liquidmask_ST.zw; - float4 liquidMaskTex = tex2D(_liquidmask, liquidMaskUV); - float3 liquidMaskVals = max(liquidMaskTex.zzy, liquidMaskTex.yxx); - liquidMaskVals = liquidMaskTex.rgb - liquidMaskVals; - liquidMaskTex.xy = min(liquidMaskTex.yz, liquidMaskTex.xy); - liquidMaskTex.xy = liquidMaskTex.xy * float2(1.11111104, 1.11111104) + float2(-0.111111097, -0.111111097); - liquidValTop = min(liquidValTop, liquidMaskVals.x); - float4 liquidInputVals = float4(_liquidfbot, _liquidbtop, _liquidbbot, _liquidface) + float4(-1.0, -1.0, -1.0, -1.0); - liquidInputVals = saturate(liquidInputVals) * liquidTex.y; - float4 liquidInputVals2 = float4(_liquidfbot, _liquidbtop, _liquidbbot, _liquidface); - liquidInputVals2 = saturate(liquidInputVals2) * liquidTex.x; - float4 liquidValBot = max(liquidInputVals, liquidInputVals2); - float2 liquidBackFLegs = min(liquidMaskVals.yz, liquidValBot.xy); - float2 liquidButtBLegs = min(liquidMaskTex.xy, liquidValBot.zw); - float liquidFinalMask = max(liquidValTop, liquidBackFLegs.x); - liquidFinalMask = max(liquidFinalMask, liquidBackFLegs.y); - liquidFinalMask = max(liquidFinalMask, liquidButtBLegs.x); - liquidFinalMask = max(liquidFinalMask, liquidButtBLegs.y); - - //Normal - float3 liquidNormal = UnpackNormal(tex2D(_Texture3, liquidUV2)); - - mask = liquidFinalMask; - normal = liquidNormal; -} - -#endif \ No newline at end of file diff --git a/Shaders/Item/KKPItemDiffuse.cginc b/Shaders/Item/KKPItemDiffuse.cginc index 3103497..021e540 100644 --- a/Shaders/Item/KKPItemDiffuse.cginc +++ b/Shaders/Item/KKPItemDiffuse.cginc @@ -50,7 +50,6 @@ float3 ShadeAdjust(float3 col){ } - float3 ShadeAdjustItem(float3 col){ float4 u_xlat0; float4 u_xlat1; @@ -97,11 +96,43 @@ float3 ShadeAdjustItem(float3 col){ return u_xlat1.xyz; } +float3 HUEtoRGB(in float H) +{ + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R,G,B)); +} + +float Epsilon = 1e-10; +float3 RGBtoHCV(in float3 RGB) +{ + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0/3.0) : float4(RGB.gb, 0.0, -1.0/3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); +} + +float3 RGBtoHSL(in float3 RGB) +{ + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); +} +float3 HSLtoRGB(in float3 HSL) +{ + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return (RGB - 0.5) * C + HSL.z; +} void AlphaClip(float2 uv, float texAlpha){ //Body alpha mask from outfits float2 alphaUV = uv * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); diff --git a/Shaders/Item/KKPItemDiffuse.cginc.meta b/Shaders/Item/KKPItemDiffuse.cginc.meta new file mode 100644 index 0000000..0e7c320 --- /dev/null +++ b/Shaders/Item/KKPItemDiffuse.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 15a0d414bbdb59e4f92dbc761dc6d5ce +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/KKPItemFrag.cginc b/Shaders/Item/KKPItemFrag.cginc index 2442f4d..2b883ee 100644 --- a/Shaders/Item/KKPItemFrag.cginc +++ b/Shaders/Item/KKPItemFrag.cginc @@ -18,276 +18,294 @@ float3x3 AngleAxis3x3(float angle, float3 axis) t * x * z - s * y, t * y * z + s * x, t * z * z + c ); } - fixed4 frag (Varyings i, int faceDir : VFACE) : SV_Target{ - //Clips based on alpha texture - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); - AlphaClip(i.uv0, mainTex.a); - float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); - float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); - float3 halfDir = normalize(viewDir + worldLightPos); +fixed4 frag (Varyings i, int faceDir : VFACE) : SV_Target{ + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + + AlphaClip(i.uv0, mainTex.a); + + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + float3 halfDir = normalize(viewDir + worldLightPos); - float3 diffuse = mainTex.rgb; - float3 shadingAdjustment = ShadeAdjust(diffuse); - float3 normal = GetNormal(i); - - - - - float liquidFinalMask; - float3 liquidNormal; - GetCumVals(i.uv0, liquidFinalMask, liquidNormal); - - normal = lerp(normal, liquidNormal, liquidFinalMask); - normal = NormalAdjust(i, normal, faceDir); - - float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); - float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); - float3 adjustedViewDir = faceDir == 1 ? viewDir : -viewDir; - float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); - float kkpFres = dot(normal, rotView); - kkpFres = saturate(pow(1-kkpFres, _KKPRimSoft) * _KKPRimIntensity); - _KKPRimColor.a *= (_UseKKPRim); - float3 kkpFresCol = kkpFres * _KKPRimColor; - - diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse); - - KKVertexLight vertexLights[4]; - #ifdef VERTEXLIGHT_ON - GetVertexLights(vertexLights, i.posWS); - #endif - float4 vertexLighting = 0.0; - float vertexLightRamp = 1.0; - #ifdef VERTEXLIGHT_ON - vertexLighting = GetVertexLighting(vertexLights, normal); - float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; - vertexLightRamp = tex2D(_RampG, vertexLightRampUV).x; - float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); - vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; - #endif - - float lambert = saturate(dot(worldLightPos, normal)); - - float3 cumCol = (lambert + 0.5 + vertexLighting.a) * float3(0.149999976, 0.199999988, 0.300000012) + float3(0.850000024, 0.800000012, 0.699999988); - - - - float specular = dot(halfDir, normal); - float fresnel = 1 - max(dot(viewDir, normal), 0.0); - - float shadowAttenuation = 1; - #ifdef SHADOWS_SCREEN - float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; - float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); - shadowAttenuation = saturate(shadowMap.x * 2.0 - 1.0); - #endif - - float shadowAttenLambert = _UseRampForShadows ? shadowAttenuation : 1; - float rampAtten = _UseRampForShadows ? 1 : shadowAttenuation; - - float lightRamp = max(lambert * shadowAttenLambert, vertexLighting.a); - - float2 rampUV = saturate(lightRamp) * _RampG_ST.xy + _RampG_ST.zw; - float ramp = tex2D(_RampG, rampUV) * rampAtten; - - float anotherRampSpecularVertex = 0.0; - #ifdef VERTEXLIGHT_ON - [unroll] - for(int j = 0; j < 4; j++){ - KKVertexLight light = vertexLights[j]; - float3 halfVector = normalize(viewDir + light.dir) * saturate(MaxGrayscale(light.col)); - anotherRampSpecularVertex = max(anotherRampSpecularVertex, dot(halfVector, normal)); - } - #endif - - float2 anotherRampUV = abs(max(specular, anotherRampSpecularVertex)) * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw; - float anotherRamp = tex2D(_AnotherRamp, anotherRampUV); - float finalRamp = anotherRamp - ramp; - - - - specular = log2(max(specular, 0.0)); - - float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailUV); - float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); - lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; - - lineMask.r = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; - - float kkMetalMap = lineMask.r; - lineMask.r *= _UseKKMetal; - - finalRamp = lineMask.r * finalRamp + ramp; - - float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; - - lineMask.rb = 1 - lineMask.rb; - - _SpecularPower *= _UseDetailRAsSpecularMap ? detailMask.x : 1; - - float4 detailMaskAdjust = 1 - detailMask.yxwz; - - float specularNail = max(detailMask.w, _SpecularPowerNail); - float drawnShadow = min(lineMask.b, detailMaskAdjust.x); - drawnShadow = drawnShadow * (1 - shadowExtend) + shadowExtend; - finalRamp *= drawnShadow; - - float specularHeight = _SpeclarHeight - 1.0; - specularHeight *= 0.800000012; - float2 detailSpecularOffset; - detailSpecularOffset.x = dot(i.tanWS, viewDir); - detailSpecularOffset.y = dot(i.bitanWS, viewDir); - float2 detailMaskUV2 = specularHeight * detailSpecularOffset + i.uv0; - detailMaskUV2 = detailMaskUV2 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float drawnSpecular = tex2D(_DetailMask, detailMaskUV2).x; - float drawnSpecularSquared = min(drawnSpecular * drawnSpecular, 1.0); - drawnSpecular = drawnSpecular - drawnSpecularSquared; - drawnSpecular = saturate(drawnSpecular); - drawnSpecular = min(drawnSpecular, _SpecularPower); - drawnSpecular = min(drawnSpecular, finalRamp); - float specularIntensity = dot(_SpecularColor.xyz, float3(0.300000012, 0.589999974, 0.109999999)); //??? - drawnSpecular = min(drawnSpecular, specularIntensity); - - float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; - diffuseShaded = -diffuseShaded * 2 + 1; - - float4 ambientShadow = 1 - _ambientshadowG.wxyz; - float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; - float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; - float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; - bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; - ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; - float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; - finalAmbientShadow = saturate(finalAmbientShadow); - float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - - bool3 compTest = 0.555555582 < shadingAdjustment; - shadingAdjustment *= finalAmbientShadow; - shadingAdjustment *= 1.79999995; - diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; - { - float3 hlslcc_movcTemp = shadingAdjustment; - hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; - hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; - hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; - float3 shadowCol = lerp(1, _ShadowColor.rgb, 1 - saturate(_ShadowColor.a)); - shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); - } - - float shadowExtendAnother = 1 - _ShadowExtendAnother; - lineMask.x = max(lineMask.x, shadowExtendAnother); - float3 shaded = saturate(lineMask.x * shadingAdjustment); - - float3 remappedShading = shaded * 2 - 2; - remappedShading = drawnSpecular * remappedShading + 1; - - float meshSpecular = _SpecularPower * 256; - meshSpecular *= specular; - specular *= 256; - specular = exp2(specular); - - - - float specularVertex = 0.0; - float3 specularVertexCol = 0.0; - #ifdef VERTEXLIGHT_ON - specularVertex = GetVertexSpecularDiffuse(vertexLights, normal, viewDir, _SpecularPower, specularVertexCol); - #endif - - - specular = min(specular, 1); - meshSpecular = exp2(meshSpecular); - #ifdef KKP_EXPENSIVE_RAMP - float2 lightRampUV = meshSpecular * _RampG_ST.xy + _RampG_ST.zw; - meshSpecular = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + meshSpecular * (1 - _UseRampForSpecular); - #endif - meshSpecular += specularVertex; - - meshSpecular *= _SpecularPower * _SpecularColor.w; - meshSpecular = saturate(meshSpecular); - - float specularPower = max(detailMaskAdjust.z, _SpecularPower); - drawnSpecularSquared = min(drawnSpecularSquared, specularPower); - specularNail = min(specularNail, drawnSpecularSquared); - float finalDrawnSpecular = meshSpecular * detailMaskAdjust.y * _notusetexspecular + specularNail; - - drawnSpecularSquared = meshSpecular * _notusetexspecular; - - - float3 specularDiffuse = _SpecularColor.xyz * drawnSpecularSquared + diffuse + specularVertexCol; - float3 specularColor = (finalDrawnSpecular * _SpecularColor.xyz); - - specularColor = diffuse * remappedShading + specularColor; - - diffuse *= shaded; - float3 finalSpecularColor = specularDiffuse - specularColor; - float3 mergedSpecularDiffuse = saturate(_notusetexspecular * finalSpecularColor + specularColor); - float3 shadedSpecular = mergedSpecularDiffuse * shaded; - mergedSpecularDiffuse = -mergedSpecularDiffuse * shaded + mergedSpecularDiffuse; - mergedSpecularDiffuse = finalRamp * mergedSpecularDiffuse + shadedSpecular; - float3 liquidDiffuse = liquidFinalMask * float3(0.300000012, 0.402941108, 0.557352901) + float3(0.5, 0.397058904, 0.242647097); - liquidDiffuse = liquidDiffuse * cumCol + meshSpecular; - - - float fresnelAdjust = saturate(fresnel * 2 - 0.800000012); - fresnel = log2(fresnel); - float3 fresnelLiquid = saturate(liquidDiffuse + fresnelAdjust); - fresnelLiquid -= mergedSpecularDiffuse; - mergedSpecularDiffuse = liquidFinalMask * fresnelLiquid + mergedSpecularDiffuse; - float rimPow = _rimpower * 9 + 1; - rimPow *= fresnel; - rimPow = exp2(rimPow); - float rimMask = detailMaskAdjust.w * 2.77777791 + -1.77777803; - rimPow *= rimMask; - rimPow = min(max(rimPow, 0.0), 0.60000024); - float3 rimCol = rimPow * _SpecularColor.xyz; - rimCol *= _rimV * (1-_UseKKPRim); - - float3 diffuseSpecRim = saturate(rimCol * detailMaskAdjust.x + mergedSpecularDiffuse); - - float drawnLines = 1 - detailMaskAdjust.w; - drawnLines = drawnLines - lineMask.y; - drawnLines = _DetailBLineG * drawnLines + lineMask.y; - - float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; - float3 ambientCol = max(lightCol, _ambientshadowG.xyz); - diffuseSpecRim = diffuseSpecRim * ambientCol; - - float3 invertRemapDiffuse = -diffuse * 0.5 + 1; - - diffuse *= 0.5; - float lineAlpha = _LineColorG.w - 0.5; - lineAlpha = -lineAlpha * 2.0 + 1.0; - invertRemapDiffuse = -lineAlpha * invertRemapDiffuse + 1; - lineAlpha = _LineColorG.w *2; - diffuse *= lineAlpha; - diffuse = 0.5 < _LineColorG.w ? invertRemapDiffuse : diffuse; - diffuse = saturate(diffuse); - diffuse *= lightCol; - - float3 finalDiffuse = drawnShadow * (1 - shaded) + shaded; - finalDiffuse = diffuseSpecRim * finalDiffuse - diffuse; - - float lineWidth = 1 - _linewidthG; - lineWidth = lineWidth * 0.889999986 + 0.00999999978; - lineWidth = log2(lineWidth); - lineWidth *= drawnLines; - lineWidth = exp2(lineWidth); - - finalDiffuse = lineWidth * finalDiffuse + diffuse; - finalDiffuse = GetBlendReflections(finalDiffuse, normal, viewDir, kkMetalMap); - - finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * (1 - _KKPRimAsDiffuse)); - - float4 emission = GetEmission(i.uv0); - finalDiffuse = finalDiffuse * (1 - emission.a) + (emission.a*emission.rgb); - - float alpha = 1; - #ifdef ALPHA_SHADER - alpha = mainTex.a * _Alpha; - #endif - return float4(finalDiffuse, alpha ); - } + float3 diffuse = mainTex.rgb; + float3 shadingAdjustment = ShadeAdjust(diffuse); + float3 normal = GetNormal(i); + _NormalMapScale *= _SpecularNormalScale; + _DetailNormalMapScale *= _SpecularDetailNormalScale; + float3 specularNormal = GetNormal(i); + + float liquidFinalMask; + float3 liquidNormal; + GetCumVals(i.uv0, liquidFinalMask, liquidNormal); + + normal = lerp(normal, liquidNormal, liquidFinalMask); + normal = NormalAdjust(i, normal, faceDir); + specularNormal = NormalAdjust(i, specularNormal, faceDir); + + float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); + float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); + float3 adjustedViewDir = faceDir == 1 ? viewDir : -viewDir; + float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); + float kkpFres = dot(normal, rotView); + kkpFres = saturate(pow(1-kkpFres, _KKPRimSoft) * _KKPRimIntensity); + _KKPRimColor.a *= (_UseKKPRim); + float3 kkpFresCol = kkpFres * _KKPRimColor + (1 - kkpFres) * diffuse; + + diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse); + + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, normal); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + + float lambert = saturate(dot(worldLightPos, normal)); + + float3 cumCol = (lambert + 0.5 + vertexLighting.a) * float3(0.149999976, 0.199999988, 0.300000012) + float3(0.850000024, 0.800000012, 0.699999988); + + + + float specular = dot(halfDir, specularNormal); + float fresnel = 1 - max(dot(viewDir, normal), 0.0); + + float shadowAttenuation = 1; + #ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + shadowAttenuation = saturate(shadowMap.x * 2.0 - 1.0); + #endif + + float shadowAttenLambert = _UseRampForShadows ? shadowAttenuation : 1; + float rampAtten = _UseRampForShadows ? 1 : shadowAttenuation; + + float lightRamp = max(lambert * shadowAttenLambert, vertexLighting.a); + + float2 rampUV = saturate(lightRamp) * _RampG_ST.xy + _RampG_ST.zw; + float ramp = SAMPLE_TEX2D(_RampG, rampUV) * rampAtten; + + float anotherRampSpecularVertex = 0.0; +#ifdef VERTEXLIGHT_ON + [unroll] + for(int j = 0; j < 4; j++){ + KKVertexLight light = vertexLights[j]; + float3 halfVector = normalize(viewDir + light.dir) * saturate(MaxGrayscale(light.col)); + anotherRampSpecularVertex = max(anotherRampSpecularVertex, dot(halfVector, specularNormal)); + } +#endif + + float2 anotherRampUV = abs(max(specular, anotherRampSpecularVertex)) * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw; + float anotherRamp = SAMPLE_TEX2D(_AnotherRamp, anotherRampUV); + + specular = log2(max(specular, 0.0)); + + float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; + + lineMask.r = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; + + float kkMetalMap = lineMask.r; + lineMask.r *= _UseKKMetal; + + float finalRamp = lineMask.r * anotherRamp + (1 - lineMask.r) * ramp; + + float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; + + lineMask.rb = 1 - lineMask.rb; + + _SpecularPower *= _UseDetailRAsSpecularMap ? detailMask.x : 1; + + float4 detailMaskAdjust = 1 - detailMask.yxwz; + + float specularNail = max(detailMask.w, _SpecularPowerNail); + float drawnShadow = min(lineMask.b, detailMaskAdjust.x); + drawnShadow = drawnShadow * (1 - shadowExtend) + shadowExtend; + finalRamp *= drawnShadow; + + float rimPlace = lerp(lerp(1 - finalRamp, 1, min(_rimReflectMode+1, 1)), finalRamp, max(0, _rimReflectMode)); + diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse * rimPlace); + + float specularHeight = _SpeclarHeight - 1.0; + specularHeight *= 0.800000012; + float2 detailSpecularOffset; + detailSpecularOffset.x = dot(i.tanWS, viewDir); + detailSpecularOffset.y = dot(i.bitanWS, viewDir); + float2 detailMaskUV2 = specularHeight * detailSpecularOffset + i.uv0; + detailMaskUV2 = detailMaskUV2 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float drawnSpecular = SAMPLE_TEX2D(_DetailMask, detailMaskUV2).x; + float drawnSpecularSquared = min(drawnSpecular * drawnSpecular, 1.0); + drawnSpecular = drawnSpecular - drawnSpecularSquared; + drawnSpecular = saturate(drawnSpecular); + drawnSpecular = min(drawnSpecular, _SpecularPower); + drawnSpecular = min(drawnSpecular, finalRamp); + float specularIntensity = dot(_SpecularColor.xyz, float3(0.300000012, 0.589999974, 0.109999999)); //??? + drawnSpecular = min(drawnSpecular, specularIntensity); + + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; + diffuseShaded = -diffuseShaded * 2 + 1; + + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; + { + float3 hlslcc_movcTemp = shadingAdjustment; + hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; + hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; + hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; + float3 shadowCol = lerp(1, _ShadowColor.rgb+1E-06, 1 - saturate(_ShadowColor.a+1E-06)); + shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); + } + + float shadowExtendAnother = 1 - _ShadowExtendAnother; + lineMask.x = max(lineMask.x, shadowExtendAnother); + float3 shaded = saturate(lineMask.x * shadingAdjustment); + + float3 remappedShading = shaded * 2 - 2; + remappedShading = drawnSpecular * remappedShading + 1; + + float meshSpecular = _SpecularPower * 256; + meshSpecular *= specular; + specular *= 256; + specular = exp2(specular); + + + + float specularVertex = 0.0; + float3 specularVertexCol = 0.0; +#ifdef VERTEXLIGHT_ON + specularVertex = GetVertexSpecularDiffuse(vertexLights, specularNormal, viewDir, _SpecularPower, specularVertexCol); +#endif + + + specular = min(specular, 1); + meshSpecular = exp2(meshSpecular); +#ifdef KKP_EXPENSIVE_RAMP + float2 lightRampUV = meshSpecular * _RampG_ST.xy + _RampG_ST.zw; + meshSpecular = SAMPLE_TEX2D(_RampG, lightRampUV) * _UseRampForSpecular + meshSpecular * (1 - _UseRampForSpecular); +#endif + meshSpecular += specularVertex; + + meshSpecular *= _SpecularPower * _SpecularColor.w; + meshSpecular = saturate(meshSpecular); + + float specularPower = max(detailMaskAdjust.z, _SpecularPower); + drawnSpecularSquared = min(drawnSpecularSquared, specularPower); + specularNail = min(specularNail, drawnSpecularSquared); + float finalDrawnSpecular = meshSpecular * detailMaskAdjust.y * _notusetexspecular + specularNail; + + drawnSpecularSquared = meshSpecular * _notusetexspecular; + + + float3 specularDiffuse = _SpecularColor.xyz * drawnSpecularSquared + diffuse + specularVertexCol; + float3 specularColor = (finalDrawnSpecular * _SpecularColor.xyz); + + specularColor = diffuse * remappedShading + specularColor; + + diffuse *= shaded; + float3 finalSpecularColor = specularDiffuse - specularColor; + float3 mergedSpecularDiffuse = saturate(_notusetexspecular * finalSpecularColor + specularColor); + float3 shadedSpecular = mergedSpecularDiffuse * shaded; + mergedSpecularDiffuse = -mergedSpecularDiffuse * shaded + mergedSpecularDiffuse; + mergedSpecularDiffuse = finalRamp * mergedSpecularDiffuse + shadedSpecular; + float3 liquidDiffuse = liquidFinalMask * float3(0.300000012, 0.402941108, 0.557352901) + float3(0.5, 0.397058904, 0.242647097); + liquidDiffuse = liquidDiffuse * cumCol + meshSpecular; + + + float fresnelAdjust = saturate(fresnel * 2 - 0.800000012); + fresnel = log2(fresnel); + float3 fresnelLiquid = saturate(liquidDiffuse + fresnelAdjust); + fresnelLiquid -= mergedSpecularDiffuse; + mergedSpecularDiffuse = liquidFinalMask * fresnelLiquid + mergedSpecularDiffuse; + float rimPow = _rimpower * 9 + 1; + rimPow *= fresnel; + rimPow = exp2(rimPow); + float rimMask = detailMaskAdjust.w * 2.77777791 + -1.77777803; + rimPow *= rimMask; + rimPow = min(max(rimPow, 0.0), 0.60000024); + float3 rimCol = rimPow * _SpecularColor.xyz; + rimCol *= _rimV * rimPlace * (1-_UseKKPRim); + + float3 diffuseSpecRim = saturate(rimCol * detailMaskAdjust.x + mergedSpecularDiffuse); + + float drawnLines = 1 - detailMaskAdjust.w; + drawnLines = drawnLines - lineMask.y; + drawnLines = _DetailBLineG * drawnLines + lineMask.y; + + float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + float3 ambientCol = max(lightCol, _ambientshadowG.xyz); + diffuseSpecRim = diffuseSpecRim * ambientCol; + + float3 invertRemapDiffuse = -diffuse * 0.5 + 1; + + diffuse *= 0.5; + float lineAlpha = _LineColorG.w - 0.5; + lineAlpha = -lineAlpha * 2.0 + 1.0; + invertRemapDiffuse = -lineAlpha * invertRemapDiffuse + 1; + lineAlpha = _LineColorG.w *2; + diffuse *= lineAlpha; + diffuse = 0.5 < _LineColorG.w ? invertRemapDiffuse : diffuse; + diffuse = saturate(diffuse); + diffuse *= lightCol; + + float3 finalDiffuse = drawnShadow * (1 - shaded) + shaded; + finalDiffuse = diffuseSpecRim * finalDiffuse - diffuse; + + float lineWidth = 1 - _linewidthG; + lineWidth = lineWidth * 0.889999986 + 0.00999999978; + lineWidth = log2(lineWidth); + lineWidth *= drawnLines; + lineWidth = exp2(lineWidth); + + finalDiffuse = lineWidth * finalDiffuse + diffuse; + + float3 hsl = RGBtoHSL(finalDiffuse); + hsl.x = hsl.x + _ShadowHSV.x; + hsl.y = hsl.y + _ShadowHSV.y; + hsl.z = hsl.z + _ShadowHSV.z; + finalDiffuse = lerp(HSLtoRGB(hsl), finalDiffuse, saturate(finalRamp + 0.5)); + + finalDiffuse = GetBlendReflections(i, max(finalDiffuse, 1E-06), normal, viewDir, kkMetalMap, finalRamp); + + finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * rimPlace * (1 - _KKPRimAsDiffuse)); + + float4 emission = GetEmission(i.uv0); + finalDiffuse = finalDiffuse * (1 - emission.a) + (emission.a*emission.rgb); + + float alpha = 1; + +#ifdef ALPHA_SHADER + float2 maskUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float alphaMask = SAMPLE_TEX2D(_AlphaMask, maskUV).r; + + alphaMask = 1 - (1 - (alphaMask - _Cutoff + 0.0001) / (1.0001 - _Cutoff)) * floor(_AlphaOptionCutoff/2.0); + alpha *= alphaMask * mainTex.a * _Alpha; + + if (alpha <= 0) discard; +#endif + + return float4(max(finalDiffuse, 1E-06), alpha); +} #endif \ No newline at end of file diff --git a/Shaders/Item/KKPItemFrag.cginc.meta b/Shaders/Item/KKPItemFrag.cginc.meta new file mode 100644 index 0000000..b8cf8cf --- /dev/null +++ b/Shaders/Item/KKPItemFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2a4be7b8d0bba564cb9bef8ede7cbfef +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/KKPItemInput.cginc b/Shaders/Item/KKPItemInput.cginc index 255e8c7..e5cd662 100644 --- a/Shaders/Item/KKPItemInput.cginc +++ b/Shaders/Item/KKPItemInput.cginc @@ -1,5 +1,8 @@ #ifndef KKP_ITEM_INPUT #define KKP_ITEM_INPUT + +#include "../KKPDeclarations.cginc" + struct VertexData { float4 vertex : POSITION; @@ -21,13 +24,12 @@ float3 bitanWS : TEXCOORD4; }; - float4 _CustomAmbient; bool _UseRampForLights; bool _UseRampForSpecular; bool _UseRampForShadows; bool _UseLightColorSpecular; - bool _AlphaOptionCutoff; + int _AlphaOptionCutoff; bool _OutlineOn; bool _UseDetailRAsSpecularMap; bool _UseKKPRim; @@ -39,7 +41,6 @@ float4 _OutlineColor; - float4 _KKPRimColor; float _KKPRimSoft; float _KKPRimIntensity; @@ -48,22 +49,20 @@ float _KKPRimRotateY; //Input Textures - sampler2D _MainTex; - sampler2D _AlphaMask; - sampler2D _NormalMap; - sampler2D _NormalMapDetail; - sampler2D _liquidmask; - sampler2D _Texture2; //Liquid Tex - sampler2D _Texture3; //Liquid Normal - sampler2D _DetailMask; - sampler2D _NormalMask; - sampler2D _AnotherRamp; - - sampler2D _RampG; - sampler2D _LineMask; - - sampler2D _ColorMask; - + DECLARE_TEX2D(_MainTex); + DECLARE_TEX2D(_AlphaMask); + DECLARE_TEX2D(_NormalMap); + DECLARE_TEX2D_NOSAMPLER(_NormalMapDetail); + DECLARE_TEX2D_NOSAMPLER(_liquidmask); + DECLARE_TEX2D(_Texture2); //Liquid Tex + DECLARE_TEX2D_NOSAMPLER(_Texture3); //Liquid Normal + DECLARE_TEX2D(_ColorMask); + DECLARE_TEX2D_NOSAMPLER(_LineMask); + DECLARE_TEX2D(_DetailMask); + DECLARE_TEX2D(_NormalMask); + DECLARE_TEX2D(_AnotherRamp); + DECLARE_TEX2D(_RampG); + //UV Offsets float4 _MainTex_ST; float4 _AlphaMask_ST; @@ -88,6 +87,9 @@ float _rimpower; float _rimV; float4 _SpecularColor; + float4 _ShadowHSV; + float _SpecularNormalScale; + float _SpecularDetailNormalScale; float _SpeclarHeight; float _SpecularPower; float _SpecularPowerNail; @@ -106,9 +108,45 @@ float _DetailBLineG; float4 _TimeEditor; + + float _DisablePointLights; + float _AdjustBackfaceNormals; + float _rimReflectMode; + +#ifdef STUDIO_SHADER + float _ambientshadowOFF; + float _EmissionPower; +#ifdef ALPHA_SHADER + float _alpha; + float _AlphaOptionZWrite; +#endif + + DECLARE_TEX2D(_PatternMask1); + DECLARE_TEX2D(_PatternMask2); + DECLARE_TEX2D(_PatternMask3); + float4 _PatternMask1_ST; + float4 _PatternMask2_ST; + float4 _PatternMask3_ST; + float4 _Patternuv1; + float4 _Patternuv2; + float4 _Patternuv3; + float _patternrotator1; + float _patternrotator2; + float _patternrotator3; + float _patternclamp1; + float _patternclamp2; + float _patternclamp3; + + float4 _Color1_2; + float4 _Color2_2; + float4 _Color3_2; +#endif + #ifndef DEFINED_CLOCK -#define DEFINED_CLOCK - float4 _Clock; + #ifndef STUDIO_SHADER + #define DEFINED_CLOCK + float4 _Clock; + #endif #endif float4 _Color; @@ -117,11 +155,11 @@ float _AnotherRampFull; float _LineWidthS; float _Alpha; + //Global light params set by KK float4 _LineColorG; float _linewidthG; float4 _ambientshadowG; float _FaceShadowG; float _FaceNormalG; - #endif \ No newline at end of file diff --git a/Shaders/Item/KKPItemInput.cginc.meta b/Shaders/Item/KKPItemInput.cginc.meta new file mode 100644 index 0000000..8d85428 --- /dev/null +++ b/Shaders/Item/KKPItemInput.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cc120e05c79663843baa0ff22229a010 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/KKPItemItemFrag.cginc b/Shaders/Item/KKPItemItemFrag.cginc new file mode 100644 index 0000000..21e8bfa --- /dev/null +++ b/Shaders/Item/KKPItemItemFrag.cginc @@ -0,0 +1,303 @@ +float3 AmbientShadowAdjust() { + float4 u_xlat5; + float4 u_xlat6; + float u_xlat30; + bool u_xlatb30; + float u_xlat31; + + u_xlatb30 = _ambientshadowG.y>=_ambientshadowG.z; + u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); + u_xlat5.xy = _ambientshadowG.yz; + u_xlat5.z = float(0.0); + u_xlat5.w = float(-0.333333343); + u_xlat6.xy = _ambientshadowG.zy; + u_xlat6.z = float(-1.0); + u_xlat6.w = float(0.666666687); + u_xlat5 = u_xlat5 + (-u_xlat6); + u_xlat5 = (u_xlat30) * u_xlat5.xywz + u_xlat6.xywz; + u_xlatb30 = _ambientshadowG.x>=u_xlat5.x; + u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); + u_xlat6.z = u_xlat5.w; + u_xlat5.w = _ambientshadowG.x; + u_xlat6.xyw = u_xlat5.wyx; + u_xlat6 = (-u_xlat5) + u_xlat6; + u_xlat5 = (u_xlat30) * u_xlat6 + u_xlat5; + u_xlat30 = min(u_xlat5.y, u_xlat5.w); + u_xlat30 = (-u_xlat30) + u_xlat5.x; + u_xlat30 = u_xlat30 * 6.0 + 1.00000001e-10; + u_xlat31 = (-u_xlat5.y) + u_xlat5.w; + u_xlat30 = u_xlat31 / u_xlat30; + u_xlat30 = u_xlat30 + u_xlat5.z; + u_xlat5.xyz = abs((u_xlat30)) + float3(0.0, -0.333333343, 0.333333343); + u_xlat5.xyz = frac(u_xlat5.xyz); + u_xlat5.xyz = (-u_xlat5.xyz) * float3(2.0, 2.0, 2.0) + float3(1.0, 1.0, 1.0); + u_xlat5.xyz = abs(u_xlat5.xyz) * float3(3.0, 3.0, 3.0) + float3(-1.0, -1.0, -1.0); + u_xlat5.xyz = clamp(u_xlat5.xyz, 0.0, 1.0); + u_xlat5.xyz = u_xlat5.xyz * float3(0.400000006, 0.400000006, 0.400000006) + float3(0.300000012, 0.300000012, 0.300000012); + return u_xlat5.xyz; +} + +float3x3 AngleAxis3x3(float angle, float3 axis) { + float c, s; + sincos(angle, s, c); + + float t = 1 - c; + float x = axis.x; + float y = axis.y; + float z = axis.z; + + return float3x3( + t * x * x + c, t * x * y - s * z, t * x * z + s * y, + t * x * y + s * z, t * y * y + c, t * y * z - s * x, + t * x * z - s * y, t * y * z + s * x, t * z * z + c + ); +} + +fixed4 frag (Varyings i, int faceDir : VFACE) : SV_Target { + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, mainTex.a); + + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + float3 halfDir = normalize(viewDir + worldLightPos); + + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); + float3 color; + color = colorMask.r * (_Color.rgb - 1) + 1; + color = colorMask.g * (_Color2.rgb - color) + color; + color = colorMask.b * (_Color3.rgb - color) + color; + float3 diffuse = mainTex * color; + + float3 normal = NormalAdjust(i, GetNormal(i), faceDir); + _NormalMapScale *= _SpecularNormalScale; + _DetailNormalMapScale *= _SpecularDetailNormalScale; + float3 specularNormal = NormalAdjust(i, GetNormal(i), faceDir); + + float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); + float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); + float3 adjustedViewDir = faceDir == 1 ? viewDir : -viewDir; + float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); + float kkpFres = dot(normal, rotView); + kkpFres = saturate(pow(1-kkpFres, _KKPRimSoft) * _KKPRimIntensity); + _KKPRimColor.a *= (_UseKKPRim); + float3 kkpFresCol = kkpFres * _KKPRimColor + (1 - kkpFres) * diffuse; + + //Apparently can rotate? + float time = _TimeEditor.y + _Time.y; + time *= _Clock.z * _Clock.w; + float sinTime = sin(time); + float cosTime = cos(time); + float3 rotVal = float3(-sinTime, cosTime, sinTime); + float2 detailUVAdjust = i.uv0 - _Clock.xy; + float2 rotatedDetailUV; + rotatedDetailUV.x = dot(detailUVAdjust, rotVal.yz); + rotatedDetailUV.y = dot(detailUVAdjust, rotVal.xy); + rotatedDetailUV += _Clock.xy; + rotatedDetailUV = rotatedDetailUV * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMaskRot = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, rotatedDetailUV); + + diffuse = lineMaskRot.b * -diffuse + diffuse; + float3 shadingAdjustment = ShadeAdjustItem(diffuse); + + float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; + + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; + diffuseShaded = -diffuseShaded * 2 + 1; + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; + { + float3 hlslcc_movcTemp = shadingAdjustment; + hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; + hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; + hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; + + #ifdef ALPHA_SHADER + shadingAdjustment = saturate(hlslcc_movcTemp); + #else + float3 shadowCol = lerp(1, _ShadowColor.rgb+1E-06, 1 - saturate(_ShadowColor.a+1E-06)); + shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); + #endif + } + float shadowExtendAnother = 1 - _ShadowExtendAnother; + float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; + + float kkMetalMap = kkMetal; + kkMetal *= _UseKKMetal; + + shadowExtendAnother -= kkMetal; + shadowExtendAnother += 1; + shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; + + float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; + shadingAdjustment = -shadingAdjustment * shadowExtendAnother + 1; + float3 diffuseShadow = diffuse * shadowExtendShaded; + float3 diffuseShadowBlended = -shadowExtendShaded * diffuse + diffuse; + + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, normal); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + float lambert = dot(_WorldSpaceLightPos0.xyz, normal); + lambert = max(lambert, vertexLighting.a); + float2 rampUV = lambert * _RampG_ST.xy + _RampG_ST.zw; + float ramp = SAMPLE_TEX2D(_RampG, rampUV); + + float fresnel = max(dot(normal, viewDir), 0.0); + fresnel = log2(1 - fresnel); + + + float specular = dot(specularNormal, halfDir); + specular = max(specular, 0.0); + float anotherRampSpecularVertex = 0.0; +#ifdef VERTEXLIGHT_ON + [unroll] + for(int j = 0; j < 4; j++){ + KKVertexLight light = vertexLights[j]; + float3 halfVector = normalize(viewDir + light.dir) * saturate(MaxGrayscale(light.col)); + anotherRampSpecularVertex = max(anotherRampSpecularVertex, dot(halfVector, specularNormal)); + } +#endif + float2 anotherRampUV = max(specular, anotherRampSpecularVertex) * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw; + float anotherRamp = SAMPLE_TEX2D(_AnotherRamp, anotherRampUV); + specular = log2(specular); + anotherRamp -= ramp; + float finalRamp = kkMetal * anotherRamp + ramp; + + #ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + float shadowAttenuation = saturate(shadowMap.x * 2.0 - 1.0); + finalRamp *= shadowAttenuation; + #endif + + float rimPlace = lerp(lerp(1 - finalRamp, 1, min(_rimReflectMode+1, 1)), finalRamp, max(0, _rimReflectMode)); + diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse * rimPlace); + + diffuseShadow = finalRamp * diffuseShadowBlended + diffuseShadow; + + float specularHeight = _SpeclarHeight - 1.0; + specularHeight *= 0.800000012; + float2 detailSpecularOffset; + detailSpecularOffset.x = dot(i.tanWS, viewDir); + detailSpecularOffset.y = dot(i.bitanWS, viewDir); + float2 detailMaskUV2 = specularHeight * detailSpecularOffset + i.uv0; + detailMaskUV2 = detailMaskUV2 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float drawnSpecular = SAMPLE_TEX2D(_DetailMask, detailMaskUV2).x; + float drawnSpecularSquared = min(drawnSpecular * drawnSpecular, 1.0); + + _SpecularPower *= _UseDetailRAsSpecularMap ? detailMask.x : 1; + + float specularPower = _SpecularPower * 256.0; + specular *= specularPower; + specular = exp2(specular) * 5.0 - 4.0; + drawnSpecular = saturate(specular * _SpecularPower + drawnSpecularSquared); +#ifdef KKP_EXPENSIVE_RAMP + float2 lightRampUV = specular * _RampG_ST.xy + _RampG_ST.zw; + specular = SAMPLE_TEX2D(_RampG, lightRampUV) * _UseRampForSpecular + specular * (1 - _UseRampForSpecular); +#endif + specular = saturate(specular * _SpecularPower); + specular = specular - drawnSpecular; + specular = _notusetexspecular * specular + drawnSpecular; + float specularVertex = 0.0; + float3 specularVertexCol = 0.0; +#ifdef VERTEXLIGHT_ON + specularVertex = GetVertexSpecularDiffuse(vertexLights, specularNormal, viewDir, _SpecularPower, specularVertexCol); +#endif + float3 specularCol = saturate(specular) * _SpecularColor.rgb + saturate(specularVertex) * specularVertexCol * _notusetexspecular; + specularCol *= _SpecularColor.a; + + float3 ambientShadowAdjust2 = AmbientShadowAdjust(); + + detailMask.rg = 1 - detailMask.bg; + + float rimPow = _rimpower * 9.0 + 1.0; + rimPow = rimPow * fresnel; + float rim = saturate(exp2(rimPow) * 2.5 - 0.5) * _rimV * rimPlace; + float rimMask = detailMask.x * 9.99999809 + -8.99999809; + rim *= rimMask; + + ambientShadowAdjust2 *= rim; + ambientShadowAdjust2 *= detailMask.g; + ambientShadowAdjust2 = min(max(ambientShadowAdjust2, 0.0), 0.5); + diffuseShadow += ambientShadowAdjust2; + + float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + float3 ambientCol = max(lightCol, _ambientshadowG.xyz); + diffuseShadow = diffuseShadow * ambientCol; + float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; + float drawnShadow = detailMask.y * (1 - shadowExtend) + shadowExtend; + + float detailLineShadow = 1 - detailMask.x; + detailLineShadow -= lineMask.y; + detailLineShadow = _DetailBLineG * detailLineShadow + lineMask.y; + + shadingAdjustment = drawnShadow * shadingAdjustment + shadowExtendShaded; + shadingAdjustment *= diffuseShadow; + + diffuse = diffuse * _LineColorG; + float3 lineCol = -diffuse * shadowExtendShaded + 1; + diffuse *= shadowExtendShaded; + + float lineAlpha = _LineColorG.w - 0.5; + lineAlpha = -lineAlpha * 2.0 + 1.0; + lineCol = -lineAlpha * lineCol + 1; + lineAlpha = _LineColorG.w *2; + diffuse *= lineAlpha; + diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; + diffuse = saturate(diffuse); + diffuse = -shadingAdjustment + diffuse; + + float3 finalDiffuse = detailLineShadow * diffuse + shadingAdjustment; + finalDiffuse += specularCol; + + float3 hsl = RGBtoHSL(finalDiffuse); + hsl.x = hsl.x + _ShadowHSV.x; + hsl.y = hsl.y + _ShadowHSV.y; + hsl.z = hsl.z + _ShadowHSV.z; + finalDiffuse = lerp(HSLtoRGB(hsl), finalDiffuse, saturate(finalRamp + 0.5)); + + finalDiffuse = GetBlendReflections(i, max(finalDiffuse, 1E-06), normal, viewDir, kkMetalMap, finalRamp); + + finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * rimPlace * (1 - _KKPRimAsDiffuse)); + + float4 emission = GetEmission(i.uv0); + finalDiffuse = finalDiffuse * (1 - emission.a) + (emission.a*emission.rgb); + + float alpha = 1; + #ifdef ALPHA_SHADER + float2 maskUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float alphaMask = SAMPLE_TEX2D(_AlphaMask, maskUV).r; + alphaMask = 1 - (1 - (alphaMask - _Cutoff + 0.0001) / (1.0001 - _Cutoff)) * floor(_AlphaOptionCutoff/2.0); + alpha = mainTex.a * _Alpha * alphaMask; + + if (alpha <= 0) discard; + #endif + + return float4(max(finalDiffuse, 1E-06), alpha); +} \ No newline at end of file diff --git a/Shaders/Item/KKPItemItemFrag.cginc.meta b/Shaders/Item/KKPItemItemFrag.cginc.meta new file mode 100644 index 0000000..4e0178c --- /dev/null +++ b/Shaders/Item/KKPItemItemFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b1151db56d656864a9bd46b955b5414a +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/KKPItemNormals.cginc b/Shaders/Item/KKPItemNormals.cginc index 37086e8..8128ead 100644 --- a/Shaders/Item/KKPItemNormals.cginc +++ b/Shaders/Item/KKPItemNormals.cginc @@ -4,9 +4,11 @@ float3 GetNormal(Varyings i){ //Normals float2 detailNormalUV = i.uv0 * _NormalMapDetail_ST.xy + _NormalMapDetail_ST.zw; - float3 detailNormal = UnpackScaleNormal(tex2D(_NormalMapDetail, detailNormalUV), _DetailNormalMapScale); + float4 packedNormalDetail = SAMPLE_TEX2D_SAMPLER(_NormalMapDetail, _NormalMap, detailNormalUV); + float3 detailNormal = UnpackScaleNormal(packedNormalDetail, _DetailNormalMapScale); float2 normalUV = i.uv0 * _NormalMap_ST.xy + _NormalMap_ST.zw; - float3 normalMap = UnpackScaleNormal(tex2D(_NormalMap, normalUV), _NormalMapScale); + float4 packedNormal = SAMPLE_TEX2D(_NormalMap, normalUV); + float3 normalMap = UnpackScaleNormal(packedNormal, _NormalMapScale); float3 mergedNormals = BlendNormals(normalMap, detailNormal); return mergedNormals; } @@ -29,9 +31,8 @@ float3 NormalAdjust(Varyings i, float3 finalCombinedNormal, int faceDir){ ); //This give some items correct shading on backfaces but messes up mirror shading - //adjustedNormal.z *= faceDir <= 0 ? -1 : 1; - - return normal; + int adjust = int(floor(_AdjustBackfaceNormals)); + return adjust ? normal * (faceDir <= 0 ? -1 : 1) : normal; } #endif \ No newline at end of file diff --git a/Shaders/Item/KKPItemNormals.cginc.meta b/Shaders/Item/KKPItemNormals.cginc.meta new file mode 100644 index 0000000..84f796a --- /dev/null +++ b/Shaders/Item/KKPItemNormals.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 266c6fb2d83942b4f89f1111e12fa116 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/KKPItemTess.cginc b/Shaders/Item/KKPItemTess.cginc index c2ede32..702ee9e 100644 --- a/Shaders/Item/KKPItemTess.cginc +++ b/Shaders/Item/KKPItemTess.cginc @@ -35,15 +35,13 @@ TessellationControlPoint TessVert(VertexData v){ return p; } -sampler2D _TessTex; +DECLARE_TEX2D(_TessTex); float _TessMax; float _TessMin; float _TessBias; float _TessSmooth; float _Tolerance; - - bool ShouldBackFaceCull(float4 p0PositionCS, float4 p1PositionCS, float4 p2PositionCS) { float3 point0 = p0PositionCS.xyz / p0PositionCS.w; float3 point1 = p1PositionCS.xyz / p1PositionCS.w; @@ -88,7 +86,7 @@ float EdgeTessellationFactor(float3 p0PositionWS, float2 p0UV, float3 p1Position float length = distance(p0PositionWS, p1PositionWS) * _TessBias * 3; float distanceToCamera = distance(_WorldSpaceCameraPos, (p0PositionWS + p1PositionWS) * 0.5); - float tessTex = tex2Dlod(_TessTex, float4((p0UV + p1UV) * 0.5, 0, 0)).x; + float tessTex = SAMPLE_TEX2D_LOD(_TessTex, float4((p0UV + p1UV) * 0.5, 0, 0), 0).x; float factor = length / (distanceToCamera * distanceToCamera); factor = min(_TessMax, factor); float multiplier = 1.0; @@ -101,8 +99,6 @@ float EdgeTessellationFactor(float3 p0PositionWS, float2 p0UV, float3 p1Position return max(_TessMin, factor * tessTex * multiplier); } - - float3 CalculateBezierControlPoint(float3 p0PositionWS, float3 aNormalWS, float3 p1PositionWS, float3 bNormalWS) { float w = dot(p1PositionWS - p0PositionWS, aNormalWS); return (p0PositionWS * 2 + p1PositionWS - w * aNormalWS) / 3.0; @@ -145,7 +141,6 @@ TessellationFactors patchFunc(InputPatch patch){ return f; } - float3 PhongProjectedPosition(float3 flatPosition, float3 cornerPosition, float3 normal) { return flatPosition - dot(flatPosition - cornerPosition, normal) * normal; } @@ -183,28 +178,13 @@ float3 CalculateBezierPosition(float3 bary, float smoothing, float3 bezierPoints #define INTERPOLATE_TRI(param) data.param = patch[0].param * barycentricCoordinates.x + patch[1].param * barycentricCoordinates.y + patch[2].param * barycentricCoordinates.z; -#ifdef SHADOW_CASTER_PASS [UNITY_domain("tri")] -v2f domain(TessellationFactors factors, OutputPatch patch, float3 barycentricCoordinates : SV_DomainLocation){ - VertexData data; - float smoothing = _TessSmooth; - float3 pos = CalculatePhongPosition(barycentricCoordinates, smoothing, - patch[0].vertex, patch[0].normal, - patch[1].vertex, patch[1].normal, - patch[2].vertex, patch[2].normal); - float4 vertex = float4(pos, 1); - data.vertex = vertex; - - - INTERPOLATE_TRI(normal); - INTERPOLATE_TRI(tangent); - INTERPOLATE_TRI(uv0); - - return vert(data); -} +#ifdef SHADOW_CASTER_PASS +v2f #else -[UNITY_domain("tri")] -Varyings domain(TessellationFactors factors, OutputPatch patch, float3 barycentricCoordinates : SV_DomainLocation){ +Varyings +#endif +domain(TessellationFactors factors, OutputPatch patch, float3 barycentricCoordinates : SV_DomainLocation){ VertexData data; float smoothing = _TessSmooth; float3 pos = CalculatePhongPosition(barycentricCoordinates, smoothing, @@ -214,16 +194,10 @@ Varyings domain(TessellationFactors factors, OutputPatch=_ambientshadowG.z; + u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); + u_xlat5.xy = _ambientshadowG.yz; + u_xlat5.z = float(0.0); + u_xlat5.w = float(-0.333333343); + u_xlat6.xy = _ambientshadowG.zy; + u_xlat6.z = float(-1.0); + u_xlat6.w = float(0.666666687); + u_xlat5 = u_xlat5 + (-u_xlat6); + u_xlat5 = (u_xlat30) * u_xlat5.xywz + u_xlat6.xywz; + u_xlatb30 = _ambientshadowG.x>=u_xlat5.x; + u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); + u_xlat6.z = u_xlat5.w; + u_xlat5.w = _ambientshadowG.x; + u_xlat6.xyw = u_xlat5.wyx; + u_xlat6 = (-u_xlat5) + u_xlat6; + u_xlat5 = (u_xlat30) * u_xlat6 + u_xlat5; + u_xlat30 = min(u_xlat5.y, u_xlat5.w); + u_xlat30 = (-u_xlat30) + u_xlat5.x; + u_xlat30 = u_xlat30 * 6.0 + 1.00000001e-10; + u_xlat31 = (-u_xlat5.y) + u_xlat5.w; + u_xlat30 = u_xlat31 / u_xlat30; + u_xlat30 = u_xlat30 + u_xlat5.z; + u_xlat5.xyz = abs((u_xlat30)) + float3(0.0, -0.333333343, 0.333333343); + u_xlat5.xyz = frac(u_xlat5.xyz); + u_xlat5.xyz = (-u_xlat5.xyz) * float3(2.0, 2.0, 2.0) + float3(1.0, 1.0, 1.0); + u_xlat5.xyz = abs(u_xlat5.xyz) * float3(3.0, 3.0, 3.0) + float3(-1.0, -1.0, -1.0); + u_xlat5.xyz = clamp(u_xlat5.xyz, 0.0, 1.0); + u_xlat5.xyz = u_xlat5.xyz * float3(0.400000006, 0.400000006, 0.400000006) + float3(0.300000012, 0.300000012, 0.300000012); + return u_xlat5.xyz; +} + +float3x3 AngleAxis3x3(float angle, float3 axis) { + float c, s; + sincos(angle, s, c); + + float t = 1 - c; + float x = axis.x; + float y = axis.y; + float z = axis.z; + + return float3x3( + t * x * x + c, t * x * y - s * z, t * x * z + s * y, + t * x * y + s * z, t * y * y + c, t * y * z - s * x, + t * x * z - s * y, t * y * z + s * x, t * z * z + c + ); +} + +float2 PatternUV(Varyings i, float4 ST, float4 uv, float rot, float clampuv) { + float2 output = (i.uv0 + uv.xy); + output = rotateUV(output, float2(0.5, 0.5), -rot * 3.14159265358979); + output = (output - 0.5) * uv.zw + 0.5; + output = output + (output - saturate(output)) * -clampuv; + output = output * ST.xy + ST.zw; + return output; +} + +float3 SaturationAdjustment(float3 x) { + return -2.39016 * x * x + 4.06485 * x - 0.223603; +} + +float3 LightnessAdjustment(float3 x) { + return -1.44837 * x * x + 3.80805 * x - 0.736657; +} + +float ShadowExtendAdjustment(float x) { + float pol1 = 0.2199 * x * x * x - 0.6290 * x * x + 1.411 * x; + float pol2 = -0.0294 * x * x * x + 0.5031 * x * x - 1.4444 * x + 5.5711; + return lerp(lerp(pol1, pol2, pow(saturate((x - 1) / 2),2)), x+3, pow(saturate((x - 7) / 2),2)); +} + +fixed4 frag (Varyings i, int faceDir : VFACE) : SV_Target { + _ambientshadowG = max(_ambientshadowG, 1E-06); + + //Clips based on main texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + if (mainTex.a <= _Cutoff) discard; + + float alpha = 1; + _ShadowColor = max(_ShadowColor, 1E-06); +#ifdef ALPHA_SHADER + float2 alphaUV = i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw; + float alphaMask = SAMPLE_TEX2D(_MainTex, alphaUV).a; + alpha = 1 - (1 - (alphaMask - _Cutoff + 0.0001) / (1.0001 - _Cutoff)) * floor(_AlphaOptionCutoff/2.0) - (1 - alphaMask) * (floor(_AlphaOptionCutoff) % 2); + if (alpha <= _Cutoff) discard; + alpha *= _alpha * _alpha; + + _ShadowColor.rgb = (_ShadowColor.rgb) / MaxGrayscale(_ShadowColor.rgb); + _ShadowColor.rgb = lerp(_ShadowColor.rgb, 1, 0.6) * (_ShadowColor.a); + _ShadowColor = float4(_ShadowColor.rgb, 1); +#endif + + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + float3 halfDir = normalize(viewDir + worldLightPos); + + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * _ColorMask_ST.xy + _ColorMask_ST.zw); + + float3 patternMask1 = SAMPLE_TEX2D(_PatternMask1, PatternUV(i, _PatternMask1_ST, _Patternuv1, _patternrotator1, _patternclamp1)).rgb; + float3 patternMask2 = SAMPLE_TEX2D(_PatternMask2, PatternUV(i, _PatternMask2_ST, _Patternuv2, _patternrotator2, _patternclamp2)).rgb; + float3 patternMask3 = SAMPLE_TEX2D(_PatternMask3, PatternUV(i, _PatternMask3_ST, _Patternuv3, _patternrotator3, _patternclamp3)).rgb; + + _Color = max(_Color, 1E-06); _Color1_2 = max(_Color1_2, 1E-06); + _Color2 = max(_Color2, 1E-06); _Color2_2 = max(_Color2_2, 1E-06); + _Color3 = max(_Color3, 1E-06); _Color3_2 = max(_Color3_2, 1E-06); + + float3 color1col = patternMask1 * _Color.rgb + (1 - patternMask1) * _Color1_2.rgb; + float3 color2col = patternMask2 * _Color2.rgb + (1 - patternMask2) * _Color2_2.rgb; + float3 color3col = patternMask3 * _Color3.rgb + (1 - patternMask3) * _Color3_2.rgb; + + float3 color; + color = colorMask.r * (color1col - 1) + 1; + color = colorMask.g * (color2col - color) + color; + color = colorMask.b * (color3col - color) + color; + float3 diffuse = mainTex * color; + float3 shadowsOFF = diffuse; + + float3 normal = NormalAdjust(i, GetNormal(i), faceDir); + _NormalMapScale *= _SpecularNormalScale; + _DetailNormalMapScale *= _SpecularDetailNormalScale; + float3 specularNormal = NormalAdjust(i, GetNormal(i), faceDir); + + float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); + float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); + float3 adjustedViewDir = faceDir == 1 ? viewDir : -viewDir; + float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); + float kkpFres = dot(normal, rotView); + kkpFres = saturate(pow(1-kkpFres, _KKPRimSoft) * _KKPRimIntensity); + _KKPRimColor.a *= (_UseKKPRim); + float3 kkpFresCol = kkpFres * _KKPRimColor + (1 - kkpFres) * diffuse; + + float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.r = lerp(lineMask.r, detailMask.r, _DetailRLineR); + + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + float3 shadingAdjustment = diffuse * _ShadowColor.rgb; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + +#ifdef ALPHA_SHADER + shadingAdjustment = saturate(shadingAdjustment); +#else + float3 shadowCol = lerp(1, _ShadowColor.rgb, 1 - saturate(_ShadowColor.a)); + shadingAdjustment = saturate(shadingAdjustment * shadowCol); +#endif + + float shadowExtendAnother = 1 - _ShadowExtendAnother; + float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; + + float kkMetalMap = kkMetal; + kkMetal *= _UseKKMetal; + + shadowExtendAnother -= kkMetal; + shadowExtendAnother += 1; + shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; + + float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; + float3 diffuseShadow = diffuse * shadowExtendShaded; + float3 diffuseShadowBlended = -shadowExtendShaded * diffuse + diffuse; + + float3 adjustedShadow; + { + bool3 compTest = _ShadowColor.rgb > 0.555555582; + float3 hsl = RGBtoHSL(shadowExtendShaded.rgb); + float3 hsl_r = hsl; + float3 hsl_g = hsl; + float3 hsl_b = hsl; + float3 saturation = SaturationAdjustment(_ShadowColor); + float3 lightness = LightnessAdjustment(_ShadowColor); + hsl_r.y *= compTest.x ? saturation.r : 1.3; + hsl_r.z *= compTest.x ? lightness.r : 0.91; + hsl_g.y *= compTest.y ? saturation.g : 1.3; + hsl_g.z *= compTest.y ? lightness.g : 0.91; + hsl_b.y *= compTest.z ? saturation.b : 1.3; + hsl_b.z *= compTest.z ? lightness.b : 0.91; + adjustedShadow = float3(HSLtoRGB(hsl_r).r, HSLtoRGB(hsl_g).g, HSLtoRGB(hsl_b).b); + } + + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, normal); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = _UseRampForLights ? SAMPLE_TEX2D(_RampG, vertexLightRampUV).x : 1.0; + float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + float shadowAttenuation = 1; +#ifdef SHADOWS_SCREEN + float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; + float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); + shadowAttenuation = saturate(shadowMap.x * 2.0 - 1.0); +#endif + float lambert = saturate(dot(_WorldSpaceLightPos0.xyz, normal) * shadowAttenuation + vertexLighting.a); + // return float4(lambert, lambert, lambert, 1); + // lambert = max(lambert, vertexLighting.a); + float2 rampUV = lambert * _RampG_ST.xy + _RampG_ST.zw; + float ramp = SAMPLE_TEX2D(_RampG, rampUV); + + float fresnel = max(dot(normal, viewDir), 0.0); + fresnel = log2(1 - fresnel); + + float specular = dot(specularNormal, halfDir); + specular = max(specular, 0.0); + float anotherRampSpecularVertex = 0.0; +#ifdef VERTEXLIGHT_ON + [unroll] + for(int j = 0; j < 4; j++){ + KKVertexLight light = vertexLights[j]; + float3 halfVector = normalize(viewDir + light.dir) * saturate(MaxGrayscale(light.col)); + anotherRampSpecularVertex = max(anotherRampSpecularVertex, dot(halfVector, specularNormal)); + } +#endif + float2 anotherRampUV = max(specular, anotherRampSpecularVertex) * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw; + float anotherRamp = SAMPLE_TEX2D(_AnotherRamp, anotherRampUV); + specular = log2(specular); + float finalRamp = lerp(ramp, anotherRamp, kkMetal); + + float rimPlace = lerp(lerp(1 - finalRamp, 1, min(_rimReflectMode+1, 1)), finalRamp, max(0, _rimReflectMode)); + diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse * rimPlace); + + _ShadowExtend = ShadowExtendAdjustment(_ShadowExtend); + float sOFFshadowAdjust = 1 + 3.1 * saturate(2 * _ambientshadowOFF); + float sOFFlightAdjust = 1 + 0.58 * saturate(2 * _ambientshadowOFF); + float lightAmount = finalRamp * (1 - detailMask.g * _ShadowExtend); + diffuseShadow = lerp(adjustedShadow * sOFFshadowAdjust, (diffuseShadowBlended + diffuseShadow) * sOFFlightAdjust, lightAmount); + + float specularHeight = _SpeclarHeight - 1.0; + specularHeight *= 0.800000012; + float2 detailSpecularOffset; + detailSpecularOffset.x = dot(i.tanWS, viewDir); + detailSpecularOffset.y = dot(i.bitanWS, viewDir); + float2 detailMaskUV2 = specularHeight * detailSpecularOffset + i.uv0; + detailMaskUV2 = detailMaskUV2 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float drawnSpecular = SAMPLE_TEX2D(_DetailMask, detailMaskUV2).x; + float drawnSpecularSquared = drawnSpecular * drawnSpecular; + + _SpecularPower *= _UseDetailRAsSpecularMap ? detailMask.r : 1; + drawnSpecular = saturate(drawnSpecularSquared * _SpecularPower); + + float specularPower = _SpecularPower * 256.0 * shadowAttenuation * _notusetexspecular; + specular *= specularPower; + specular = exp2(specular) * 5.0 - 4.0; +#ifdef KKP_EXPENSIVE_RAMP + float2 lightRampUV = specular * _RampG_ST.xy + _RampG_ST.zw; + specular = lerp(specular, SAMPLE_TEX2D(_RampG, lightRampUV), _UseRampForSpecular); +#endif + + specular = saturate(specular * _SpecularPower * shadowAttenuation); + float specularVertex = 0.0; + float3 specularVertexCol = 0.0; + +#ifdef VERTEXLIGHT_ON + specularVertex = GetVertexSpecularDiffuse(vertexLights, specularNormal, viewDir, _SpecularPower, specularVertexCol); + specularVertex = specularVertex * specularVertex; +#endif + + float3 specularCol = + // Directional + saturate(specular) * _SpecularColor.rgb * _LightColor0.rgb + + // Point + saturate(specularVertex) * _SpecularColor.rgb * specularVertexCol; + + specularCol = lerp(drawnSpecular * _SpecularColor.rgb, specularCol, _notusetexspecular); + specularCol *= _SpecularColor.a; + + float3 ambientShadowAdjust2 = AmbientShadowAdjust(); + + float rimPow = _rimpower * 9.0 + 1.0; + rimPow = rimPow * fresnel; + float rim = saturate(exp2(rimPow) * 2.5 - 0.5) * _rimV * rimPlace; + float rimMask = (1 - detailMask.b) * 9.99999809 + -8.99999809; + rim *= rimMask; + + ambientShadowAdjust2 *= rim; + ambientShadowAdjust2 *= 1 - detailMask.g; + ambientShadowAdjust2 = min(max(ambientShadowAdjust2, 0.0), 0.5); + diffuseShadow += ambientShadowAdjust2; + + float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + float3 ambientCol = max(lightCol, _ambientshadowG.xyz); + diffuseShadow = diffuseShadow * ambientCol; + + float drawnShadow = max(detailMask.g * _ShadowExtend * 0.25, lineMask.b); + float detailLineShadow = lerp(lineMask.g, detailMask.b, _DetailBLineG); + float texShadow = max(drawnShadow, detailLineShadow); + + shadingAdjustment = 1 - shadingAdjustment * shadowExtendAnother; + shadingAdjustment = shadingAdjustment + shadowExtendShaded; + shadingAdjustment *= diffuseShadow + specularCol; + + float3 emissionColorVanilla = diffuse; + float emissionMaskVanilla = saturate(detailMask.r * 5) * 3; + + diffuse = diffuse * _LineColorG; + float3 lineCol = -diffuse * shadowExtendShaded + 1; + diffuse *= shadowExtendShaded; + + float lineAlpha = _LineColorG.w - 0.5; + lineAlpha = -lineAlpha * 2.0 + 1.0; + lineCol = -lineAlpha * lineCol + 1; + lineAlpha = _LineColorG.w *2; + diffuse *= lineAlpha; + diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; + diffuse = saturate(diffuse); + diffuse = -shadingAdjustment + diffuse; + + float3 finalDiffuse = texShadow * diffuse + shadingAdjustment; + + float3 hsl = RGBtoHSL(finalDiffuse); + hsl.x = hsl.x + _ShadowHSV.x; + hsl.y = hsl.y + _ShadowHSV.y; + hsl.z = hsl.z + _ShadowHSV.z; + finalDiffuse = lerp(HSLtoRGB(hsl), finalDiffuse, saturate(finalRamp + 0.5)); + + finalDiffuse = GetBlendReflections(i, max(finalDiffuse, 1E-06), normal, viewDir, kkMetalMap, finalRamp); + + finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * rimPlace * (1 - _KKPRimAsDiffuse)); + + finalDiffuse = lerp(finalDiffuse, shadowsOFF, saturate(2 * _ambientshadowOFF - 1)); + + // Finally, emission + float2 emissionUV = i.uv0 * _EmissionMask_ST.xy + _EmissionMask_ST.zw; + float4 emissionMask = SAMPLE_TEX2D(_EmissionMask, emissionUV); + + finalDiffuse = + finalDiffuse + + (emissionMask.rgb * _EmissionColor.rgb) * (emissionMask.a * _EmissionColor.a * _EmissionIntensity) + + emissionColorVanilla * emissionMaskVanilla * _EmissionPower; + + return float4(max(finalDiffuse, 1E-06), alpha); +} \ No newline at end of file diff --git a/Shaders/Item/KKPStudioItemFrag.cginc.meta b/Shaders/Item/KKPStudioItemFrag.cginc.meta new file mode 100644 index 0000000..af5dc06 --- /dev/null +++ b/Shaders/Item/KKPStudioItemFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 72f190ac3b6e2c745ae5eeb8768b3777 +timeCreated: 1705725507 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainAlphaPlus.shader b/Shaders/Item/MainAlphaPlus.shader index f4d3e7c..8e5a9f7 100644 --- a/Shaders/Item/MainAlphaPlus.shader +++ b/Shaders/Item/MainAlphaPlus.shader @@ -13,6 +13,7 @@ Shader "xukmi/MainAlphaPlus" [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,1) _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 _SpecularPower ("Specular Power", Range(0, 1)) = 0 @@ -45,12 +46,13 @@ Shader "xukmi/MainAlphaPlus" [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 [Enum(Off,0,On,1)]_AlphaOptionZWrite ("ZWrite", Float) = 1.0 - [Enum(Off,0,On,1)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 + [Enum(Off,0,On,1,Smooth,2)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 0.0 [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 2 _LineWidthS ("LineWidthS", Float) = 1 _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 @@ -65,6 +67,18 @@ Shader "xukmi/MainAlphaPlus" _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -80,7 +94,8 @@ Shader "xukmi/MainAlphaPlus" CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment outlineFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -91,6 +106,7 @@ Shader "xukmi/MainAlphaPlus" Varyings vert (VertexData v) { Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; float viewVal = dot(viewDir, viewDir); @@ -99,7 +115,7 @@ Shader "xukmi/MainAlphaPlus" float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB * _LineWidthS; float3 invertSquare; @@ -125,23 +141,21 @@ Shader "xukmi/MainAlphaPlus" if(!_OutlineOn) o.posCS = float4(2,2,2,1); o.uv0 = v.uv0; + 1; return o; } - - - - fixed4 frag (Varyings i) : SV_Target + fixed4 outlineFrag (Varyings i) : SV_Target { - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); AlphaClip(i.uv0, _OutlineOn ? mainTex.a * _Alpha : 0); float3 diffuse = mainTex.rgb; float3 shadingAdjustment = ShadeAdjust(diffuse); - bool3 compTest = 0.555555582 < shadingAdjustment.xyz; - float3 diffuseShaded = shadingAdjustment.xyz * 0.899999976 - 0.5; + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; diffuseShaded = -diffuseShaded * 2 + 1; float4 ambientShadow = 1 - _ambientshadowG.wxyz; float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; @@ -153,8 +167,9 @@ Shader "xukmi/MainAlphaPlus" finalAmbientShadow = saturate(finalAmbientShadow); float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - shadingAdjustment.xyz *= finalAmbientShadow; - shadingAdjustment.xyz *= 1.79999995; + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; { float3 hlslcc_movcTemp = shadingAdjustment; @@ -164,13 +179,13 @@ Shader "xukmi/MainAlphaPlus" shadingAdjustment = saturate(hlslcc_movcTemp); } float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; _SpecularPower *= specularMap; float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); float detailLine = detailMask.x - lineMask.x; detailLine = _DetailRLineR * detailLine + lineMask; @@ -195,8 +210,6 @@ Shader "xukmi/MainAlphaPlus" float3 finalColor = finalDiffuse * outLineCol; finalColor = lerp(finalColor, _OutlineColor.rgb, _OutlineColor.a); return float4(finalColor, 1.0 * _Alpha); - - } @@ -208,7 +221,7 @@ Shader "xukmi/MainAlphaPlus" { Name "Forward" LOD 600 - Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent+40" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent+40" "RenderType" = "Transparent" "ShadowSupport" = "true" } Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha Cull [_CullOption] ZWrite [_AlphaOptionZWrite] @@ -217,6 +230,7 @@ Shader "xukmi/MainAlphaPlus" #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -231,7 +245,7 @@ Shader "xukmi/MainAlphaPlus" #include "KKPItemInput.cginc" #include "KKPItemDiffuse.cginc" #include "KKPItemNormals.cginc" - #include "KKPItemCoom.cginc" + #include "../KKPCoom.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" @@ -278,20 +292,13 @@ Shader "xukmi/MainAlphaPlus" CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment shadowFrag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" - sampler2D _MainTex; - float4 _MainTex_ST; - sampler2D _AlphaMask; - float4 _AlphaMask_ST; - - float _alpha_a; - float _alpha_b; - float _Cutoff; - bool _AlphaOptionCutoff; + #include "KKPItemInput.cginc" struct v2f { float2 uv0 : TEXCOORD1; @@ -306,12 +313,12 @@ Shader "xukmi/MainAlphaPlus" return o; } - float4 frag(v2f i) : SV_Target + float4 shadowFrag(v2f i) : SV_Target { float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); - float mainTexAlpha = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); alphaVal *= mainTexAlpha; diff --git a/Shaders/Item/MainAlphaPlus.shader.meta b/Shaders/Item/MainAlphaPlus.shader.meta new file mode 100644 index 0000000..c37da2c --- /dev/null +++ b/Shaders/Item/MainAlphaPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5384bc1d1aae69d4bacc9d1b743e69f5 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainAlphaPlusTess.shader b/Shaders/Item/MainAlphaPlusTess.shader index ef70e23..4efe89c 100644 --- a/Shaders/Item/MainAlphaPlusTess.shader +++ b/Shaders/Item/MainAlphaPlusTess.shader @@ -13,6 +13,7 @@ Shader "xukmi/MainAlphaPlusTess" [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,1) _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 _SpecularPower ("Specular Power", Range(0, 1)) = 0 @@ -45,12 +46,13 @@ Shader "xukmi/MainAlphaPlusTess" [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 [Enum(Off,0,On,1)]_AlphaOptionZWrite ("ZWrite", Float) = 1.0 - [Enum(Off,0,On,1)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 + [Enum(Off,0,On,1,Smooth,2)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 0.0 [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 2 _LineWidthS ("LineWidthS", Float) = 1 _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 @@ -80,6 +82,18 @@ Shader "xukmi/MainAlphaPlusTess" _ShrinkVal("ShrinkVal", Range(0, 1)) = 1 _ShrinkVerticalAdjust("Vertical Pos", Range(-1, 1)) = 0 _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -97,9 +111,10 @@ Shader "xukmi/MainAlphaPlusTess" #pragma target 5.0 #pragma vertex TessVert - #pragma fragment frag + #pragma fragment outlineFrag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -125,7 +140,7 @@ Shader "xukmi/MainAlphaPlusTess" float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB * _LineWidthS; float3 invertSquare; @@ -151,23 +166,23 @@ Shader "xukmi/MainAlphaPlusTess" if(!_OutlineOn) o.posCS = float4(2,2,2,1); o.uv0 = v.uv0; + 1; return o; } - #include "KKPItemTess.cginc" - fixed4 frag (Varyings i) : SV_Target + fixed4 outlineFrag (Varyings i) : SV_Target { - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); AlphaClip(i.uv0, _OutlineOn ? mainTex.a * _Alpha : 0); float3 diffuse = mainTex.rgb; float3 shadingAdjustment = ShadeAdjust(diffuse); - bool3 compTest = 0.555555582 < shadingAdjustment.xyz; - float3 diffuseShaded = shadingAdjustment.xyz * 0.899999976 - 0.5; + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; diffuseShaded = -diffuseShaded * 2 + 1; float4 ambientShadow = 1 - _ambientshadowG.wxyz; float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; @@ -179,8 +194,9 @@ Shader "xukmi/MainAlphaPlusTess" finalAmbientShadow = saturate(finalAmbientShadow); float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - shadingAdjustment.xyz *= finalAmbientShadow; - shadingAdjustment.xyz *= 1.79999995; + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; { float3 hlslcc_movcTemp = shadingAdjustment; @@ -190,13 +206,13 @@ Shader "xukmi/MainAlphaPlusTess" shadingAdjustment = saturate(hlslcc_movcTemp); } float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; _SpecularPower *= specularMap; float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); float detailLine = detailMask.x - lineMask.x; detailLine = _DetailRLineR * detailLine + lineMask; @@ -244,6 +260,7 @@ Shader "xukmi/MainAlphaPlusTess" #pragma fragment frag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -259,7 +276,7 @@ Shader "xukmi/MainAlphaPlusTess" #include "../KKPDisplace.cginc" #include "KKPItemDiffuse.cginc" #include "KKPItemNormals.cginc" - #include "KKPItemCoom.cginc" + #include "../KKPCoom.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" @@ -315,10 +332,11 @@ Shader "xukmi/MainAlphaPlusTess" #pragma target 5.0 #pragma vertex TessVert - #pragma fragment frag + #pragma fragment shadowFrag #pragma hull hull #pragma domain domain #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #define SHADOW_CASTER_PASS @@ -344,12 +362,12 @@ Shader "xukmi/MainAlphaPlusTess" return o; } #include "KKPItemTess.cginc" - float4 frag(v2f i) : SV_Target + float4 shadowFrag(v2f i) : SV_Target { float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); - float mainTexAlpha = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); alphaVal *= mainTexAlpha; diff --git a/Shaders/Item/MainAlphaPlusTess.shader.meta b/Shaders/Item/MainAlphaPlusTess.shader.meta new file mode 100644 index 0000000..d8b4933 --- /dev/null +++ b/Shaders/Item/MainAlphaPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 05815dbd21eb6bb42ac975d25367314c +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemAlphaPlus.shader b/Shaders/Item/MainItemAlphaPlus.shader index ad0b870..1bd326a 100644 --- a/Shaders/Item/MainItemAlphaPlus.shader +++ b/Shaders/Item/MainItemAlphaPlus.shader @@ -12,6 +12,7 @@ [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) _SpecularPower ("Specular Power", Range(0, 1)) = 0 _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 @@ -39,11 +40,12 @@ [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 0.0 [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) [Enum(Off,0,On,1)]_AlphaOptionZWrite ("ZWrite", Float) = 1.0 - [Enum(Off,0,On,1)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 + [Enum(Off,0,On,1,Smooth,2)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 2 _Alpha ("AlphaValue", Float) = 1 [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 @@ -56,6 +58,18 @@ _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -71,7 +85,8 @@ CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment outlineFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -82,6 +97,7 @@ Varyings vert (VertexData v) { Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; float viewVal = dot(viewDir, viewDir); @@ -90,7 +106,7 @@ float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB * _LineWidthS; float3 invertSquare; @@ -116,23 +132,17 @@ if(!_OutlineOn) o.posCS = float4(2,2,2,1); o.uv0 = v.uv0; + 1; return o; } - - - - fixed4 frag (Varyings i) : SV_Target + fixed4 outlineFrag (Varyings i) : SV_Target { //Clips based on alpha texture - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); - AlphaClip(i.uv0, _OutlineOn ? mainTex.a * _Alpha : 0); + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, _OutlineOn ? mainTex.a * _Alpha : 0); - float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); - float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); - float3 halfDir = normalize(viewDir + worldLightPos); - - float4 colorMask = tex2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); float3 color; color = colorMask.r * (_Color.rgb - 1) + 1; color = colorMask.g * (_Color2.rgb - color) + color; @@ -152,15 +162,15 @@ rotatedDetailUV.y = dot(detailUVAdjust, rotVal.xy); rotatedDetailUV += _Clock.xy; rotatedDetailUV = rotatedDetailUV * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMaskRot = tex2D(_LineMask, rotatedDetailUV); + float4 lineMaskRot = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, rotatedDetailUV); diffuse = lineMaskRot.b * -diffuse + diffuse; float3 shadingAdjustment = ShadeAdjustItem(diffuse); float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; @@ -184,7 +194,7 @@ hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; - float3 shadowCol = lerp(1, _ShadowColor.rgb, 1 - saturate(_ShadowColor.a)); + float3 shadowCol = lerp(1, _ShadowColor.rgb+1E-06, 1 - saturate(_ShadowColor.a+1E-06)); shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); } float shadowExtendAnother = 1 - _ShadowExtendAnother; @@ -208,11 +218,7 @@ float3 finalDiffuse = lerp(diffuse, _OutlineColor.rgb, _OutlineColor.a); return float4(finalDiffuse, mainTex.a * _Alpha); - - } - - ENDCG } @@ -231,6 +237,7 @@ #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -240,55 +247,17 @@ #include "Lighting.cginc" #define KKP_EXPENSIVE_RAMP + #define ALPHA_SHADER #include "KKPItemInput.cginc" #include "KKPItemDiffuse.cginc" #include "KKPItemNormals.cginc" - #include "KKPItemCoom.cginc" + #include "../KKPCoom.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" #include "../KKPReflect.cginc" - float3 AmbientShadowAdjust(){ - float4 u_xlat5; - float4 u_xlat6; - float u_xlat30; - bool u_xlatb30; - float u_xlat31; - - u_xlatb30 = _ambientshadowG.y>=_ambientshadowG.z; - u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); - u_xlat5.xy = _ambientshadowG.yz; - u_xlat5.z = float(0.0); - u_xlat5.w = float(-0.333333343); - u_xlat6.xy = _ambientshadowG.zy; - u_xlat6.z = float(-1.0); - u_xlat6.w = float(0.666666687); - u_xlat5 = u_xlat5 + (-u_xlat6); - u_xlat5 = (u_xlat30) * u_xlat5.xywz + u_xlat6.xywz; - u_xlatb30 = _ambientshadowG.x>=u_xlat5.x; - u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); - u_xlat6.z = u_xlat5.w; - u_xlat5.w = _ambientshadowG.x; - u_xlat6.xyw = u_xlat5.wyx; - u_xlat6 = (-u_xlat5) + u_xlat6; - u_xlat5 = (u_xlat30) * u_xlat6 + u_xlat5; - u_xlat30 = min(u_xlat5.y, u_xlat5.w); - u_xlat30 = (-u_xlat30) + u_xlat5.x; - u_xlat30 = u_xlat30 * 6.0 + 1.00000001e-10; - u_xlat31 = (-u_xlat5.y) + u_xlat5.w; - u_xlat30 = u_xlat31 / u_xlat30; - u_xlat30 = u_xlat30 + u_xlat5.z; - u_xlat5.xyz = abs((u_xlat30)) + float3(0.0, -0.333333343, 0.333333343); - u_xlat5.xyz = frac(u_xlat5.xyz); - u_xlat5.xyz = (-u_xlat5.xyz) * float3(2.0, 2.0, 2.0) + float3(1.0, 1.0, 1.0); - u_xlat5.xyz = abs(u_xlat5.xyz) * float3(3.0, 3.0, 3.0) + float3(-1.0, -1.0, -1.0); - u_xlat5.xyz = clamp(u_xlat5.xyz, 0.0, 1.0); - u_xlat5.xyz = u_xlat5.xyz * float3(0.400000006, 0.400000006, 0.400000006) + float3(0.300000012, 0.300000012, 0.300000012); - return u_xlat5.xyz; - } - Varyings vert (VertexData v) { Varyings o; @@ -312,255 +281,10 @@ return o; } -float3x3 AngleAxis3x3(float angle, float3 axis) -{ - float c, s; - sincos(angle, s, c); - - float t = 1 - c; - float x = axis.x; - float y = axis.y; - float z = axis.z; - - return float3x3( - t * x * x + c, t * x * y - s * z, t * x * z + s * y, - t * x * y + s * z, t * y * y + c, t * y * z - s * x, - t * x * z - s * y, t * y * z + s * x, t * z * z + c - ); -} - - fixed4 frag (Varyings i, int faceDir : VFACE) : SV_Target - { - //Clips based on alpha texture - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); - AlphaClip(i.uv0, mainTex.a); - - float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); - float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); - float3 halfDir = normalize(viewDir + worldLightPos); - - float4 colorMask = tex2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); - float3 color; - color = colorMask.r * (_Color.rgb - 1) + 1; - color = colorMask.g * (_Color2.rgb - color) + color; - color = colorMask.b * (_Color3.rgb - color) + color; - float3 diffuse = mainTex * color; - - float3 normal = NormalAdjust(i, GetNormal(i), 1); - - - float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); - float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); - float3 adjustedViewDir = faceDir == 1 ? viewDir : -viewDir; - float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); - float kkpFres = dot(normal, rotView); - kkpFres = saturate(pow(1-kkpFres, _KKPRimSoft) * _KKPRimIntensity); - _KKPRimColor.a *= (_UseKKPRim); - float3 kkpFresCol = kkpFres * _KKPRimColor; - - diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse); - - - //Apparently can rotate? - float time = _TimeEditor.y + _Time.y; - time *= _Clock.z * _Clock.w; - float sinTime = sin(time); - float cosTime = cos(time); - float3 rotVal = float3(-sinTime, cosTime, sinTime); - float2 detailUVAdjust = i.uv0 - _Clock.xy; - float2 rotatedDetailUV; - rotatedDetailUV.x = dot(detailUVAdjust, rotVal.yz); - rotatedDetailUV.y = dot(detailUVAdjust, rotVal.xy); - rotatedDetailUV += _Clock.xy; - rotatedDetailUV = rotatedDetailUV * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMaskRot = tex2D(_LineMask, rotatedDetailUV); - - diffuse = lineMaskRot.b * -diffuse + diffuse; - float3 shadingAdjustment = ShadeAdjustItem(diffuse); - - float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailUV); - float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); - lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; - - float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; - diffuseShaded = -diffuseShaded * 2 + 1; - float4 ambientShadow = 1 - _ambientshadowG.wxyz; - float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; - float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; - float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; - bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; - ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; - float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; - finalAmbientShadow = saturate(finalAmbientShadow); - float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - - bool3 compTest = 0.555555582 < shadingAdjustment; - shadingAdjustment *= finalAmbientShadow; - shadingAdjustment *= 1.79999995; - diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; - { - float3 hlslcc_movcTemp = shadingAdjustment; - hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; - hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; - hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; - shadingAdjustment = saturate(hlslcc_movcTemp); - } - float shadowExtendAnother = 1 - _ShadowExtendAnother; - float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; - - float kkMetalMap = kkMetal; - kkMetal *= _UseKKMetal; - - shadowExtendAnother -= kkMetal; - shadowExtendAnother += 1; - shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; - - float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; - shadingAdjustment = -shadingAdjustment * shadowExtendAnother + 1; - float3 diffuseShadow = diffuse * shadowExtendShaded; - float3 diffuseShadowBlended = -shadowExtendShaded * diffuse + diffuse; - - KKVertexLight vertexLights[4]; - #ifdef VERTEXLIGHT_ON - GetVertexLights(vertexLights, i.posWS); - #endif - float4 vertexLighting = 0.0; - float vertexLightRamp = 1.0; - #ifdef VERTEXLIGHT_ON - vertexLighting = GetVertexLighting(vertexLights, normal); - float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; - vertexLightRamp = tex2D(_RampG, vertexLightRampUV).x; - float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); - vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; - #endif - float lambert = dot(_WorldSpaceLightPos0.xyz, normal); - lambert = max(lambert, vertexLighting.a); - float2 rampUV = lambert * _RampG_ST.xy + _RampG_ST.zw; - float ramp = tex2D(_RampG, rampUV); - - float fresnel = max(dot(normal, viewDir), 0.0); - fresnel = log2(1 - fresnel); - - - float specular = dot(normal, halfDir); - specular = max(specular, 0.0); - float anotherRampSpecularVertex = 0.0; - #ifdef VERTEXLIGHT_ON - [unroll] - for(int j = 0; j < 4; j++){ - KKVertexLight light = vertexLights[j]; - float3 halfVector = normalize(viewDir + light.dir) * saturate(MaxGrayscale(light.col)); - anotherRampSpecularVertex = max(anotherRampSpecularVertex, dot(halfVector, normal)); - } - #endif - float2 anotherRampUV = max(specular, anotherRampSpecularVertex) * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw; - float anotherRamp = tex2D(_AnotherRamp, anotherRampUV); - specular = log2(specular); - anotherRamp -= ramp; - float finalRamp = kkMetal * anotherRamp + ramp; - - #ifdef SHADOWS_SCREEN - float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; - float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); - float shadowAttenuation = saturate(shadowMap.x * 2.0 - 1.0); - finalRamp *= shadowAttenuation; - #endif - - diffuseShadow = finalRamp * diffuseShadowBlended + diffuseShadow; - - float specularHeight = _SpeclarHeight - 1.0; - specularHeight *= 0.800000012; - float2 detailSpecularOffset; - detailSpecularOffset.x = dot(i.tanWS, viewDir); - detailSpecularOffset.y = dot(i.bitanWS, viewDir); - float2 detailMaskUV2 = specularHeight * detailSpecularOffset + i.uv0; - detailMaskUV2 = detailMaskUV2 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float drawnSpecular = tex2D(_DetailMask, detailMaskUV2).x; - float drawnSpecularSquared = min(drawnSpecular * drawnSpecular, 1.0); - - _SpecularPower *= _UseDetailRAsSpecularMap ? detailMask.x : 1; - - float specularPower = _SpecularPower * 256.0; - specular *= specularPower; - specular = exp2(specular) * 5.0 - 4.0; - drawnSpecular = saturate(specular * _SpecularPower + drawnSpecularSquared); - #ifdef KKP_EXPENSIVE_RAMP - float2 lightRampUV = specular * _RampG_ST.xy + _RampG_ST.zw; - specular = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + specular * (1 - _UseRampForSpecular); - #endif - specular = saturate(specular * _SpecularPower); - specular = specular - drawnSpecular; - specular = _notusetexspecular * specular + drawnSpecular; - float specularVertex = 0.0; - float3 specularVertexCol = 0.0; - #ifdef VERTEXLIGHT_ON - specularVertex = GetVertexSpecularDiffuse(vertexLights, normal, viewDir, _SpecularPower, specularVertexCol); - #endif - float3 specularCol = saturate(specular) * _SpecularColor.rgb + saturate(specularVertex) * specularVertexCol * _notusetexspecular; - specularCol *= _SpecularColor.a; - - float3 ambientShadowAdjust2 = AmbientShadowAdjust(); - - detailMask.rg = 1 - detailMask.bg; - - float rimPow = _rimpower * 9.0 + 1.0; - rimPow = rimPow * fresnel; - float rim = saturate(exp2(rimPow) * 2.5 - 0.5) * _rimV; - float rimMask = detailMask.x * 9.99999809 + -8.99999809; - rim *= rimMask; - - ambientShadowAdjust2 *= rim; - ambientShadowAdjust2 *= detailMask.g; - ambientShadowAdjust2 = min(max(ambientShadowAdjust2, 0.0), 0.5); - diffuseShadow += ambientShadowAdjust2; - - float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; - float3 ambientCol = max(lightCol, _ambientshadowG.xyz); - diffuseShadow = diffuseShadow * ambientCol; - float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; - float drawnShadow = detailMask.y * (1 - shadowExtend) + shadowExtend; - - float detailLineShadow = 1 - detailMask.x; - detailLineShadow -= lineMask.y; - detailLineShadow = _DetailBLineG * detailLineShadow + lineMask.y; - - shadingAdjustment = drawnShadow * shadingAdjustment + shadowExtendShaded; - shadingAdjustment *= diffuseShadow; - - diffuse = diffuse * _LineColorG; - float3 lineCol = -diffuse * shadowExtendShaded + 1; - diffuse *= shadowExtendShaded; - - float lineAlpha = _LineColorG.w - 0.5; - lineAlpha = -lineAlpha * 2.0 + 1.0; - lineCol = -lineAlpha * lineCol + 1; - lineAlpha = _LineColorG.w *2; - diffuse *= lineAlpha; - diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; - diffuse = saturate(diffuse); - diffuse = -shadingAdjustment + diffuse; - - float3 finalDiffuse = detailLineShadow * diffuse + shadingAdjustment; - finalDiffuse += specularCol; - - finalDiffuse = GetBlendReflections(finalDiffuse, normal, viewDir, kkMetalMap); - - finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * (1 - _KKPRimAsDiffuse)); - - float4 emission = GetEmission(i.uv0); - finalDiffuse = finalDiffuse * (1 - emission.a) + (emission.a*emission.rgb); - - return float4(finalDiffuse, mainTex.a * _Alpha); - - - } - + #include "KKPItemItemFrag.cginc" ENDCG } - //ShadowCaster Pass @@ -573,19 +297,13 @@ float3x3 AngleAxis3x3(float angle, float3 axis) CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment shadowFrag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" - sampler2D _MainTex; - float4 _MainTex_ST; - sampler2D _AlphaMask; - float4 _AlphaMask_ST; - - float _alpha_a; - float _alpha_b; - + #include "KKPItemInput.cginc" struct v2f { float2 uv0 : TEXCOORD1; @@ -600,16 +318,16 @@ float3x3 AngleAxis3x3(float angle, float3 axis) return o; } - float4 frag(v2f i) : SV_Target + float4 shadowFrag(v2f i) : SV_Target { float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); - float mainTexAlpha = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); alphaVal *= mainTexAlpha; - alphaVal.x -= 0.5f; + alphaVal.x -= _Cutoff; float clipVal = alphaVal.x < 0.0f; if(clipVal * int(0xffffffffu) != 0) discard; diff --git a/Shaders/Item/MainItemAlphaPlus.shader.meta b/Shaders/Item/MainItemAlphaPlus.shader.meta new file mode 100644 index 0000000..485f9cf --- /dev/null +++ b/Shaders/Item/MainItemAlphaPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ac4054d27c47a8a4fa8092d02515af92 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemAlphaPlusTess.shader b/Shaders/Item/MainItemAlphaPlusTess.shader new file mode 100644 index 0000000..1e1491f --- /dev/null +++ b/Shaders/Item/MainItemAlphaPlusTess.shader @@ -0,0 +1,403 @@ +Shader "xukmi/MainItemAlphaPlusTess" +{ + Properties + { + _AnotherRamp ("Another Ramp(LineR)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _NormalMapDetail ("Normal Map Detail", 2D) = "bump" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _LineMask ("Line Mask", 2D) = "black" {} + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) + _SpecularPower ("Specular Power", Range(0, 1)) = 0 + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.5 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 1 + _ShadowExtendAnother ("Shadow Extend Another", Range(0, 1)) = 1 + [MaterialToggle] _AnotherRampFull ("Another Ramp Full", Float) = 0 + [MaterialToggle] _DetailBLineG ("DetailB LineG", Float) = 0 + [MaterialToggle] _DetailRLineR ("DetailR LineR", Float) = 0 + [MaterialToggle] _notusetexspecular ("not use tex specular", Float) = 0 + _LineWidthS ("LineWidthS", Float) = 1 + _Clock ("Clock(xy/piv)(z/ang)(w/spd)", Vector) = (0,0,0,0) + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Color) = (1,0,0,1) + [Gamma]_Color2 ("Color2", Color) = (0.1172419,0,1,1) + [Gamma]_Color3 ("Color3", Color) = (0.5,0.5,0.5,1) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _DetailNormalMapScale ("Detail Normal Scale", Float) = 1 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + [HideInInspector] _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 0.0 + [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) + [Enum(Off,0,On,1)]_AlphaOptionZWrite ("ZWrite", Float) = 1.0 + [Enum(Off,0,On,1,Smooth,2)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 2 + _Alpha ("AlphaValue", Float) = 1 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 + _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 + _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 + _UseMatCapReflection("Use Mat Cap", Range(0, 1)) = 1 + _ReflectionMapCap("Mat Cap", 2D) = "black" {} + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _ShrinkVal("ShrinkVal", Range(0, 1)) = 1 + _ShrinkVerticalAdjust("Vertical Pos", Range(-1, 1)) = 0 + _ClockDisp ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags { "Queue" = "Transparent+40" "RenderType" = "TransparentCutout" } + //Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"Queue" = "Transparent" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Cull Front + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment outlineFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define ITEM_SHADER + #define TESS_LOW + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "../KKPDisplace.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal; + float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); + float detailB = 1 - detailMask.b; + viewVal *= detailB * _LineWidthS; + float3 invertSquare; + float3 x; + float3 y; + float3 z; + x.x = unity_WorldToObject[0].x; + x.y = unity_WorldToObject[1].x; + x.z = unity_WorldToObject[2].x; + float xLen = rsqrt(dot(x, x)); + y.x = unity_WorldToObject[0].y; + y.y = unity_WorldToObject[1].y; + y.z = unity_WorldToObject[2].y; + float yLen = rsqrt(dot(y, y)); + z.x = unity_WorldToObject[0].z; + z.y = unity_WorldToObject[1].z; + z.z = unity_WorldToObject[2].z; + float zLen = rsqrt(dot(z, z)); + float3 view = viewVal / float3(xLen, yLen,zLen); + view = v.normal * view + v.vertex; + o.posCS = UnityObjectToClipPos(view); + //Big brain place offscreen + if(!_OutlineOn) + o.posCS = float4(2,2,2,1); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPItemTess.cginc" + + fixed4 outlineFrag (Varyings i) : SV_Target + { + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, _OutlineOn ? mainTex.a * _Alpha : 0); + + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); + float3 color; + color = colorMask.r * (_Color.rgb - 1) + 1; + color = colorMask.g * (_Color2.rgb - color) + color; + color = colorMask.b * (_Color3.rgb - color) + color; + float3 diffuse = mainTex * color; + + + //Apparently can rotate? + float time = _TimeEditor.y + _Time.y; + time *= _Clock.z * _Clock.w; + float sinTime = sin(time); + float cosTime = cos(time); + float3 rotVal = float3(-sinTime, cosTime, sinTime); + float2 detailUVAdjust = i.uv0 - _Clock.xy; + float2 rotatedDetailUV; + rotatedDetailUV.x = dot(detailUVAdjust, rotVal.yz); + rotatedDetailUV.y = dot(detailUVAdjust, rotVal.xy); + rotatedDetailUV += _Clock.xy; + rotatedDetailUV = rotatedDetailUV * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMaskRot = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, rotatedDetailUV); + + diffuse = lineMaskRot.b * -diffuse + diffuse; + float3 shadingAdjustment = ShadeAdjustItem(diffuse); + + float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; + + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; + diffuseShaded = -diffuseShaded * 2 + 1; + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; + { + float3 hlslcc_movcTemp = shadingAdjustment; + hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; + hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; + hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; + float3 shadowCol = lerp(1, _ShadowColor.rgb+1E-06, 1 - saturate(_ShadowColor.a+1E-06)); + shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); + } + float shadowExtendAnother = 1 - _ShadowExtendAnother; + float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; + + shadowExtendAnother -= kkMetal; + shadowExtendAnother += 1; + shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; + float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; + + diffuse = diffuse * _LineColorG; + float3 lineCol = -diffuse * shadowExtendShaded + 1; + diffuse *= shadowExtendShaded; + + float lineAlpha = _LineColorG.w - 0.5; + lineAlpha = -lineAlpha * 2.0 + 1.0; + lineCol = -lineAlpha * lineCol + 1; + lineAlpha = _LineColorG.w *2; + diffuse *= lineAlpha; + diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; + + float3 finalDiffuse = lerp(diffuse, _OutlineColor.rgb, _OutlineColor.a); + return float4(finalDiffuse, mainTex.a * _Alpha); + } + ENDCG + } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent+40" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull [_CullOption] + ZWrite [_AlphaOptionZWrite] + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define ITEM_SHADER + #define ALPHA_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #define KKP_EXPENSIVE_RAMP + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "KKPItemNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + #include "../KKPReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPItemTess.cginc" + + #include "KKPItemItemFrag.cginc" + + ENDCG + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "Transparent+40" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Off + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment shadowFrag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + #define ITEM_SHADER + #define TESS_LOW + + #include "UnityCG.cginc" + + #include "KKPItemInput.cginc" + #include "../KKPDisplace.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + #include "KKPItemTess.cginc" + + float4 shadowFrag(v2f i) : SV_Target + { + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + alphaVal = max(alphaVal, alphaMask.xy); + alphaVal = min(alphaVal.y, alphaVal.x); + alphaVal *= mainTexAlpha; + alphaVal.x -= _Cutoff; + float clipVal = alphaVal.x < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Item/MainItemAlphaPlusTess.shader.meta b/Shaders/Item/MainItemAlphaPlusTess.shader.meta new file mode 100644 index 0000000..315a392 --- /dev/null +++ b/Shaders/Item/MainItemAlphaPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 403e9e278d2c15746ab085b3101b3bd6 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemPlus.shader b/Shaders/Item/MainItemPlus.shader index 37f8709..6245aa2 100644 --- a/Shaders/Item/MainItemPlus.shader +++ b/Shaders/Item/MainItemPlus.shader @@ -12,6 +12,7 @@ [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) _SpecularPower ("Specular Power", Range(0, 1)) = 0 _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 @@ -36,12 +37,13 @@ [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 - [HideInInspector] _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 [Enum(Off,0,On,1)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 @@ -54,6 +56,18 @@ _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -69,7 +83,8 @@ CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment outlineFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -80,6 +95,7 @@ Varyings vert (VertexData v) { Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; float viewVal = dot(viewDir, viewDir); @@ -88,7 +104,7 @@ float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB * _LineWidthS; float3 invertSquare; @@ -114,23 +130,21 @@ if(!_OutlineOn) o.posCS = float4(2,2,2,1); o.uv0 = v.uv0; + 1; return o; } - - - - fixed4 frag (Varyings i) : SV_Target + fixed4 outlineFrag (Varyings i) : SV_Target { //Clips based on alpha texture - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); float3 halfDir = normalize(viewDir + worldLightPos); - float4 colorMask = tex2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); float3 color; color = colorMask.r * (_Color.rgb - 1) + 1; color = colorMask.g * (_Color2.rgb - color) + color; @@ -150,19 +164,19 @@ rotatedDetailUV.y = dot(detailUVAdjust, rotVal.xy); rotatedDetailUV += _Clock.xy; rotatedDetailUV = rotatedDetailUV * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMaskRot = tex2D(_LineMask, rotatedDetailUV); + float4 lineMaskRot = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, rotatedDetailUV); diffuse = lineMaskRot.b * -diffuse + diffuse; float3 shadingAdjustment = ShadeAdjustItem(diffuse); float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; _SpecularPower *= specularMap; float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; @@ -209,11 +223,7 @@ float3 finalDiffuse = lerp(diffuse, _OutlineColor.rgb, _OutlineColor.a); return float4(finalDiffuse, 1); - - } - - ENDCG } @@ -232,6 +242,7 @@ #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -245,52 +256,12 @@ #include "KKPItemInput.cginc" #include "KKPItemDiffuse.cginc" #include "KKPItemNormals.cginc" - #include "KKPItemCoom.cginc" + #include "../KKPCoom.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" #include "../KKPReflect.cginc" - - float3 AmbientShadowAdjust(){ - float4 u_xlat5; - float4 u_xlat6; - float u_xlat30; - bool u_xlatb30; - float u_xlat31; - - u_xlatb30 = _ambientshadowG.y>=_ambientshadowG.z; - u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); - u_xlat5.xy = _ambientshadowG.yz; - u_xlat5.z = float(0.0); - u_xlat5.w = float(-0.333333343); - u_xlat6.xy = _ambientshadowG.zy; - u_xlat6.z = float(-1.0); - u_xlat6.w = float(0.666666687); - u_xlat5 = u_xlat5 + (-u_xlat6); - u_xlat5 = (u_xlat30) * u_xlat5.xywz + u_xlat6.xywz; - u_xlatb30 = _ambientshadowG.x>=u_xlat5.x; - u_xlat30 = u_xlatb30 ? 1.0 : float(0.0); - u_xlat6.z = u_xlat5.w; - u_xlat5.w = _ambientshadowG.x; - u_xlat6.xyw = u_xlat5.wyx; - u_xlat6 = (-u_xlat5) + u_xlat6; - u_xlat5 = (u_xlat30) * u_xlat6 + u_xlat5; - u_xlat30 = min(u_xlat5.y, u_xlat5.w); - u_xlat30 = (-u_xlat30) + u_xlat5.x; - u_xlat30 = u_xlat30 * 6.0 + 1.00000001e-10; - u_xlat31 = (-u_xlat5.y) + u_xlat5.w; - u_xlat30 = u_xlat31 / u_xlat30; - u_xlat30 = u_xlat30 + u_xlat5.z; - u_xlat5.xyz = abs((u_xlat30)) + float3(0.0, -0.333333343, 0.333333343); - u_xlat5.xyz = frac(u_xlat5.xyz); - u_xlat5.xyz = (-u_xlat5.xyz) * float3(2.0, 2.0, 2.0) + float3(1.0, 1.0, 1.0); - u_xlat5.xyz = abs(u_xlat5.xyz) * float3(3.0, 3.0, 3.0) + float3(-1.0, -1.0, -1.0); - u_xlat5.xyz = clamp(u_xlat5.xyz, 0.0, 1.0); - u_xlat5.xyz = u_xlat5.xyz * float3(0.400000006, 0.400000006, 0.400000006) + float3(0.300000012, 0.300000012, 0.300000012); - return u_xlat5.xyz; - } - Varyings vert (VertexData v) { Varyings o; @@ -314,255 +285,10 @@ return o; } -float3x3 AngleAxis3x3(float angle, float3 axis) -{ - float c, s; - sincos(angle, s, c); - - float t = 1 - c; - float x = axis.x; - float y = axis.y; - float z = axis.z; - - return float3x3( - t * x * x + c, t * x * y - s * z, t * x * z + s * y, - t * x * y + s * z, t * y * y + c, t * y * z - s * x, - t * x * z - s * y, t * y * z + s * x, t * z * z + c - ); -} - - fixed4 frag (Varyings i, int faceDir : VFACE) : SV_Target - { - //Clips based on alpha texture - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); - AlphaClip(i.uv0, mainTex.a); - - float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); - float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); - float3 halfDir = normalize(viewDir + worldLightPos); - - float4 colorMask = tex2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); - float3 color; - color = colorMask.r * (_Color.rgb - 1) + 1; - color = colorMask.g * (_Color2.rgb - color) + color; - color = colorMask.b * (_Color3.rgb - color) + color; - float3 diffuse = mainTex * color; - - float3 normal = NormalAdjust(i, GetNormal(i), 1); - - float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); - float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); - float3 adjustedViewDir = faceDir == 1 ? viewDir : -viewDir; - float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); - float kkpFres = dot(normal, rotView); - kkpFres = saturate(pow(1-kkpFres, _KKPRimSoft) * _KKPRimIntensity); - _KKPRimColor.a *= (_UseKKPRim); - float3 kkpFresCol = kkpFres * _KKPRimColor; - - diffuse = lerp(diffuse, kkpFresCol, _KKPRimColor.a * kkpFres * _KKPRimAsDiffuse); - - //Apparently can rotate? - float time = _TimeEditor.y + _Time.y; - time *= _Clock.z * _Clock.w; - float sinTime = sin(time); - float cosTime = cos(time); - float3 rotVal = float3(-sinTime, cosTime, sinTime); - float2 detailUVAdjust = i.uv0 - _Clock.xy; - float2 rotatedDetailUV; - rotatedDetailUV.x = dot(detailUVAdjust, rotVal.yz); - rotatedDetailUV.y = dot(detailUVAdjust, rotVal.xy); - rotatedDetailUV += _Clock.xy; - rotatedDetailUV = rotatedDetailUV * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMaskRot = tex2D(_LineMask, rotatedDetailUV); - - diffuse = lineMaskRot.b * -diffuse + diffuse; - float3 shadingAdjustment = ShadeAdjustItem(diffuse); + #include "KKPItemItemFrag.cginc" - float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailUV); - float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); - lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; - - float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; - diffuseShaded = -diffuseShaded * 2 + 1; - float4 ambientShadow = 1 - _ambientshadowG.wxyz; - float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; - float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; - float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; - bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; - ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; - float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; - finalAmbientShadow = saturate(finalAmbientShadow); - float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - - bool3 compTest = 0.555555582 < shadingAdjustment; - shadingAdjustment *= finalAmbientShadow; - shadingAdjustment *= 1.79999995; - diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; - { - float3 hlslcc_movcTemp = shadingAdjustment; - hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; - hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; - hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; - float3 shadowCol = lerp(1, _ShadowColor.rgb, 1 - saturate(_ShadowColor.a)); - shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); - } - float shadowExtendAnother = 1 - _ShadowExtendAnother; - float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; - - float kkMetalMap = kkMetal; - kkMetal *= _UseKKMetal; - - shadowExtendAnother -= kkMetal; - shadowExtendAnother += 1; - shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; - - float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; - shadingAdjustment = -shadingAdjustment * shadowExtendAnother + 1; - float3 diffuseShadow = diffuse * shadowExtendShaded; - float3 diffuseShadowBlended = -shadowExtendShaded * diffuse + diffuse; - - KKVertexLight vertexLights[4]; - #ifdef VERTEXLIGHT_ON - GetVertexLights(vertexLights, i.posWS); - #endif - float4 vertexLighting = 0.0; - float vertexLightRamp = 1.0; - #ifdef VERTEXLIGHT_ON - vertexLighting = GetVertexLighting(vertexLights, normal); - float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; - vertexLightRamp = tex2D(_RampG, vertexLightRampUV).x; - float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); - vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; - #endif - float lambert = dot(_WorldSpaceLightPos0.xyz, normal); - lambert = max(lambert, vertexLighting.a); - float2 rampUV = lambert * _RampG_ST.xy + _RampG_ST.zw; - float ramp = tex2D(_RampG, rampUV); - - float fresnel = max(dot(normal, viewDir), 0.0); - fresnel = log2(1 - fresnel); - - - float specular = dot(normal, halfDir); - specular = max(specular, 0.0); - float anotherRampSpecularVertex = 0.0; - #ifdef VERTEXLIGHT_ON - [unroll] - for(int j = 0; j < 4; j++){ - KKVertexLight light = vertexLights[j]; - float3 halfVector = normalize(viewDir + light.dir) * saturate(MaxGrayscale(light.col)); - anotherRampSpecularVertex = max(anotherRampSpecularVertex, dot(halfVector, normal)); - } - #endif - float2 anotherRampUV = max(specular, anotherRampSpecularVertex) * _AnotherRamp_ST.xy + _AnotherRamp_ST.zw; - float anotherRamp = tex2D(_AnotherRamp, anotherRampUV); - specular = log2(specular); - anotherRamp -= ramp; - float finalRamp = kkMetal * anotherRamp + ramp; - - #ifdef SHADOWS_SCREEN - float2 shadowMapUV = i.shadowCoordinate.xy / i.shadowCoordinate.ww; - float4 shadowMap = tex2D(_ShadowMapTexture, shadowMapUV); - float shadowAttenuation = saturate(shadowMap.x * 2.0 - 1.0); - finalRamp *= shadowAttenuation; - #endif - - diffuseShadow = finalRamp * diffuseShadowBlended + diffuseShadow; - - float specularHeight = _SpeclarHeight - 1.0; - specularHeight *= 0.800000012; - float2 detailSpecularOffset; - detailSpecularOffset.x = dot(i.tanWS, viewDir); - detailSpecularOffset.y = dot(i.bitanWS, viewDir); - float2 detailMaskUV2 = specularHeight * detailSpecularOffset + i.uv0; - detailMaskUV2 = detailMaskUV2 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float drawnSpecular = tex2D(_DetailMask, detailMaskUV2).x; - float drawnSpecularSquared = min(drawnSpecular * drawnSpecular, 1.0); - - _SpecularPower *= _UseDetailRAsSpecularMap ? detailMask.x : 1; - - float specularPower = _SpecularPower * 256.0; - specular *= specularPower; - specular = exp2(specular) * 5.0 - 4.0; - drawnSpecular = saturate(specular * _SpecularPower + drawnSpecularSquared); - #ifdef KKP_EXPENSIVE_RAMP - float2 lightRampUV = specular * _RampG_ST.xy + _RampG_ST.zw; - specular = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + specular * (1 - _UseRampForSpecular); - #endif - specular = saturate(specular * _SpecularPower); - specular = specular - drawnSpecular; - specular = _notusetexspecular * specular + drawnSpecular; - float specularVertex = 0.0; - float3 specularVertexCol = 0.0; - #ifdef VERTEXLIGHT_ON - specularVertex = GetVertexSpecularDiffuse(vertexLights, normal, viewDir, _SpecularPower, specularVertexCol); - #endif - float3 specularCol = saturate(specular) * _SpecularColor.rgb + saturate(specularVertex) * specularVertexCol * _notusetexspecular; - specularCol *= _SpecularColor.a; - - float3 ambientShadowAdjust2 = AmbientShadowAdjust(); - - detailMask.rg = 1 - detailMask.bg; - - float rimPow = _rimpower * 9.0 + 1.0; - rimPow = rimPow * fresnel; - float rim = saturate(exp2(rimPow) * 2.5 - 0.5) * _rimV; - float rimMask = detailMask.x * 9.99999809 + -8.99999809; - rim *= rimMask; - - ambientShadowAdjust2 *= rim; - ambientShadowAdjust2 *= detailMask.g; - ambientShadowAdjust2 = min(max(ambientShadowAdjust2, 0.0), 0.5); - diffuseShadow += ambientShadowAdjust2; - - float3 lightCol = (_LightColor0.xyz + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; - float3 ambientCol = max(lightCol, _ambientshadowG.xyz); - diffuseShadow = diffuseShadow * ambientCol; - float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; - float drawnShadow = detailMask.y * (1 - shadowExtend) + shadowExtend; - - float detailLineShadow = 1 - detailMask.x; - detailLineShadow -= lineMask.y; - detailLineShadow = _DetailBLineG * detailLineShadow + lineMask.y; - - shadingAdjustment = drawnShadow * shadingAdjustment + shadowExtendShaded; - shadingAdjustment *= diffuseShadow; - - diffuse = diffuse * _LineColorG; - float3 lineCol = -diffuse * shadowExtendShaded + 1; - diffuse *= shadowExtendShaded; - - float lineAlpha = _LineColorG.w - 0.5; - lineAlpha = -lineAlpha * 2.0 + 1.0; - lineCol = -lineAlpha * lineCol + 1; - lineAlpha = _LineColorG.w *2; - diffuse *= lineAlpha; - diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; - diffuse = saturate(diffuse); - diffuse = -shadingAdjustment + diffuse; - - float3 finalDiffuse = detailLineShadow * diffuse + shadingAdjustment; - finalDiffuse += specularCol; - - finalDiffuse = GetBlendReflections(finalDiffuse, normal, viewDir, kkMetalMap); - - finalDiffuse = lerp(finalDiffuse, kkpFresCol, _KKPRimColor.a * kkpFres * (1 - _KKPRimAsDiffuse)); - - - float4 emission = GetEmission(i.uv0); - finalDiffuse = finalDiffuse * (1 - emission.a) + (emission.a*emission.rgb); - - return float4(finalDiffuse, 1); - - - } - - ENDCG } - //ShadowCaster Pass @@ -575,19 +301,13 @@ float3x3 AngleAxis3x3(float angle, float3 axis) CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment shadowFrag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" - sampler2D _MainTex; - float4 _MainTex_ST; - sampler2D _AlphaMask; - float4 _AlphaMask_ST; - - float _alpha_a; - float _alpha_b; - + #include "KKPItemInput.cginc" struct v2f { float2 uv0 : TEXCOORD1; @@ -602,12 +322,12 @@ float3x3 AngleAxis3x3(float angle, float3 axis) return o; } - float4 frag(v2f i) : SV_Target + float4 shadowFrag(v2f i) : SV_Target { float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); - float mainTexAlpha = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); alphaVal *= mainTexAlpha; @@ -618,13 +338,8 @@ float3x3 AngleAxis3x3(float angle, float3 axis) SHADOW_CASTER_FRAGMENT(i) } - - ENDCG } - - - } Fallback "Unlit/Texture" } diff --git a/Shaders/Item/MainItemPlus.shader.meta b/Shaders/Item/MainItemPlus.shader.meta new file mode 100644 index 0000000..0d32985 --- /dev/null +++ b/Shaders/Item/MainItemPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2402ddf9cbb3d6d4da5f6fb2083fe8e1 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemPlusTess.shader b/Shaders/Item/MainItemPlusTess.shader new file mode 100644 index 0000000..c7a11a9 --- /dev/null +++ b/Shaders/Item/MainItemPlusTess.shader @@ -0,0 +1,406 @@ +Shader "xukmi/MainItemPlusTess" +{ + Properties + { + _AnotherRamp ("Another Ramp(LineR)", 2D) = "white" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _NormalMapDetail ("Normal Map Detail", 2D) = "bump" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _LineMask ("Line Mask", 2D) = "black" {} + _EmissionMask ("Emission Mask", 2D) = "black" {} + [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) + _EmissionIntensity("Emission Intensity", Float) = 1 + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) + _SpecularPower ("Specular Power", Range(0, 1)) = 0 + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.5 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 1 + _ShadowExtendAnother ("Shadow Extend Another", Range(0, 1)) = 1 + [MaterialToggle] _AnotherRampFull ("Another Ramp Full", Float) = 0 + [MaterialToggle] _DetailBLineG ("DetailB LineG", Float) = 0 + [MaterialToggle] _DetailRLineR ("DetailR LineR", Float) = 0 + [MaterialToggle] _notusetexspecular ("not use tex specular", Float) = 0 + _LineWidthS ("LineWidthS", Float) = 1 + _Clock ("Clock(xy/piv)(z/ang)(w/spd)", Vector) = (0,0,0,0) + _ColorMask ("Color Mask", 2D) = "black" {} + [Gamma]_Color ("Color", Color) = (1,0,0,1) + [Gamma]_Color2 ("Color2", Color) = (0.1172419,0,1,1) + [Gamma]_Color3 ("Color3", Color) = (0.5,0.5,0.5,1) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + _NormalMapScale ("NormalMapScale", Float) = 1 + _DetailNormalMapScale ("Detail Normal Scale", Float) = 1 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + [Enum(Off,0,On,1)]_AlphaOptionCutoff ("Cutoff On", Float) = 1.0 + [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 + [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) + _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 + _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 + _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 + _UseMatCapReflection("Use Mat Cap", Range(0, 1)) = 1 + _ReflectionMapCap("Mat Cap", 2D) = "black" {} + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _ShrinkVal("ShrinkVal", Range(0, 1)) = 1 + _ShrinkVerticalAdjust("Vertical Pos", Range(-1, 1)) = 0 + _ClockDisp ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags { "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" } + //Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Cull Front + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment outlineFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define ITEM_SHADER + #define TESS_MID + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "../KKPDisplace.cginc" + + Varyings vert (VertexData v) + { + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal; + float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); + float detailB = 1 - detailMask.b; + viewVal *= detailB * _LineWidthS; + float3 invertSquare; + float3 x; + float3 y; + float3 z; + x.x = unity_WorldToObject[0].x; + x.y = unity_WorldToObject[1].x; + x.z = unity_WorldToObject[2].x; + float xLen = rsqrt(dot(x, x)); + y.x = unity_WorldToObject[0].y; + y.y = unity_WorldToObject[1].y; + y.z = unity_WorldToObject[2].y; + float yLen = rsqrt(dot(y, y)); + z.x = unity_WorldToObject[0].z; + z.y = unity_WorldToObject[1].z; + z.z = unity_WorldToObject[2].z; + float zLen = rsqrt(dot(z, z)); + float3 view = viewVal / float3(xLen, yLen,zLen); + view = v.normal * view + v.vertex; + o.posCS = UnityObjectToClipPos(view); + //Big brain place offscreen + if(!_OutlineOn) + o.posCS = float4(2,2,2,1); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPItemTess.cginc" + + fixed4 outlineFrag (Varyings i) : SV_Target + { + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + float3 halfDir = normalize(viewDir + worldLightPos); + + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); + float3 color; + color = colorMask.r * (_Color.rgb - 1) + 1; + color = colorMask.g * (_Color2.rgb - color) + color; + color = colorMask.b * (_Color3.rgb - color) + color; + float3 diffuse = mainTex * color; + + + //Apparently can rotate? + float time = _TimeEditor.y + _Time.y; + time *= _Clock.z * _Clock.w; + float sinTime = sin(time); + float cosTime = cos(time); + float3 rotVal = float3(-sinTime, cosTime, sinTime); + float2 detailUVAdjust = i.uv0 - _Clock.xy; + float2 rotatedDetailUV; + rotatedDetailUV.x = dot(detailUVAdjust, rotVal.yz); + rotatedDetailUV.y = dot(detailUVAdjust, rotVal.xy); + rotatedDetailUV += _Clock.xy; + rotatedDetailUV = rotatedDetailUV * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMaskRot = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, rotatedDetailUV); + + diffuse = lineMaskRot.b * -diffuse + diffuse; + float3 shadingAdjustment = ShadeAdjustItem(diffuse); + + float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); + + float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; + _SpecularPower *= specularMap; + + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; + + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; + diffuseShaded = -diffuseShaded * 2 + 1; + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; + { + float3 hlslcc_movcTemp = shadingAdjustment; + hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; + hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; + hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; + shadingAdjustment = saturate(hlslcc_movcTemp); + } + float shadowExtendAnother = 1 - _ShadowExtendAnother; + float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; + + shadowExtendAnother -= kkMetal; + shadowExtendAnother += 1; + shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; + float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; + + diffuse = diffuse * _LineColorG; + float3 lineCol = -diffuse * shadowExtendShaded + 1; + diffuse *= shadowExtendShaded; + + float lineAlpha = _LineColorG.w - 0.5; + lineAlpha = -lineAlpha * 2.0 + 1.0; + lineCol = -lineAlpha * lineCol + 1; + lineAlpha = _LineColorG.w *2; + diffuse *= lineAlpha; + diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; + + float3 finalDiffuse = lerp(diffuse, _OutlineColor.rgb, _OutlineColor.a); + return float4(finalDiffuse, 1); + } + + ENDCG + } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Blend One OneMinusSrcAlpha, One OneMinusSrcAlpha + Cull [_CullOption] + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define ITEM_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #define KKP_EXPENSIVE_RAMP + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "KKPItemNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + #include "../KKPReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPItemTess.cginc" + + #include "KKPItemItemFrag.cginc" + + ENDCG + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Off + + CGPROGRAM + #pragma target 5.0 + #pragma vertex TessVert + #pragma fragment shadowFrag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + #define ITEM_SHADER + #define TESS_LOW + + #include "UnityCG.cginc" + + #include "KKPItemInput.cginc" + #include "../KKPDisplace.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + #include "KKPItemTess.cginc" + + float4 shadowFrag(v2f i) : SV_Target + { + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); + float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + alphaVal = max(alphaVal, alphaMask.xy); + alphaVal = min(alphaVal.y, alphaVal.x); + alphaVal *= mainTexAlpha; + alphaVal.x -= 0.5f; + float clipVal = alphaVal.x < 0.0f; + if(clipVal * int(0xffffffffu) != 0) + discard; + + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Item/MainItemPlusTess.shader.meta b/Shaders/Item/MainItemPlusTess.shader.meta new file mode 100644 index 0000000..6f0dd88 --- /dev/null +++ b/Shaders/Item/MainItemPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e5e23da4bbd8b404a87ee8f49a824fec +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemStudioAlphaPlus.shader b/Shaders/Item/MainItemStudioAlphaPlus.shader new file mode 100644 index 0000000..23b3546 --- /dev/null +++ b/Shaders/Item/MainItemStudioAlphaPlus.shader @@ -0,0 +1,224 @@ +Shader "xukmi/MainItemStudioAlphaPlus" +{ + Properties + { + // Vanilla textures + _AnotherRamp ("Another Ramp(LineR)", 2D) = "white" {} + _ColorMask ("Color Mask", 2D) = "black" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _LineMask ("Line Mask", 2D) = "black" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _PatternMask1 ("Pattern 1", 2D) = "white" {} + _PatternMask2 ("Pattern 2", 2D) = "white" {} + _PatternMask3 ("Pattern 3", 2D) = "white" {} + + // Additional textures + _NormalMapDetail ("Normal Map Detail", 2D) = "bump" {} + _EmissionMask ("Emission Mask", 2D) = "black" {} + + // Vanilla colors and vectors + [Gamma]_Color ("Color", Color) = (1,1,1,1) + [Gamma]_Color1_2 ("Col1 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Color) = (1,1,1,1) + [Gamma]_Color2_2 ("Col2 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color3 ("Color3", Color) = (1,1,1,1) + [Gamma]_Color3_2 ("Col3 Pattern Color", Color) = (1,1,1,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + + _Patternuv1 ("Pattern 1 additional ST", Vector) = (0,0,1,1) + _Patternuv2 ("Pattern 2 additional ST", Vector) = (0,0,1,1) + _Patternuv3 ("Pattern 3 additional ST", Vector) = (0,0,1,1) + + // Additional colors and vectors + [Gamma]_EmissionColor("Emission Color", Color) = (1,1,1,1) + [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + + // Vanilla toggles and floats + [MaterialToggle] _ambientshadowOFF ("Ambient Shadow OFF", Float) = 0 + [MaterialToggle] _AnotherRampFull ("Another Ramp Full", Float) = 0 + [MaterialToggle] _DetailBLineG ("DetailB LineG", Float) = 0 + [MaterialToggle] _DetailRLineR ("DetailR LineR", Float) = 0 + [MaterialToggle] _notusetexspecular ("not use tex specular", Float) = 0 + [MaterialToggle] _patternclamp1 ("Pattern 1 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp2 ("Pattern 2 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp3 ("Pattern 3 tile clamp", Float) = 0 + + _alpha ("Alpha", Float) = 1.0 + _EmissionPower("Emission Power", Float) = 1 + _patternrotator1 ("Pattern 1 rotation", Range(-1,1)) = 0 + _patternrotator2 ("Pattern 2 rotation", Range(-1,1)) = 0 + _patternrotator3 ("Pattern 3 rotation", Range(-1,1)) = 0 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.5 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 1 + _ShadowExtendAnother ("Shadow Extend Another", Range(0, 1)) = 1 + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 + _SpecularPower ("Specular Power", Range(0, 1)) = 0 + + // Additional toggles and floats + [Enum(Off,0,On,1)] _AlphaOptionCutoff ("Cutoff On", Float) = 1.0 + [Enum(Off,0,On,1)] _AlphaOptionZWrite ("ZWrite", Float) = 1.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 2 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.0 + _DetailNormalMapScale ("Detail Normal Scale", Float) = 1 + _EmissionIntensity ("Emission Intensity", Float) = 0 + _NormalMapScale ("NormalMapScale", Float) = 1 + + // KKPrim properties + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + // Matcap properties + _ReflectionMapCap("Mat Cap", 2D) = "black" {} + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _Reflective("Reflective", Range(0, 1)) = 0.75 + _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 + _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 + _UseMatCapReflection("Use Mat Cap", Range(0, 1)) = 1 + + // Stuff added post-1.3.1 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags { "Queue" = "Transparent+1907" "RenderType" = "TransparentCutout" } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent+1907" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull [_CullOption] + ZWrite [_AlphaOptionZWrite] + + CGPROGRAM + #pragma target 3.0 + + #pragma vertex vert + #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define STUDIO_SHADER + #define ALPHA_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #define KKP_EXPENSIVE_RAMP + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "KKPItemNormals.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + #include "../KKPReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + 1; + return o; + } + + #include "KKPStudioItemFrag.cginc" + + ENDCG + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "Transparent+1907" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment shadowFrag + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define STUDIO_SHADER + #define ALPHA_SHADER + + #include "UnityCG.cginc" + + #include "KKPItemInput.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(appdata_base v) + { + v2f o; + o.uv0 = v.texcoord; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + float4 shadowFrag(v2f i) : SV_Target + { + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + if(mainTexAlpha * _alpha <= _Cutoff) + discard; + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Item/MainItemStudioAlphaPlus.shader.meta b/Shaders/Item/MainItemStudioAlphaPlus.shader.meta new file mode 100644 index 0000000..62b001d --- /dev/null +++ b/Shaders/Item/MainItemStudioAlphaPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 51583935ccf6e3b4997d1fd89efed40d +timeCreated: 1705725508 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemStudioAlphaPlusTess.shader b/Shaders/Item/MainItemStudioAlphaPlusTess.shader new file mode 100644 index 0000000..bae44de --- /dev/null +++ b/Shaders/Item/MainItemStudioAlphaPlusTess.shader @@ -0,0 +1,268 @@ +Shader "xukmi/MainItemStudioAlphaPlusTess" +{ + Properties + { + // Vanilla textures + _AnotherRamp ("Another Ramp(LineR)", 2D) = "white" {} + _ColorMask ("Color Mask", 2D) = "black" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _LineMask ("Line Mask", 2D) = "black" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _PatternMask1 ("Pattern 1", 2D) = "white" {} + _PatternMask2 ("Pattern 2", 2D) = "white" {} + _PatternMask3 ("Pattern 3", 2D) = "white" {} + + // Additional textures + _NormalMapDetail ("Normal Map Detail", 2D) = "bump" {} + _EmissionMask ("Emission Mask", 2D) = "black" {} + + // Vanilla colors and vectors + [Gamma]_Color ("Color", Color) = (1,1,1,1) + [Gamma]_Color1_2 ("Col1 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Color) = (1,1,1,1) + [Gamma]_Color2_2 ("Col2 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color3 ("Color3", Color) = (1,1,1,1) + [Gamma]_Color3_2 ("Col3 Pattern Color", Color) = (1,1,1,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + + _Patternuv1 ("Pattern 1 additional ST", Vector) = (0,0,1,1) + _Patternuv2 ("Pattern 2 additional ST", Vector) = (0,0,1,1) + _Patternuv3 ("Pattern 3 additional ST", Vector) = (0,0,1,1) + + // Additional colors and vectors + [Gamma]_EmissionColor("Emission Color", Color) = (1,1,1,1) + [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + + // Vanilla toggles and floats + [MaterialToggle] _ambientshadowOFF ("Ambient Shadow OFF", Float) = 0 + [MaterialToggle] _AnotherRampFull ("Another Ramp Full", Float) = 0 + [MaterialToggle] _DetailBLineG ("DetailB LineG", Float) = 0 + [MaterialToggle] _DetailRLineR ("DetailR LineR", Float) = 0 + [MaterialToggle] _notusetexspecular ("not use tex specular", Float) = 0 + [MaterialToggle] _patternclamp1 ("Pattern 1 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp2 ("Pattern 2 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp3 ("Pattern 3 tile clamp", Float) = 0 + + _alpha ("Alpha", Float) = 1.0 + _EmissionPower("Emission Power", Float) = 1 + _patternrotator1 ("Pattern 1 rotation", Range(-1,1)) = 0 + _patternrotator2 ("Pattern 2 rotation", Range(-1,1)) = 0 + _patternrotator3 ("Pattern 3 rotation", Range(-1,1)) = 0 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.5 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 1 + _ShadowExtendAnother ("Shadow Extend Another", Range(0, 1)) = 1 + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 + _SpecularPower ("Specular Power", Range(0, 1)) = 0 + + // Additional toggles and floats + [Enum(Off,0,On,1)] _AlphaOptionCutoff ("Cutoff On", Float) = 1.0 + [Enum(Off,0,On,1)] _AlphaOptionZWrite ("ZWrite", Float) = 1.0 + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 2 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.0 + _DetailNormalMapScale ("Detail Normal Scale", Float) = 1 + _EmissionIntensity ("Emission Intensity", Float) = 0 + _NormalMapScale ("NormalMapScale", Float) = 1 + + // KKPrim properties + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + // Matcap properties + _ReflectionMapCap("Mat Cap", 2D) = "black" {} + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _Reflective("Reflective", Range(0, 1)) = 0.75 + _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 + _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 + _UseMatCapReflection("Use Mat Cap", Range(0, 1)) = 1 + + // Tess properties + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _ShrinkVal("ShrinkVal", Range(0, 1)) = 1 + _ShrinkVerticalAdjust("Vertical Pos", Range(-1, 1)) = 0 + _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + + // Stuff added post-1.3.1 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags { "Queue" = "Transparent+1907" "RenderType" = "TransparentCutout" } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent+1907" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Blend SrcAlpha OneMinusSrcAlpha, SrcAlpha OneMinusSrcAlpha + Cull [_CullOption] + ZWrite [_AlphaOptionZWrite] + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define STUDIO_SHADER + #define ALPHA_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #define KKP_EXPENSIVE_RAMP + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "KKPItemNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + #include "../KKPReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + 1; + return o; + } + + #include "KKPItemTess.cginc" + #include "KKPStudioItemFrag.cginc" + + ENDCG + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "Transparent+1907" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Off + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment shadowFrag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + #define STUDIO_SHADER + #define ALPHA_SHADER + #define TESS_LOW + + #include "UnityCG.cginc" + + #include "KKPItemInput.cginc" + #include "../KKPDisplace.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + float4 shadowFrag(v2f i) : SV_Target + { + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + if(mainTexAlpha * _alpha <= _Cutoff) + discard; + SHADOW_CASTER_FRAGMENT(i) + } + + #include "KKPItemTess.cginc" + + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Item/MainItemStudioAlphaPlusTess.shader.meta b/Shaders/Item/MainItemStudioAlphaPlusTess.shader.meta new file mode 100644 index 0000000..f6dd5b3 --- /dev/null +++ b/Shaders/Item/MainItemStudioAlphaPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 124e802e24fa3aa4d933edcb968f7e62 +timeCreated: 1705725508 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemStudioPlus.shader b/Shaders/Item/MainItemStudioPlus.shader new file mode 100644 index 0000000..f38d44e --- /dev/null +++ b/Shaders/Item/MainItemStudioPlus.shader @@ -0,0 +1,360 @@ +Shader "xukmi/MainItemStudioPlus" +{ + Properties + { + // Vanilla textures + _AnotherRamp ("Another Ramp(LineR)", 2D) = "white" {} + _ColorMask ("Color Mask", 2D) = "black" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _LineMask ("Line Mask", 2D) = "black" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _PatternMask1 ("Pattern 1", 2D) = "white" {} + _PatternMask2 ("Pattern 2", 2D) = "white" {} + _PatternMask3 ("Pattern 3", 2D) = "white" {} + + // Additional textures + _NormalMapDetail ("Normal Map Detail", 2D) = "bump" {} + _EmissionMask ("Emission Mask", 2D) = "black" {} + + // Vanilla colors and vectors + [Gamma]_Color ("Color", Color) = (1,1,1,1) + [Gamma]_Color1_2 ("Col1 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Color) = (1,1,1,1) + [Gamma]_Color2_2 ("Col2 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color3 ("Color3", Color) = (1,1,1,1) + [Gamma]_Color3_2 ("Col3 Pattern Color", Color) = (1,1,1,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + + _Patternuv1 ("Pattern 1 additional ST", Vector) = (0,0,1,1) + _Patternuv2 ("Pattern 2 additional ST", Vector) = (0,0,1,1) + _Patternuv3 ("Pattern 3 additional ST", Vector) = (0,0,1,1) + + // Additional colors and vectors + [Gamma]_EmissionColor("Emission Color", Color) = (1,1,1,1) + [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + [Gamma]_OutlineColor ("Outline Color", Color) = (0,0,0,0) + + // Vanilla toggles and floats + [MaterialToggle] _ambientshadowOFF ("Ambient Shadow OFF", Float) = 0 + [MaterialToggle] _AnotherRampFull ("Another Ramp Full", Float) = 0 + [MaterialToggle] _DetailBLineG ("DetailB LineG", Float) = 0 + [MaterialToggle] _DetailRLineR ("DetailR LineR", Float) = 0 + [MaterialToggle] _notusetexspecular ("not use tex specular", Float) = 0 + [MaterialToggle] _patternclamp1 ("Pattern 1 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp2 ("Pattern 2 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp3 ("Pattern 3 tile clamp", Float) = 0 + + _EmissionPower("Emission Power", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + _patternrotator1 ("Pattern 1 rotation", Range(-1,1)) = 0 + _patternrotator2 ("Pattern 2 rotation", Range(-1,1)) = 0 + _patternrotator3 ("Pattern 3 rotation", Range(-1,1)) = 0 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.5 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 1 + _ShadowExtendAnother ("Shadow Extend Another", Range(0, 1)) = 1 + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 + _SpecularPower ("Specular Power", Range(0, 1)) = 0 + + // Additional toggles and floats + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + [Enum(Off,0,On,1)] _OutlineOn ("Outline On", Float) = 1.0 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _DetailNormalMapScale ("Detail Normal Scale", Float) = 1 + _EmissionIntensity ("Emission Intensity", Float) = 0 + _NormalMapScale ("NormalMapScale", Float) = 1 + + // KKPrim properties + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + // Matcap properties + _ReflectionMapCap("Mat Cap", 2D) = "black" {} + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _Reflective("Reflective", Range(0, 1)) = 0.75 + _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 + _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 + _UseMatCapReflection("Use Mat Cap", Range(0, 1)) = 1 + + // Stuff added post-1.3.1 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags { "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" } + //Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Cull Front + + CGPROGRAM + #pragma vertex vert + #pragma fragment outlineFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define STUDIO_SHADER + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal; + float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); + float detailB = 1 - detailMask.b; + viewVal *= detailB * _LineWidthS; + float3 invertSquare; + float3 x; + float3 y; + float3 z; + x.x = unity_WorldToObject[0].x; + x.y = unity_WorldToObject[1].x; + x.z = unity_WorldToObject[2].x; + float xLen = rsqrt(dot(x, x)); + y.x = unity_WorldToObject[0].y; + y.y = unity_WorldToObject[1].y; + y.z = unity_WorldToObject[2].y; + float yLen = rsqrt(dot(y, y)); + z.x = unity_WorldToObject[0].z; + z.y = unity_WorldToObject[1].z; + z.z = unity_WorldToObject[2].z; + float zLen = rsqrt(dot(z, z)); + float3 view = viewVal / float3(xLen, yLen,zLen); + view = v.normal * view + v.vertex; + o.posCS = UnityObjectToClipPos(view); + //Big brain place offscreen + if(!_OutlineOn) + o.posCS = float4(2,2,2,1); + o.uv0 = v.uv0; + 1; + return o; + } + + fixed4 outlineFrag (Varyings i) : SV_Target + { + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + float3 halfDir = normalize(viewDir + worldLightPos); + + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); + float3 color; + color = colorMask.r * (_Color.rgb - 1) + 1; + color = colorMask.g * (_Color2.rgb - color) + color; + color = colorMask.b * (_Color3.rgb - color) + color; + float3 diffuse = mainTex * color; + + float3 shadingAdjustment = ShadeAdjustItem(diffuse); + + float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); + + float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; + _SpecularPower *= specularMap; + + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; + + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; + diffuseShaded = -diffuseShaded * 2 + 1; + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; + { + float3 hlslcc_movcTemp = shadingAdjustment; + hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; + hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; + hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; + shadingAdjustment = saturate(hlslcc_movcTemp); + } + float shadowExtendAnother = 1 - _ShadowExtendAnother; + float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; + + shadowExtendAnother -= kkMetal; + shadowExtendAnother += 1; + shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; + float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; + + diffuse = diffuse * _LineColorG; + float3 lineCol = -diffuse * shadowExtendShaded + 1; + diffuse *= shadowExtendShaded; + + float lineAlpha = _LineColorG.w - 0.5; + lineAlpha = -lineAlpha * 2.0 + 1.0; + lineCol = -lineAlpha * lineCol + 1; + lineAlpha = _LineColorG.w *2; + diffuse *= lineAlpha; + diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; + + float3 finalDiffuse = lerp(diffuse, _OutlineColor.rgb, _OutlineColor.a); + return float4(finalDiffuse, 1); + } + + ENDCG + } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Blend One OneMinusSrcAlpha, One OneMinusSrcAlpha + Cull [_CullOption] + + CGPROGRAM + #pragma target 3.0 + + #pragma vertex vert + #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define STUDIO_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #define KKP_EXPENSIVE_RAMP + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "KKPItemNormals.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + #include "../KKPReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPStudioItemFrag.cginc" + + ENDCG + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment shadowFrag + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define STUDIO_SHADER + + #include "UnityCG.cginc" + + #include "KKPItemInput.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(appdata_base v) + { + v2f o; + o.uv0 = v.texcoord; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + float4 shadowFrag(v2f i) : SV_Target + { + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + if(mainTexAlpha <= _Cutoff) + discard; + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Item/MainItemStudioPlus.shader.meta b/Shaders/Item/MainItemStudioPlus.shader.meta new file mode 100644 index 0000000..c99fae1 --- /dev/null +++ b/Shaders/Item/MainItemStudioPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 59ddb829fb390a5489ccefd105b41c19 +timeCreated: 1705725508 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainItemStudioPlusTess.shader b/Shaders/Item/MainItemStudioPlusTess.shader new file mode 100644 index 0000000..ea9e40b --- /dev/null +++ b/Shaders/Item/MainItemStudioPlusTess.shader @@ -0,0 +1,417 @@ +Shader "xukmi/MainItemStudioPlusTess" +{ + Properties + { + // Vanilla textures + _AnotherRamp ("Another Ramp(LineR)", 2D) = "white" {} + _ColorMask ("Color Mask", 2D) = "black" {} + _DetailMask ("Detail Mask", 2D) = "black" {} + _LineMask ("Line Mask", 2D) = "black" {} + _MainTex ("MainTex", 2D) = "white" {} + _NormalMap ("Normal Map", 2D) = "bump" {} + _PatternMask1 ("Pattern 1", 2D) = "white" {} + _PatternMask2 ("Pattern 2", 2D) = "white" {} + _PatternMask3 ("Pattern 3", 2D) = "white" {} + + // Additional textures + _NormalMapDetail ("Normal Map Detail", 2D) = "bump" {} + _EmissionMask ("Emission Mask", 2D) = "black" {} + + // Vanilla colors and vectors + [Gamma]_Color ("Color", Color) = (1,1,1,1) + [Gamma]_Color1_2 ("Col1 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color2 ("Color2", Color) = (1,1,1,1) + [Gamma]_Color2_2 ("Col2 Pattern Color", Color) = (1,1,1,1) + [Gamma]_Color3 ("Color3", Color) = (1,1,1,1) + [Gamma]_Color3_2 ("Col3 Pattern Color", Color) = (1,1,1,1) + [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + + _Patternuv1 ("Pattern 1 additional ST", Vector) = (0,0,1,1) + _Patternuv2 ("Pattern 2 additional ST", Vector) = (0,0,1,1) + _Patternuv3 ("Pattern 3 additional ST", Vector) = (0,0,1,1) + + // Additional colors and vectors + [Gamma]_EmissionColor("Emission Color", Color) = (1,1,1,1) + [Gamma]_SpecularColor ("Specular Color", Color) = (1,1,1,1) + [Gamma]_CustomAmbient("Custom Ambient", Color) = (0.666666666, 0.666666666, 0.666666666, 1) + [Gamma]_OutlineColor ("Outline Color", Color) = (0,0,0,0) + + // Vanilla toggles and floats + [MaterialToggle] _ambientshadowOFF ("Ambient Shadow OFF", Float) = 0 + [MaterialToggle] _AnotherRampFull ("Another Ramp Full", Float) = 0 + [MaterialToggle] _DetailBLineG ("DetailB LineG", Float) = 0 + [MaterialToggle] _DetailRLineR ("DetailR LineR", Float) = 0 + [MaterialToggle] _notusetexspecular ("not use tex specular", Float) = 0 + [MaterialToggle] _patternclamp1 ("Pattern 1 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp2 ("Pattern 2 tile clamp", Float) = 0 + [MaterialToggle] _patternclamp3 ("Pattern 3 tile clamp", Float) = 0 + + _EmissionPower("Emission Power", Float) = 1 + _LineWidthS ("LineWidthS", Float) = 1 + _patternrotator1 ("Pattern 1 rotation", Range(-1,1)) = 0 + _patternrotator2 ("Pattern 2 rotation", Range(-1,1)) = 0 + _patternrotator3 ("Pattern 3 rotation", Range(-1,1)) = 0 + _rimpower ("Rim Width", Range(0, 1)) = 0.5 + _rimV ("Rim Strength", Range(0, 1)) = 0.5 + _ShadowExtend ("Shadow Extend", Range(0, 1)) = 1 + _ShadowExtendAnother ("Shadow Extend Another", Range(0, 1)) = 1 + _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 + _SpecularPower ("Specular Power", Range(0, 1)) = 0 + + // Additional toggles and floats + [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 + [Enum(Off,0,On,1)] _OutlineOn ("Outline On", Float) = 1.0 + [MaterialToggle] _UseRampForLights ("Use Ramp For Light", Float) = 1 + [MaterialToggle] _UseRampForSpecular ("Use Ramp For Specular", Float) = 0 + [MaterialToggle] _UseLightColorSpecular ("Use Light Color Specular", Float) = 1 + [MaterialToggle] _UseDetailRAsSpecularMap ("Use DetailR as Specular Map", Float) = 0 + + _Cutoff ("Alpha cutoff", Range(0, 1)) = 0.5 + _DetailNormalMapScale ("Detail Normal Scale", Float) = 1 + _EmissionIntensity ("Emission Intensity", Float) = 0 + _NormalMapScale ("NormalMapScale", Float) = 1 + + // KKPrim properties + [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 + _KKPRimSoft ("Body Rim Softness", Float) = 1.5 + _KKPRimIntensity ("Body Rim Intensity", Float) = 0.75 + _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 + _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 + _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + // Matcap properties + _ReflectionMapCap("Mat Cap", 2D) = "black" {} + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _Reflective("Reflective", Range(0, 1)) = 0.75 + _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 + _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 + _UseMatCapReflection("Use Mat Cap", Range(0, 1)) = 1 + + // Tess properties + _TessTex ("Tess Tex", 2D) = "white" {} + _TessMax("Tess Max", Range(1, 25)) = 4 + _TessMin("Tess Min", Range(1, 25)) = 1 + _TessBias("Tess Distance Bias", Range(1, 100)) = 75 + _TessSmooth("Tess Smooth", Range(0, 1)) = 0 + _Tolerance("Tolerance", Range(0.0, 0.05)) = 0.0005 + _DisplaceTex("DisplacementTex", 2D) = "gray" {} + _DisplaceMultiplier("DisplaceMultiplier", float) = 0 + _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 + _DisplaceFull("Displace Full", Range(-1, 1)) = 0 + + _ShrinkVal("ShrinkVal", Range(0, 1)) = 1 + _ShrinkVerticalAdjust("Vertical Pos", Range(-1, 1)) = 0 + _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + + // Stuff added post-1.3.1 + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 + } + SubShader + { + LOD 600 + Tags { "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" } + //Outline + Pass + { + Name "Outline" + LOD 600 + Tags {"Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Cull Front + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment outlineFrag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define STUDIO_SHADER + #define TESS_MID + + #include "UnityCG.cginc" + #include "Lighting.cginc" + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "../KKPDisplace.cginc" + + Varyings vert (VertexData v) + { + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); + float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; + float viewVal = dot(viewDir, viewDir); + viewVal = sqrt(viewVal); + viewVal = viewVal * 0.0999999866 + 0.300000012; + float lineVal = _linewidthG * 0.00499999989; + viewVal *= lineVal; + float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); + float detailB = 1 - detailMask.b; + viewVal *= detailB * _LineWidthS; + float3 invertSquare; + float3 x; + float3 y; + float3 z; + x.x = unity_WorldToObject[0].x; + x.y = unity_WorldToObject[1].x; + x.z = unity_WorldToObject[2].x; + float xLen = rsqrt(dot(x, x)); + y.x = unity_WorldToObject[0].y; + y.y = unity_WorldToObject[1].y; + y.z = unity_WorldToObject[2].y; + float yLen = rsqrt(dot(y, y)); + z.x = unity_WorldToObject[0].z; + z.y = unity_WorldToObject[1].z; + z.z = unity_WorldToObject[2].z; + float zLen = rsqrt(dot(z, z)); + float3 view = viewVal / float3(xLen, yLen,zLen); + view = v.normal * view + v.vertex; + o.posCS = UnityObjectToClipPos(view); + //Big brain place offscreen + if(!_OutlineOn) + o.posCS = float4(2,2,2,1); + o.uv0 = v.uv0; + 1; + return o; + } + + #include "KKPItemTess.cginc" + + fixed4 outlineFrag (Varyings i) : SV_Target + { + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); + + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + float3 halfDir = normalize(viewDir + worldLightPos); + + float4 colorMask = SAMPLE_TEX2D(_ColorMask, i.uv0 * + _ColorMask_ST.xy + _ColorMask_ST.zw); + float3 color; + color = colorMask.r * (_Color.rgb - 1) + 1; + color = colorMask.g * (_Color2.rgb - color) + color; + color = colorMask.b * (_Color3.rgb - color) + color; + float3 diffuse = mainTex * color; + + float3 shadingAdjustment = ShadeAdjustItem(diffuse); + + float2 detailUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailUV); + + float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; + _SpecularPower *= specularMap; + + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.r = _DetailRLineR * (detailMask.r - lineMask.r) + lineMask.r; + + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; + diffuseShaded = -diffuseShaded * 2 + 1; + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; + { + float3 hlslcc_movcTemp = shadingAdjustment; + hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; + hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; + hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; + shadingAdjustment = saturate(hlslcc_movcTemp); + } + float shadowExtendAnother = 1 - _ShadowExtendAnother; + float kkMetal = _AnotherRampFull * (1 - lineMask.r) + lineMask.r; + + shadowExtendAnother -= kkMetal; + shadowExtendAnother += 1; + shadowExtendAnother = saturate(shadowExtendAnother) * 0.670000017 + 0.330000013; + float3 shadowExtendShaded = shadowExtendAnother * shadingAdjustment; + + diffuse = diffuse * _LineColorG; + float3 lineCol = -diffuse * shadowExtendShaded + 1; + diffuse *= shadowExtendShaded; + + float lineAlpha = _LineColorG.w - 0.5; + lineAlpha = -lineAlpha * 2.0 + 1.0; + lineCol = -lineAlpha * lineCol + 1; + lineAlpha = _LineColorG.w *2; + diffuse *= lineAlpha; + diffuse = 0.5 < _LineColorG.w ? lineCol : diffuse; + + float3 finalDiffuse = lerp(diffuse, _OutlineColor.rgb, _OutlineColor.a); + return float4(finalDiffuse, 1); + } + + ENDCG + } + + //Main Pass + Pass + { + Name "Forward" + LOD 600 + Tags { "LightMode" = "ForwardBase" "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Blend One OneMinusSrcAlpha, One OneMinusSrcAlpha + Cull [_CullOption] + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment frag + #pragma hull hull + #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define STUDIO_SHADER + + //Unity Includes + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + + #define KKP_EXPENSIVE_RAMP + + #include "KKPItemInput.cginc" + #include "KKPItemDiffuse.cginc" + #include "KKPItemNormals.cginc" + #include "../KKPDisplace.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPEmission.cginc" + #include "../KKPReflect.cginc" + + Varyings vert (VertexData v) + { + Varyings o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.posWS = mul(unity_ObjectToWorld, v.vertex); + o.posCS = mul(UNITY_MATRIX_VP, o.posWS); + o.normalWS = UnityObjectToWorldNormal(v.normal); + o.tanWS = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + float3 biTan = cross(o.tanWS, o.normalWS); + o.bitanWS = normalize(biTan); + o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif + return o; + } + + #include "KKPItemTess.cginc" + #include "KKPStudioItemFrag.cginc" + + ENDCG + } + + //ShadowCaster + Pass + { + Name "ShadowCaster" + LOD 600 + Tags { "LightMode" = "ShadowCaster" "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "ShadowSupport" = "true" } + Offset 1, 1 + Cull Off + + CGPROGRAM + #pragma target 5.0 + + #pragma vertex TessVert + #pragma fragment shadowFrag + #pragma hull hull + #pragma domain domain + #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #define SHADOW_CASTER_PASS + #define STUDIO_SHADER + #define TESS_LOW + + #include "UnityCG.cginc" + + #include "KKPItemInput.cginc" + #include "../KKPDisplace.cginc" + + struct v2f { + float2 uv0 : TEXCOORD1; + V2F_SHADOW_CASTER; + }; + + v2f vert(VertexData v) + { + v2f o; + + float4 vertex = v.vertex; + float3 normal = v.normal; + DisplacementValues(v, vertex, normal); + v.vertex = vertex; + v.normal = normal; + + o.uv0 = v.uv0; + TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) + return o; + } + + float4 shadowFrag(v2f i) : SV_Target + { + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + if(mainTexAlpha <= _Cutoff) + discard; + SHADOW_CASTER_FRAGMENT(i) + } + + #include "KKPItemTess.cginc" + + ENDCG + } + } + Fallback "Unlit/Texture" +} diff --git a/Shaders/Item/MainItemStudioPlusTess.shader.meta b/Shaders/Item/MainItemStudioPlusTess.shader.meta new file mode 100644 index 0000000..face538 --- /dev/null +++ b/Shaders/Item/MainItemStudioPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9f7dc4b00a87990408e507d084be3351 +timeCreated: 1705725508 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainOpaquePlus.shader b/Shaders/Item/MainOpaquePlus.shader index 6084251..2f83cf1 100644 --- a/Shaders/Item/MainOpaquePlus.shader +++ b/Shaders/Item/MainOpaquePlus.shader @@ -13,6 +13,7 @@ Shader "xukmi/MainOpaquePlus" [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,1) _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 _SpecularPower ("Specular Power", Range(0, 1)) = 0 @@ -50,6 +51,7 @@ Shader "xukmi/MainOpaquePlus" [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 _LineWidthS ("LineWidthS", Float) = 1 _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 @@ -64,6 +66,18 @@ Shader "xukmi/MainOpaquePlus" _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -79,7 +93,8 @@ Shader "xukmi/MainOpaquePlus" CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment outlineFrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -99,7 +114,7 @@ Shader "xukmi/MainOpaquePlus" float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB * _LineWidthS; float3 invertSquare; @@ -125,15 +140,17 @@ Shader "xukmi/MainOpaquePlus" if(!_OutlineOn) o.posCS = float4(2,2,2,1); o.uv0 = v.uv0; + 1; return o; } - fixed4 frag (Varyings i) : SV_Target + fixed4 outlineFrag (Varyings i) : SV_Target { - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); float3 diffuse = mainTex.rgb; @@ -164,13 +181,13 @@ Shader "xukmi/MainOpaquePlus" shadingAdjustment = saturate(hlslcc_movcTemp); } float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; _SpecularPower *= specularMap; float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); float detailLine = detailMask.x - lineMask.x; detailLine = _DetailRLineR * detailLine + lineMask; @@ -195,7 +212,6 @@ Shader "xukmi/MainOpaquePlus" finalDiffuse = saturate(finalDiffuse); float3 outLineCol = _LightColor0.rgb * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; - float3 finalColor = finalDiffuse * outLineCol; finalColor = lerp(finalColor, _OutlineColor.rgb, _OutlineColor.a); return float4(finalColor, 1.0); @@ -223,6 +239,7 @@ Shader "xukmi/MainOpaquePlus" #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -236,7 +253,7 @@ Shader "xukmi/MainOpaquePlus" #include "KKPItemInput.cginc" #include "KKPItemDiffuse.cginc" #include "KKPItemNormals.cginc" - #include "KKPItemCoom.cginc" + #include "../KKPCoom.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" @@ -281,19 +298,13 @@ Shader "xukmi/MainOpaquePlus" CGPROGRAM #pragma vertex vert - #pragma fragment frag + #pragma fragment shadowFrag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" - sampler2D _MainTex; - float4 _MainTex_ST; - sampler2D _AlphaMask; - float4 _AlphaMask_ST; - - float _alpha_a; - float _alpha_b; - + #include "KKPItemInput.cginc" struct v2f { float2 uv0 : TEXCOORD1; @@ -308,12 +319,12 @@ Shader "xukmi/MainOpaquePlus" return o; } - float4 frag(v2f i) : SV_Target + float4 shadowFrag(v2f i) : SV_Target { float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); - float mainTexAlpha = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); alphaVal *= mainTexAlpha; diff --git a/Shaders/Item/MainOpaquePlus.shader.meta b/Shaders/Item/MainOpaquePlus.shader.meta new file mode 100644 index 0000000..ecedfff --- /dev/null +++ b/Shaders/Item/MainOpaquePlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fe91f80e337b9f4478bda3ed090fba9f +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Item/MainOpaquePlusTess.shader b/Shaders/Item/MainOpaquePlusTess.shader index 2cb2556..0e44452 100644 --- a/Shaders/Item/MainOpaquePlusTess.shader +++ b/Shaders/Item/MainOpaquePlusTess.shader @@ -1,7 +1,7 @@ Shader "xukmi/MainOpaquePlusTess" { Properties - { + { _AnotherRamp ("Another Ramp(LineR)", 2D) = "white" {} _MainTex ("MainTex", 2D) = "white" {} _NormalMap ("Normal Map", 2D) = "bump" {} @@ -13,6 +13,7 @@ [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,1) _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 _SpecularPower ("Specular Power", Range(0, 1)) = 0 @@ -50,6 +51,7 @@ [Enum(Off,0,Front,1,Back,2)] _CullOption ("Cull Option", Range(0, 2)) = 0 _LineWidthS ("LineWidthS", Float) = 1 _Reflective("Reflective", Range(0, 1)) = 0.75 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) _ReflectiveBlend("Reflective Blend", Range(0, 1)) = 0.05 _ReflectiveMulOrAdd("Mul Or Add", Range(0, 1)) = 1 _UseKKMetal("Use KK Metal", Range(0, 1)) = 1 @@ -79,8 +81,18 @@ _ShrinkVal("ShrinkVal", Range(0, 1)) = 1 _ShrinkVerticalAdjust("Vertical Pos", Range(-1, 1)) = 0 _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) - - + + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMapDetail ("Reflect Body Mask/Map", 2D) = "white" {} + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + [Enum(Off,0,On,1)]_ReflectiveOverlayed ("Reflections Overlayed", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -98,9 +110,10 @@ #pragma target 5.0 #pragma vertex TessVert - #pragma fragment frag + #pragma fragment outlineFrag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -126,7 +139,7 @@ float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB * _LineWidthS; float3 invertSquare; @@ -152,15 +165,17 @@ if(!_OutlineOn) o.posCS = float4(2,2,2,1); o.uv0 = v.uv0; + 1; return o; } #include "KKPItemTess.cginc" - fixed4 frag (Varyings i) : SV_Target + fixed4 outlineFrag (Varyings i) : SV_Target { - float4 mainTex = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); + //Clips based on alpha texture + float4 mainTex = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw); AlphaClip(i.uv0, _OutlineOn ? mainTex.a : 0); float3 diffuse = mainTex.rgb; @@ -191,13 +206,13 @@ shadingAdjustment = saturate(hlslcc_movcTemp); } float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; _SpecularPower *= specularMap; float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); float detailLine = detailMask.x - lineMask.x; detailLine = _DetailRLineR * detailLine + lineMask; @@ -251,6 +266,7 @@ #pragma fragment frag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -265,7 +281,7 @@ #include "../KKPDisplace.cginc" #include "KKPItemDiffuse.cginc" #include "KKPItemNormals.cginc" - #include "KKPItemCoom.cginc" + #include "../KKPCoom.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" #include "../KKPEmission.cginc" @@ -321,10 +337,11 @@ #pragma target 5.0 #pragma vertex TessVert - #pragma fragment frag + #pragma fragment shadowFrag #pragma hull hull #pragma domain domain #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #define SHADOW_CASTER_PASS @@ -350,12 +367,12 @@ return o; } #include "KKPItemTess.cginc" - float4 frag(v2f i) : SV_Target + float4 shadowFrag(v2f i) : SV_Target { float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); - float mainTexAlpha = tex2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; + float mainTexAlpha = SAMPLE_TEX2D(_MainTex, i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw).a; alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); alphaVal *= mainTexAlpha; diff --git a/Shaders/Item/MainOpaquePlusTess.shader.meta b/Shaders/Item/MainOpaquePlusTess.shader.meta new file mode 100644 index 0000000..72df51e --- /dev/null +++ b/Shaders/Item/MainOpaquePlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0424c4cb2dc0e91489386a71575905d0 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPCoom.cginc b/Shaders/KKPCoom.cginc similarity index 87% rename from Shaders/Skin/KKPCoom.cginc rename to Shaders/KKPCoom.cginc index 22f4e0f..5e50c07 100644 --- a/Shaders/Skin/KKPCoom.cginc +++ b/Shaders/KKPCoom.cginc @@ -5,11 +5,11 @@ void GetCumVals(float2 uv, out float mask, out float3 normal){ float2 liquidUV = uv * _LiquidTiling.zw + _LiquidTiling.xy; float2 liquidUV2 = liquidUV * _Texture3_ST.xy + _Texture3_ST.zw; liquidUV = liquidUV * _Texture2_ST.xy + _Texture2_ST.zw; - float4 liquidTex = tex2D(_Texture2, liquidUV); + float4 liquidTex = SAMPLE_TEX2D(_Texture2, liquidUV); float liquidValTop = max(saturate(_liquidftop - 1.0) * liquidTex.y, saturate(_liquidftop) * liquidTex.x); float2 liquidMaskUV = uv * _liquidmask_ST.xy + _liquidmask_ST.zw; - float4 liquidMaskTex = tex2D(_liquidmask, liquidMaskUV); + float4 liquidMaskTex = SAMPLE_TEX2D_SAMPLER(_liquidmask, _Texture2, liquidMaskUV); float3 liquidMaskVals = max(liquidMaskTex.zzy, liquidMaskTex.yxx); liquidMaskVals = liquidMaskTex.rgb - liquidMaskVals; liquidMaskTex.xy = min(liquidMaskTex.yz, liquidMaskTex.xy); @@ -28,7 +28,7 @@ void GetCumVals(float2 uv, out float mask, out float3 normal){ liquidFinalMask = max(liquidFinalMask, liquidButtBLegs.y); //Normal - float3 liquidNormal = UnpackNormal(tex2D(_Texture3, liquidUV2)); + float3 liquidNormal = UnpackNormal(SAMPLE_TEX2D_SAMPLER(_Texture3, _Texture2, liquidUV2)); mask = liquidFinalMask; normal = liquidNormal; diff --git a/Shaders/KKPCoom.cginc.meta b/Shaders/KKPCoom.cginc.meta new file mode 100644 index 0000000..34af6b3 --- /dev/null +++ b/Shaders/KKPCoom.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ef74dd4827d3437458339d4ba610fa9f +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/KKPDeclarations.cginc b/Shaders/KKPDeclarations.cginc new file mode 100644 index 0000000..05b5a3e --- /dev/null +++ b/Shaders/KKPDeclarations.cginc @@ -0,0 +1,14 @@ +// (?<=\s{3})1+(?=;$) + +#ifndef KKP_DECLARATIONS +#define KKP_DECLARATIONS + +#define DECLARE_TEX2D(tex) Texture2D tex; SamplerState sampler##tex +#define DECLARE_TEX2D_NOSAMPLER(tex) Texture2D tex + +#define SAMPLE_TEX2D(tex,coord) tex.Sample (sampler##tex,coord) +#define SAMPLE_TEX2D_LOD(tex,coord,lod) tex.SampleLevel (sampler##tex,coord,lod) +#define SAMPLE_TEX2D_SAMPLER(tex,samplertex,coord) tex.Sample (sampler##samplertex,coord) +#define SAMPLE_TEX2D_SAMPLER_LOD(tex,samplertex,coord,lod) tex.SampleLevel (sampler##samplertex,coord,lod) + +#endif \ No newline at end of file diff --git a/Shaders/KKPDeclarations.cginc.meta b/Shaders/KKPDeclarations.cginc.meta new file mode 100644 index 0000000..9cdea5d --- /dev/null +++ b/Shaders/KKPDeclarations.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e2a5fa970879d794598816acfe1e89ff +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/KKPDisplace.cginc b/Shaders/KKPDisplace.cginc index fb497ed..efc998f 100644 --- a/Shaders/KKPDisplace.cginc +++ b/Shaders/KKPDisplace.cginc @@ -1,7 +1,7 @@ #ifndef KKP_DISPLACE_INC #define KKP_DISPLACE_INC -sampler2D _DisplaceTex; +DECLARE_TEX2D(_DisplaceTex); float4 _DisplaceTex_ST; float4 _DisplaceTex_TexelSize; float _DisplaceMultiplier; @@ -13,8 +13,23 @@ float _DisplaceFull; float4 _Clock; #endif +#ifdef ITEM_SHADER +float4 _ClockDisp; +#endif + +#define ROTATEUV +float2 rotateUV(float2 uv, float2 pivot, float rotation) { + float cosa = cos(rotation); + float sina = sin(rotation); + uv -= pivot; + return float2( + cosa * uv.x - sina * uv.y, + cosa * uv.y + sina * uv.x + ) + pivot; +} + float DisplaceVal(float2 uv, float2 offset, float2 texelSize){ - float4 displaceTex = tex2Dlod(_DisplaceTex, float4(uv, 0, 0) + float4(texelSize * offset, 0, 0)); + float4 displaceTex = SAMPLE_TEX2D_LOD(_DisplaceTex, float4(uv, 0, 0) + float4(texelSize * offset, 0, 0), 0); float displaceVal = displaceTex.r; //Gamma correction displaceVal = pow(displaceVal, 0.454545); @@ -22,11 +37,15 @@ float DisplaceVal(float2 uv, float2 offset, float2 texelSize){ displaceVal += _DisplaceFull; //Can animate via rendereditor since _Clock is an exposed variable +#ifdef ITEM_SHADER + float displacementAnimation = _ClockDisp.w; +#else float displacementAnimation = _Clock.w; +#endif return displaceVal * displacementAnimation; } -float3 normalsFromHeight(sampler2D heightTex, float2 uv, float2 texelSize) +float3 normalsFromHeight(float2 uv, float2 texelSize) { float4 h; h[0] = DisplaceVal(uv, float2( 0,-1), texelSize); @@ -41,13 +60,19 @@ float3 normalsFromHeight(sampler2D heightTex, float2 uv, float2 texelSize) return normalize(n); } - - - void DisplacementValues(VertexData v, inout float4 vertex, inout float3 normal){ - float3 displace = DisplaceVal(v.uv0 * _DisplaceTex_ST.xy + _DisplaceTex_ST.zw + _Clock.xy, 0, 0); + float2 displaceUV = v.uv0 * _DisplaceTex_ST.xy + _DisplaceTex_ST.zw; +#ifdef MOVE_PUPILS + displaceUV = rotateUV(displaceUV, float2(0.5, 0.5), -_rotation*6.28318548); + displaceUV = displaceUV * _MainTex_ST.xy + _MainTex_ST.zw; +#endif +#ifdef ITEM_SHADER + float3 displace = DisplaceVal(displaceUV + _ClockDisp.xy, 0, 0); +#else + float3 displace = DisplaceVal(displaceUV + _Clock.xy, 0, 0); +#endif #ifndef SHADOW_CASTER_PASS - float3 bumpnormal = normalsFromHeight(_DisplaceTex, v.uv0 * _DisplaceTex_ST.xy + _DisplaceTex_ST.zw, _DisplaceTex_TexelSize.xy); + float3 bumpnormal = normalsFromHeight(displaceUV, _DisplaceTex_TexelSize.xy); bumpnormal.xyz = bumpnormal.xzy; float3 mergedNormals = BlendNormals(normal, bumpnormal); normal = mergedNormals; diff --git a/Shaders/KKPDisplace.cginc.meta b/Shaders/KKPDisplace.cginc.meta new file mode 100644 index 0000000..918c490 --- /dev/null +++ b/Shaders/KKPDisplace.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1be984a448859cd439adfa0f5c35704a +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/KKPEmission.cginc b/Shaders/KKPEmission.cginc index fb1ca02..f63ddc1 100644 --- a/Shaders/KKPEmission.cginc +++ b/Shaders/KKPEmission.cginc @@ -1,16 +1,15 @@ #ifndef KKP_EMISSION_INC #define KKP_EMISSION_INC -sampler2D _EmissionMask; +DECLARE_TEX2D(_EmissionMask); float4 _EmissionMask_ST; float4 _EmissionColor; float _EmissionIntensity; - float4 GetEmission(float2 uv){ float2 emissionUV = uv * _EmissionMask_ST.xy + _EmissionMask_ST.zw; - float4 emissionMask = tex2D(_EmissionMask, emissionUV); - float3 emissionCol = _EmissionColor.rgb * _EmissionIntensity * emissionMask.rgb; + float4 emissionMask = SAMPLE_TEX2D(_EmissionMask, emissionUV); + float3 emissionCol = _EmissionColor.rgb * _EmissionIntensity * emissionMask.rgb; return float4(emissionCol, emissionMask.a * _EmissionColor.a); } diff --git a/Shaders/KKPEmission.cginc.meta b/Shaders/KKPEmission.cginc.meta new file mode 100644 index 0000000..6ef2c05 --- /dev/null +++ b/Shaders/KKPEmission.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4b3c091e5fa5f844abfa620a9986b6c5 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPLighting.cginc b/Shaders/KKPLighting.cginc similarity index 88% rename from Shaders/Skin/KKPLighting.cginc rename to Shaders/KKPLighting.cginc index 6362717..9f17d06 100644 --- a/Shaders/Skin/KKPLighting.cginc +++ b/Shaders/KKPLighting.cginc @@ -1,7 +1,6 @@ #ifndef KKP_LIGHTING_INC #define KKP_LIGHTING_INC - //Specular float GetDrawnSpecular(Varyings i, float4 detailMask, float shadowAttenuation, float3 viewDir, out float3 drawnSpecularColor){ float specularHeight = _SpeclarHeight - 1.0; @@ -12,7 +11,7 @@ float GetDrawnSpecular(Varyings i, float4 detailMask, float shadowAttenuation, f float2 detailMaskUV2 = specularHeight * detailSpecularOffset + i.uv0; detailMaskUV2 = detailMaskUV2 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask2 = tex2D(_DetailMask, detailMaskUV2); + float4 detailMask2 = SAMPLE_TEX2D(_DetailMask, detailMaskUV2); float detailSpecular = saturate(detailMask2.x * 1.66666698); float squaredDetailSpecular = detailSpecular * detailSpecular; float specularUnder = -detailSpecular * squaredDetailSpecular + detailSpecular; @@ -32,8 +31,7 @@ float GetDrawnSpecular(Varyings i, float4 detailMask, float shadowAttenuation, f return dotSpecCol; } - -float GetMeshSpecular(KKVertexLight vertexLights[4], float3 normal, float3 viewDir, float3 worldLightPos, out float3 specularColorMesh){ +float GetMeshSpecular(Varyings i, KKVertexLight vertexLights[4], float3 normal, float3 viewDir, float3 worldLightPos, out float3 specularColorMesh){ float3 halfVector = normalize(viewDir + worldLightPos); float specularMesh = max(dot(halfVector, normal), 0.0); specularMesh = log2(specularMesh); @@ -44,24 +42,21 @@ float GetMeshSpecular(KKVertexLight vertexLights[4], float3 normal, float3 viewD #ifdef KKP_EXPENSIVE_RAMP float2 lightRampUV = specularPowerMesh * _RampG_ST.xy + _RampG_ST.zw; - specularPowerMesh = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + specularPowerMesh * (1 - _UseRampForSpecular); + specularPowerMesh = SAMPLE_TEX2D(_RampG, lightRampUV) * _UseRampForSpecular + specularPowerMesh * (1 - _UseRampForSpecular); #endif float3 specularColor = _UseLightColorSpecular ? _LightColor0.rgb * _SpecularColor.a: _SpecularColor.rgb * _SpecularColor.a; specularColorMesh = specularPowerMesh * specularColor; - #ifdef VERTEXLIGHT_ON float3 specularColorVertex = 0; specularMesh += GetVertexSpecularDiffuse(vertexLights, normal, viewDir, _SpecularPower, specularColorVertex); specularColorMesh += specularColorVertex; #endif - return specularMesh; } - float GetLambert(float3 lightPos, float3 normal){ return max(dot(lightPos, normal), 0.0); } @@ -72,7 +67,7 @@ float GetShadowAttenuation(Varyings i, float vertexLightingShadowAtten, float3 n //Normal adjustment for the face I suppose it keeps the face more lit? float3 viewNorm = viewDir - normal; float2 normalMaskUV = i.uv0 * _NormalMask_ST.xy + _NormalMask_ST.zw; - float3 normalMask = tex2D(_NormalMask, normalMaskUV).rgb; + float3 normalMask = SAMPLE_TEX2D(_NormalMask, normalMaskUV).rgb; normalMask.xy = normalMask.yz * float2(_FaceNormalG, _FaceShadowG); viewNorm = normalMask.x * viewNorm + normal; float maskG = max(normalMask.g, 1.0); @@ -93,14 +88,8 @@ float GetShadowAttenuation(Varyings i, float vertexLightingShadowAtten, float3 n float vertexShadows = vertexLightingShadowAtten; float blendShadows = max(vertexShadows, lambertShadows); float2 rampUV = blendShadows * _RampG_ST.xy + _RampG_ST.zw; - float ramp = tex2D(_RampG, rampUV).x * rampAtten; - - + float ramp = SAMPLE_TEX2D(_RampG, rampUV).x * rampAtten; return ramp; - } - - - #endif \ No newline at end of file diff --git a/Shaders/KKPLighting.cginc.meta b/Shaders/KKPLighting.cginc.meta new file mode 100644 index 0000000..f8d035e --- /dev/null +++ b/Shaders/KKPLighting.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a40897d9d868eb940b7aa11d7fafbeb0 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/KKPReflect.cginc b/Shaders/KKPReflect.cginc index b22febe..d6238aa 100644 --- a/Shaders/KKPReflect.cginc +++ b/Shaders/KKPReflect.cginc @@ -1,32 +1,67 @@ #ifndef KKP_REFLECT_INC #define KKP_REFLECT_INC +float4 _ReflectCol; +float _ReflectColMix; +float _DisableShadowedMatcap; + float _Reflective; float _ReflectiveBlend; float _ReflectiveMulOrAdd; +float _ReflectiveOverlayed; float _UseMatCapReflection; -sampler2D _ReflectionMapCap; +DECLARE_TEX2D(_ReflectionMapCap); +float4 _ReflectionMapCap_ST; + +float _ReflectRotation; +DECLARE_TEX2D_NOSAMPLER(_ReflectMapDetail); +float4 _ReflectMapDetail_ST; -float3 GetBlendReflections(float3 diffuse, float3 normal, float3 viewDir, float metallicMap){ +#ifndef ROTATEUV +float2 rotateUV(float2 uv, float2 pivot, float rotation) { + float cosa = cos(rotation); + float sina = sin(rotation); + uv -= pivot; + return float2( + cosa * uv.x - sina * uv.y, + cosa * uv.y + sina * uv.x + ) + pivot; +} +#endif + +float3 GetBlendReflections(Varyings i, float3 diffuse, float3 normal, float3 viewDir, float metallicMap, float lightAmount = 1){ + _ReflectiveBlend *= _ReflectCol.a; + float4 reflectDetail = SAMPLE_TEX2D_SAMPLER(_ReflectMapDetail, _MainTex, (i.uv0 *_ReflectMapDetail_ST.xy) + _ReflectMapDetail_ST.zw); + float reflectMap = reflectDetail.r; + float reflectMask = reflectDetail.g; + float3 reflectionDir = reflect(-viewDir, normal); float roughness = 1 - (metallicMap * _Reflective); roughness *= 1.7 - 0.7 * roughness; float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS); - float3 env = DecodeHDR(envSample, unity_SpecCube0_HDR) * _ReflectiveBlend; + float3 env = DecodeHDR(envSample, unity_SpecCube0_HDR) * _ReflectiveBlend ; float3 viewNormal = mul((float3x3)UNITY_MATRIX_V, normal); - float2 matcapUV = viewNormal.xy * 0.5 + 0.5; - float3 matcap = tex2D(_ReflectionMapCap, matcapUV).rgb * _ReflectiveBlend; - matcap = pow(matcap, 0.454545); - env = lerp(env, matcap, _UseMatCapReflection); + float2 matcapUV = viewNormal.xy * 0.5 * _ReflectionMapCap_ST.xy + 0.5 + _ReflectionMapCap_ST.zw; + matcapUV = rotateUV(matcapUV, float2(0.5, 0.5), radians(_ReflectRotation)); + + float4 matcap = SAMPLE_TEX2D(_ReflectionMapCap, matcapUV); + matcap = pow(matcap, 0.454545) * _ReflectiveBlend; + env = lerp(env, matcap, _UseMatCapReflection * reflectMask); + env = lerp(env, env * _ReflectCol.rgb, _ReflectColMix); + + float matCapAttenuation = 1 - (1 - lightAmount) * _DisableShadowedMatcap; //Yes, this is dumb - float3 envMul = env * diffuse; - float3 envAdd = env + diffuse; - env = lerp(envMul, envAdd, _ReflectiveMulOrAdd); - diffuse = lerp(diffuse, env, (metallicMap) * (1 - _UseKKMetal)); - return diffuse; + float3 envMul = (1 - (1 - env) * _ReflectiveBlend) * diffuse; + float3 envAdd = env + lerp(diffuse, diffuse * _ReflectCol.rgb, _ReflectiveBlend); + float3 envNormal = lerp(envMul, envAdd, _ReflectiveMulOrAdd); + float3 envOverlayed = env + (1-_ReflectiveBlend)*diffuse; + env = lerp(envNormal,envOverlayed,_ReflectiveOverlayed); + + diffuse = lerp(diffuse, env, (metallicMap) * (1 - _UseKKMetal) * matCapAttenuation * reflectMap); + return max(diffuse, 1E-06); } #endif \ No newline at end of file diff --git a/Shaders/KKPReflect.cginc.meta b/Shaders/KKPReflect.cginc.meta new file mode 100644 index 0000000..3a6010d --- /dev/null +++ b/Shaders/KKPReflect.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f4417fe1696580249b78c40caf361237 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/KKPVertexLights.cginc b/Shaders/KKPVertexLights.cginc index 7561e24..2cdf852 100644 --- a/Shaders/KKPVertexLights.cginc +++ b/Shaders/KKPVertexLights.cginc @@ -13,8 +13,7 @@ struct KKVertexLight{ float lightValNoAtten; }; - -void GetVertexLights(out KKVertexLight lights[4], float3 surfaceWorldPos){ +void GetVertexLights(out KKVertexLight lights[4], float3 surfaceWorldPos) { [unroll] for(int i = 0; i < 4; i++){ KKVertexLight kLight; @@ -25,11 +24,27 @@ void GetVertexLights(out KKVertexLight lights[4], float3 surfaceWorldPos){ kLight.dir = normalize(dir); kLight.col = unity_LightColor[i]; float distSqr = max(dot(dir, dir), 0.0001); + kLight.atten = 1.0 / (1.0 + unity_4LightAtten0[i] * distSqr); lights[i] = kLight; } } +void GetVertexLightsTwo(out KKVertexLight lights[4], float3 surfaceWorldPos, float disablePointLights) { + [unroll] + for(int i = 0; i < 4; i++){ + KKVertexLight kLight; + kLight.pos = float3(unity_4LightPosX0[i], + unity_4LightPosY0[i], + unity_4LightPosZ0[i]); + float3 dir = kLight.pos - surfaceWorldPos; + kLight.dir = normalize(dir); + kLight.col = unity_LightColor[i]; + float distSqr = max(dot(dir, dir), 0.0001); + kLight.atten = (1.0 - disablePointLights) / (1.0 + unity_4LightAtten0[i] * distSqr); + lights[i] = kLight; + } +} float LumaGrayscale(float3 col){ return col.r * 0.2126 + col.g * 0.7152 + col.b * 0.0722; @@ -39,12 +54,10 @@ float MaxGrayscale(float3 col){ return max(col.r, max(col.g, col.b)); } - - float4 GetVertexLighting(inout KKVertexLight lights[4], float3 normal){ float4 finalOutput = 0; [unroll] - for(int i = 0; i < 4; i++){ + for(int i = 0; i < 4; i++) { KKVertexLight light = lights[i]; float dotProduct = dot(normal, light.dir); float lighting = dotProduct * light.atten; @@ -54,7 +67,7 @@ float4 GetVertexLighting(inout KKVertexLight lights[4], float3 normal){ finalOutput.rgb += lightCol; finalOutput.a += saturate(MaxGrayscale(lightCol)); } - finalOutput.rgb = max(0.0, finalOutput.rgb); + finalOutput.rgb = clamp(finalOutput.rgb, 0.0, 1.0); return finalOutput; } @@ -66,7 +79,7 @@ float3 GetRampLighting(inout KKVertexLight lights[4], float3 normal, float ramp) #ifdef KKP_EXPENSIVE_RAMP float lighting = light.lightValNoAtten; float2 lightRampUV = lighting * _RampG_ST.xy + _RampG_ST.zw; - float lightRamp = tex2D(_RampG, lightRampUV).x; + float lightRamp = SAMPLE_TEX2D(_RampG, lightRampUV).x; float atten = smoothstep(0.04, 0.041, light.atten); lighting = saturate(lightRamp * atten); #else diff --git a/Shaders/KKPVertexLights.cginc.meta b/Shaders/KKPVertexLights.cginc.meta new file mode 100644 index 0000000..4083b1d --- /dev/null +++ b/Shaders/KKPVertexLights.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cff46fa7b042d7d4e85275e21d38dcf9 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/KKPVertexLightsSpecular.cginc b/Shaders/KKPVertexLightsSpecular.cginc index 1f4624b..d3e7296 100644 --- a/Shaders/KKPVertexLightsSpecular.cginc +++ b/Shaders/KKPVertexLightsSpecular.cginc @@ -17,10 +17,10 @@ float GetVertexSpecularDiffuse(KKVertexLight lights[4], float3 normal, float3 vi vertexSpecularPower = saturate(exp2(vertexSpecularPower) * specularPower * _SpecularColor.a); vertexLightSpecular = exp2(vertexLightSpecular * 256) * 1; - float3 vertexSpecularColor = _UseLightColorSpecular ? light.col.rgb * _SpecularColor.a: light.lightVal * _SpecularColor.rgb * _SpecularColor.a; + float3 vertexSpecularColor = _UseLightColorSpecular ? light.col.rgb * _SpecularColor.a : light.lightVal * _SpecularColor.rgb * _SpecularColor.a; #ifdef KKP_EXPENSIVE_RAMP float2 lightRampUV = vertexSpecularPower * _RampG_ST.xy + _RampG_ST.zw; - vertexSpecularPower = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + vertexSpecularPower * (1 - _UseRampForSpecular); + vertexSpecularPower = SAMPLE_TEX2D(_RampG, lightRampUV) * _UseRampForSpecular + vertexSpecularPower * (1 - _UseRampForSpecular); #endif vertexSpecularColor = vertexSpecularPower * vertexSpecularColor; @@ -52,7 +52,7 @@ float4 GetVertexSpecularHair(KKVertexLight lights[4], float3 normal, float3 view float3 vertexSpecularColor = _UseLightColorSpecular ? light.col.rgb * _SpecularColor.a: light.lightVal * _SpecularColor.rgb * _SpecularColor.a; #ifdef KKP_EXPENSIVE_RAMP float2 lightRampUV = vertexSpecularPower * _RampG_ST.xy + _RampG_ST.zw; - vertexSpecularPower = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + vertexSpecularPower * (1 - _UseRampForSpecular); + vertexSpecularPower = SAMPLE_TEX2D(_RampG, lightRampUV) * _UseRampForSpecular + vertexSpecularPower * (1 - _UseRampForSpecular); #endif vertexSpecularColor = vertexSpecularPower * vertexSpecularColor * light.lightVal; @@ -79,7 +79,7 @@ float4 GetVertexSpecular(KKVertexLight lights[4], float3 normal, float3 viewDir, float3 vertexSpecularColor = _UseLightColorSpecular ? light.col.rgb * _SpecularColor.a: light.lightVal * _SpecularColor.rgb * _SpecularColor.a; #ifdef KKP_EXPENSIVE_RAMP float2 lightRampUV = vertexSpecularPower * _RampG_ST.xy + _RampG_ST.zw; - vertexSpecularPower = tex2D(_RampG, lightRampUV) * _UseRampForSpecular + vertexSpecularPower * (1 - _UseRampForSpecular); + vertexSpecularPower = SAMPLE_TEX2D(_RampG, lightRampUV) * _UseRampForSpecular + vertexSpecularPower * (1 - _UseRampForSpecular); #endif vertexSpecularColor = vertexSpecularPower * vertexSpecularColor * light.lightVal; diff --git a/Shaders/KKPVertexLightsSpecular.cginc.meta b/Shaders/KKPVertexLightsSpecular.cginc.meta new file mode 100644 index 0000000..586eec9 --- /dev/null +++ b/Shaders/KKPVertexLightsSpecular.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 061ca280ff66c0646a3d532e7fbb1fb8 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin.meta b/Shaders/Skin.meta new file mode 100644 index 0000000..8c13150 --- /dev/null +++ b/Shaders/Skin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4d87910effb798a4cb86c4a3d62d837b +folderAsset: yes +timeCreated: 1705466960 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPDiffuse.cginc b/Shaders/Skin/KKPDiffuse.cginc index 3c948d1..38569ea 100644 --- a/Shaders/Skin/KKPDiffuse.cginc +++ b/Shaders/Skin/KKPDiffuse.cginc @@ -101,7 +101,7 @@ void MapValuesOutline(float3 col, out float3 a){ void AlphaClip(float2 uv, bool outline){ //Body alpha mask from outfits float2 alphaUV = uv * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x) * outline; @@ -111,7 +111,40 @@ void AlphaClip(float2 uv, bool outline){ discard; } +float3 HUEtoRGB(in float H) +{ + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R,G,B)); +} + +float Epsilon = 1e-10; +float3 RGBtoHCV(in float3 RGB) +{ + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0/3.0) : float4(RGB.gb, 0.0, -1.0/3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); +} + +float3 RGBtoHSL(in float3 RGB) +{ + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); +} +float3 HSLtoRGB(in float3 HSL) +{ + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return (RGB - 0.5) * C + HSL.z; +} //Anything affected by lighting + float3 GetDiffuse(Varyings i){ //Nipple params float2 boobUV = i.uv1 - 0.5f; @@ -126,7 +159,7 @@ float3 GetDiffuse(Varyings i){ //Nipple for body, lipstick for face float2 overtex1UV = _nip * nippleUV2 + nippleMaskUV; overtex1UV = overtex1UV * _overtex1_ST.xy + _overtex1_ST.zw; - float4 overTex1 = tex2D(_overtex1, overtex1UV); + float4 overTex1 = SAMPLE_TEX2D(_overtex1, overtex1UV); float nipSpec = overTex1.y * _nip_specular; float3 overTex1Spec = nipSpec * float3(0.330000013, 0.330000013, 0.330000013) + _overcolor1.xyz; float4 overTex1Col = overTex1 * _overcolor1; @@ -134,23 +167,41 @@ float3 GetDiffuse(Varyings i){ float mask = saturate(_tex1mask); overTex1.rgb = mask * overTex1.rgb + overTex1Col; - //Maintex and blend overTex1 + //Maintex float2 mainTexUV = i.uv0 * _MainTex_ST.xy + _MainTex_ST.zw; - float4 mainTex = tex2D(_MainTex, mainTexUV); + float4 mainTex = SAMPLE_TEX2D(_MainTex, mainTexUV); + + //Color MainTex + _Col0 = max(_Col0, 1E-06); + _Col1 = max(_Col1, 1E-06); + _Col2 = max(_Col2, 1E-06); + _Col3 = max(_Col3, 1E-06); + + float2 colorUV = i.uv0 * _ColMask_ST.xy + _ColMask_ST.zw; + float4 colorMask = SAMPLE_TEX2D_SAMPLER(_ColMask, _MainTex, colorUV); + + float3 color = _Col0; + color = colorMask.r * (_Col1 - color) + color; + color = colorMask.g * (_Col2 - color) + color; + color = colorMask.b * (_Col3 - color) + color; + + mainTex.rgb = mainTex.rgb * color; + + //Blend MainTex with overtex1 overTex1.rgb -= mainTex.rgb; overTex1.rgb = overTex1Col.a * overTex1.rgb + mainTex.rgb; //Pubes for body, blush for face float2 overTex2UV = i.uv2 * i.color.b; overTex2UV = overTex2UV * _overtex2_ST.xy + _overtex2_ST.zw; - float4 overTex2 = tex2D(_overtex2, overTex2UV); + float4 overTex2 = SAMPLE_TEX2D(_overtex2, overTex2UV); overTex2.rgb = _overcolor2.rgb * overTex2.rgb - overTex1.rgb; float overTex2Blend = overTex2.a * _overcolor2.a; overTex1.rgb = overTex2Blend * overTex2.rgb + overTex1.rgb; //Eyeshadow for face, seems to just be another nipple for the body float2 overTex3UV = i.uv3 * _overtex3_ST.xy + _overtex3_ST.zw; - float4 overTex3 = tex2D(_overtex3, overTex3UV); + float4 overTex3 = SAMPLE_TEX2D(_overtex3, overTex3UV); overTex3.rgb = overTex3.rgb * _overcolor3.rgb - overTex1.rgb; float overTex3Blend = overTex3.a * _overcolor3.a; overTex1.rgb = overTex3Blend * overTex3.rgb + overTex1.rgb; diff --git a/Shaders/Skin/KKPDiffuse.cginc.meta b/Shaders/Skin/KKPDiffuse.cginc.meta new file mode 100644 index 0000000..70f55b3 --- /dev/null +++ b/Shaders/Skin/KKPDiffuse.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c39a4fdeaab5eea4a8dab1563392cd75 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPNormals.cginc b/Shaders/Skin/KKPNormals.cginc index 4c8ef9a..e7aa05a 100644 --- a/Shaders/Skin/KKPNormals.cginc +++ b/Shaders/Skin/KKPNormals.cginc @@ -4,9 +4,9 @@ float3 GetNormal(Varyings i){ //Normals float2 detailNormalUV = i.uv0 * _NormalMapDetail_ST.xy + _NormalMapDetail_ST.zw; - float3 detailNormal = UnpackScaleNormal(tex2D(_NormalMapDetail, detailNormalUV), _DetailNormalMapScale); + float3 detailNormal = UnpackScaleNormal(SAMPLE_TEX2D_SAMPLER(_NormalMapDetail, _NormalMap, detailNormalUV), _DetailNormalMapScale); float2 normalUV = i.uv0 * _NormalMap_ST.xy + _NormalMap_ST.zw; - float3 normalMap = UnpackScaleNormal(tex2D(_NormalMap, normalUV), _NormalMapScale); + float3 normalMap = UnpackScaleNormal(SAMPLE_TEX2D(_NormalMap, normalUV), _NormalMapScale); float3 mergedNormals = BlendNormals(normalMap, detailNormal); return mergedNormals; } @@ -16,7 +16,7 @@ float3 CreateBinormal (float3 normal, float3 tangent, float binormalSign) { (binormalSign * unity_WorldTransformParams.w); } -float3 NormalAdjust(Varyings i, float3 finalCombinedNormal){ +float3 NormalAdjust(Varyings i, float3 finalCombinedNormal, int faceDir = 0){ float3 normal = finalCombinedNormal; float3 binormal = CreateBinormal(i.normalWS, i.tanWS.xyz, i.tanWS.w); @@ -27,9 +27,8 @@ float3 NormalAdjust(Varyings i, float3 finalCombinedNormal){ ); //This give some items correct shading on backfaces but messes up mirror shading - //adjustedNormal.z *= faceDir <= 0 ? -1 : 1; - - return normal; + int adjust = int(floor(_AdjustBackfaceNormals)); + return adjust ? normal * (faceDir <= 0 ? -1 : 1) : normal; } #endif \ No newline at end of file diff --git a/Shaders/Skin/KKPNormals.cginc.meta b/Shaders/Skin/KKPNormals.cginc.meta new file mode 100644 index 0000000..76bd660 --- /dev/null +++ b/Shaders/Skin/KKPNormals.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a3182fdd38bc3f345ad6cd9c3e743704 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPSkinFrag.cginc b/Shaders/Skin/KKPSkinFrag.cginc index 7c27b9b..28f2bd3 100644 --- a/Shaders/Skin/KKPSkinFrag.cginc +++ b/Shaders/Skin/KKPSkinFrag.cginc @@ -17,195 +17,199 @@ float3x3 AngleAxis3x3(float angle, float3 axis) t * x * z - s * y, t * y * z + s * x, t * z * z + c ); } - fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target - { - //Clips based on alpha texture - AlphaClip(i.uv0, 1); - - - //Used in various things so calculating them here - float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); - float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); - - //Diffuse and color maps KK uses for shading I assume - float3 diffuse = GetDiffuse(i); - float3 specularAdjustment; //Adjustments for specular from detailmap - float3 shadingAdjustment; //Adjustments for shading - MapValuesMain(diffuse, specularAdjustment, shadingAdjustment); - - - - - - //Normals from texture - float3 normal = GetNormal(i); - - //return float4(normal, 1); - // Cum - float liquidFinalMask; - float3 liquidNormal; - GetCumVals(i.uv0, liquidFinalMask, liquidNormal); - - //Combines normals from cum then adjusts to WS from TS - float3 finalCombinedNormal = lerp(normal, liquidNormal, liquidFinalMask); - normal = NormalAdjust(i, finalCombinedNormal); - //Detailmask channels: - //Red : Specular - //Green : Drawn shadows - //Blue : Something with rim light - //Alpha : Specular Intensity, Black = Nails White = body - float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); - - float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; - _SpecularPower *= specularMap; - detailMask.xyz = 1 - detailMask.ywz; - - float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; - float4 lineMask = tex2D(_LineMask, lineMaskUV); - lineMask.xz = -lineMask.zx * _DetailNormalMapScale + 1; - - - float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); - float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); - float3 adjustedViewDir = frontFace == 1 ? viewDir : -viewDir; - float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); - float fresnel = dot(normal, rotView); - float bodyFres = fresnel; - bodyFres = saturate(pow(1-bodyFres, _KKPRimSoft) * _KKPRimIntensity); - _KKPRimColor.a *= (_UseKKPRim); - float3 bodyFresCol = bodyFres * _KKPRimColor; - - diffuse = lerp(diffuse, bodyFresCol, _KKPRimColor.a * bodyFres * _KKPRimAsDiffuse); - - //Lighting begins here - - //Because of how Koikatsu lighting works, the ForwardAdd pass method isn't going to look right with Koikatsu's shading - //It's are limited to 4 pointlights + 1 directional light because we're using Unity's vertex lights which is capped at 4 + the Forward Light pass - KKVertexLight vertexLights[4]; - #ifdef VERTEXLIGHT_ON - GetVertexLights(vertexLights, i.posWS); - #endif - float4 vertexLighting = 0.0; - float vertexLightRamp = 1.0; - #ifdef VERTEXLIGHT_ON - vertexLighting = GetVertexLighting(vertexLights, normal); - float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; - vertexLightRamp = tex2D(_RampG, vertexLightRampUV).x; - float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); - vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; - #endif - - - //Shadows used as a map for the darker shade - float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; - float drawnShadows = min(detailMask.x, lineMask.x); - float shadowAttenuation = GetShadowAttenuation(i, vertexLighting.a, normal, worldLightPos, viewDir); - float oneMinusShadowExtend = 1 - shadowExtend; - shadowExtend = drawnShadows * oneMinusShadowExtend + shadowExtend; - shadowAttenuation *= shadowExtend; - - //FIGURE OUT BETTER SPECULAR MESH - //Specular values - float3 drawnSpecularColor; - float drawnSpecular = GetDrawnSpecular(i, detailMask, shadowAttenuation, viewDir, drawnSpecularColor); - float3 specularFromDetail = drawnSpecular * specularAdjustment.xyz + 1; - specularFromDetail = diffuse.rgb * specularFromDetail.xyz + drawnSpecularColor; - - float3 specularColorMesh; - float specularMesh = GetMeshSpecular(vertexLights, normal, viewDir, worldLightPos, specularColorMesh); - float3 specularDiffuse = saturate((1 - _notusetexspecular) * specularFromDetail.xyz) + (_notusetexspecular * (specularColorMesh + diffuse)); - - //Shading - float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; - diffuseShaded = -diffuseShaded * 2 + 1; - - float4 ambientShadow = 1 - _ambientshadowG.wxyz; - float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; - float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; - float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; - bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; - ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; - float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; - finalAmbientShadow = saturate(finalAmbientShadow); - float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; - - bool3 compTest = 0.555555582 < shadingAdjustment; - shadingAdjustment *= finalAmbientShadow; - shadingAdjustment *= 1.79999995; - diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; - { - float3 hlslcc_movcTemp = shadingAdjustment; - hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; - hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; - hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; - float3 shadowCol = lerp(1, _ShadowColor.rgb, 1 - saturate(_ShadowColor.a)); - shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); - } - float3 finalDiffuse = specularDiffuse * shadingAdjustment; - specularDiffuse = -specularDiffuse * shadingAdjustment + specularDiffuse; - specularDiffuse = specularDiffuse * shadowAttenuation + finalDiffuse; - finalDiffuse = liquidFinalMask * float3(0.350000024, 0.45294112, 0.607352912) + float3(0.5, 0.397058904, 0.242647097); - - float3 cumCol = (GetLambert(worldLightPos, normal) + vertexLighting.a + 0.5) * float3(0.149999976, 0.199999988, 0.300000012) + float3(.850000024, 0.800000012, 0.699999988); - float3 bodyShine = finalDiffuse * cumCol + specularMesh; - - //Rimlight - - - fresnel = max(fresnel, 0.0); - fresnel = log2(1 - fresnel); - float rimLight = _rimpower * 9 + 1; - rimLight *= exp2(fresnel) * 5 - 2; - float2 detailMaskAdjusted = detailMask.xz * float2(0.5, 2.5) + float2(0.5, -1.5); - rimLight = saturate(min(rimLight, detailMaskAdjusted.y)); - rimLight *= detailMask.x * (1-_UseKKPRim); - - bodyShine = rimLight * _rimV + bodyShine; - bodyShine = bodyShine - specularDiffuse; - specularDiffuse = liquidFinalMask * bodyShine + specularDiffuse; - //Final lighting colors - bodyShine = (_LightColor0.rgb + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; - float3 ambientCol = max(bodyShine, _ambientshadowG.xyz); - specularDiffuse *= ambientCol; - float3 diffuseAdjusted = diffuse * shadingAdjustment; - - - //Final combine with drawn lines - float3 coolVal = -diffuseAdjusted * detailMaskAdjusted.x + 1; - diffuseAdjusted = detailMaskAdjusted.x * diffuseAdjusted; - float lineColAlpha = _LineColorG.a - 0.5; - lineColAlpha = -lineColAlpha * 2.0 + 1.0; - float3 someValue = -lineColAlpha * coolVal + 1; - lineColAlpha = _LineColorG.a * 2; - diffuseAdjusted *= lineColAlpha; - diffuseAdjusted = 0.5 < _LineColorG.a ? someValue : diffuseAdjusted; - diffuseAdjusted = saturate(diffuseAdjusted) * bodyShine; - - float3 invertShadingAdjustment = 1 - shadingAdjustment; - shadingAdjustment = shadowExtend * invertShadingAdjustment + shadingAdjustment; - specularDiffuse = specularDiffuse * shadingAdjustment - diffuseAdjusted; - - float lineMaskB = lineMask.z * 0.5 + 0.5; - float lineWidth = 1 - (_linewidthG); - lineWidth = lineWidth * 0.800000012 + 0.200000003; - lineWidth = log2(lineWidth) * lineMask.y; - lineWidth = exp2(lineWidth); - lineWidth = min(lineWidth, lineMaskB) - 1; - lineWidth = _linetexon * lineWidth + 1.0; - - - float3 finalCol = (lineWidth * specularDiffuse + diffuseAdjusted); - - - finalCol = lerp(finalCol, bodyFresCol, _KKPRimColor.a * bodyFres * (1 - _KKPRimAsDiffuse)); - - //Overlay Emission over everything - float4 emission = GetEmission(i.uv0); - finalCol = finalCol * (1 - emission.a) + (emission.a*emission.rgb); - - return float4(finalCol, 1); - } + +fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target +{ + + + //Clips based on alpha texture + AlphaClip(i.uv0, 1); + + //Used in various things so calculating them here + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + + //Diffuse and color maps KK uses for shading I assume + float3 diffuse = GetDiffuse(i); + float3 specularAdjustment; //Adjustments for specular from detailmap + float3 shadingAdjustment; //Adjustments for shading + MapValuesMain(diffuse, specularAdjustment, shadingAdjustment); + + //Normals from texture + float3 normal = GetNormal(i); + _NormalMapScale *= _SpecularNormalScale; + _DetailNormalMapScale *= _SpecularDetailNormalScale; + float3 specularNormal = NormalAdjust(i, GetNormal(i), frontFace); + + // Cum + float liquidFinalMask; + float3 liquidNormal; + GetCumVals(i.uv0, liquidFinalMask, liquidNormal); + + //Combines normals from cum then adjusts to WS from TS + float3 finalCombinedNormal = lerp(normal, liquidNormal, liquidFinalMask); + normal = NormalAdjust(i, finalCombinedNormal, frontFace); + //Detailmask channels: + //Red : Specular + //Green : Drawn shadows + //Blue : Something with rim light + //Alpha : Specular Intensity, Black = Nails White = body + float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); + + float specularMap = _UseDetailRAsSpecularMap ? detailMask.r : 1; + _SpecularPower *= specularMap; + detailMask.xyz = 1 - detailMask.ywz; + + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.xz = -lineMask.zx * _DetailNormalMapScale + 1; + + + float3x3 rotX = AngleAxis3x3(_KKPRimRotateX, float3(0, 1, 0)); + float3x3 rotY = AngleAxis3x3(_KKPRimRotateY, float3(1, 0, 0)); + float3 adjustedViewDir = frontFace == 1 ? viewDir : -viewDir; + float3 rotView = mul(adjustedViewDir, mul(rotX, rotY)); + float fresnel = dot(normal, rotView); + float bodyFres = fresnel; + bodyFres = saturate(pow(1-bodyFres, _KKPRimSoft) * _KKPRimIntensity); + _KKPRimColor.a *= (_UseKKPRim); + float3 bodyFresCol = bodyFres * _KKPRimColor + (1 - bodyFres) * diffuse; + + //Lighting begins here + + //Because of how Koikatsu lighting works, the ForwardAdd pass method isn't going to look right with Koikatsu's shading + //It's are limited to 4 pointlights + 1 directional light because we're using Unity's vertex lights which is capped at 4 + the Forward Light pass + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, normal); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + + //Shadows used as a map for the darker shade + float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; + float drawnShadows = min(detailMask.x, lineMask.x); + float shadowAttenuation = GetShadowAttenuation(i, vertexLighting.a, normal, worldLightPos, viewDir); + shadowExtend = drawnShadows * (1 - shadowExtend) + shadowExtend; + shadowAttenuation *= shadowExtend; + + float rimPlace = lerp(lerp(1 - shadowAttenuation, 1, min(_rimReflectMode+1, 1)), shadowAttenuation, max(0, _rimReflectMode)); + diffuse = lerp(diffuse, bodyFresCol, _KKPRimColor.a * bodyFres * _KKPRimAsDiffuse * rimPlace); + + //FIGURE OUT BETTER SPECULAR MESH + //Specular values + float3 drawnSpecularColor; + float drawnSpecular = GetDrawnSpecular(i, detailMask, shadowAttenuation, viewDir, drawnSpecularColor); + float3 specularFromDetail = drawnSpecular * specularAdjustment.xyz + 1; + specularFromDetail = diffuse.rgb * specularFromDetail.xyz + drawnSpecularColor; + + + + float3 specularColorMesh; + float specularMesh = GetMeshSpecular(i, vertexLights, specularNormal, viewDir, worldLightPos, specularColorMesh); + float3 specularDiffuse = saturate((1 - _notusetexspecular) * specularFromDetail.xyz) + (_notusetexspecular * (specularColorMesh + diffuse)); + + //Shading + float3 diffuseShaded = shadingAdjustment * 0.899999976 - 0.5; + diffuseShaded = -diffuseShaded * 2 + 1; + + float4 ambientShadow = 1 - _ambientshadowG.wxyz; + float3 ambientShadowIntensity = -ambientShadow.x * ambientShadow.yzw + 1; + float ambientShadowAdjust = _ambientshadowG.w * 0.5 + 0.5; + float ambientShadowAdjustDoubled = ambientShadowAdjust + ambientShadowAdjust; + bool ambientShadowAdjustShow = 0.5 < ambientShadowAdjust; + ambientShadow.rgb = ambientShadowAdjustDoubled * _ambientshadowG.rgb; + float3 finalAmbientShadow = ambientShadowAdjustShow ? ambientShadowIntensity : ambientShadow.rgb; + finalAmbientShadow = saturate(finalAmbientShadow); + float3 invertFinalAmbientShadow = 1 - finalAmbientShadow; + + bool3 compTest = 0.555555582 < shadingAdjustment; + shadingAdjustment *= finalAmbientShadow; + shadingAdjustment *= 1.79999995; + diffuseShaded = -diffuseShaded * invertFinalAmbientShadow + 1; + { + float3 hlslcc_movcTemp = shadingAdjustment; + hlslcc_movcTemp.x = (compTest.x) ? diffuseShaded.x : shadingAdjustment.x; + hlslcc_movcTemp.y = (compTest.y) ? diffuseShaded.y : shadingAdjustment.y; + hlslcc_movcTemp.z = (compTest.z) ? diffuseShaded.z : shadingAdjustment.z; + float3 shadowCol = lerp(1, _ShadowColor.rgb+1E-06, 1 - saturate(_ShadowColor.a+1E-06)); + shadingAdjustment = saturate(hlslcc_movcTemp * shadowCol); + } + + float3 finalDiffuse = specularDiffuse * shadingAdjustment; + specularDiffuse = -specularDiffuse * shadingAdjustment + specularDiffuse; + specularDiffuse = specularDiffuse * shadowAttenuation + finalDiffuse; + finalDiffuse = liquidFinalMask * float3(0.350000024, 0.45294112, 0.607352912) + float3(0.5, 0.397058904, 0.242647097); + + float3 cumCol = (GetLambert(worldLightPos, normal) + vertexLighting.a + 0.5) * float3(0.149999976, 0.199999988, 0.300000012) + float3(.850000024, 0.800000012, 0.699999988); + float3 bodyShine = finalDiffuse * cumCol + specularMesh; + + //Rimlight + + fresnel = max(fresnel, 0.0); + fresnel = log2(1 - fresnel); + float rimLight = _rimpower * 9 + 1; + rimLight *= exp2(fresnel) * 5 - 2; + float2 detailMaskAdjusted = detailMask.xz * float2(0.5, 2.5) + float2(0.5, -1.5); + rimLight = saturate(min(rimLight, detailMaskAdjusted.y)); + rimLight *= detailMask.x * (1-_UseKKPRim); + + bodyShine = rimLight * _rimV * rimPlace + bodyShine; + bodyShine = bodyShine - specularDiffuse; + specularDiffuse = liquidFinalMask * bodyShine + specularDiffuse; + + //Final lighting colors + bodyShine = (_LightColor0.rgb + vertexLighting.rgb * vertexLightRamp) * float3(0.600000024, 0.600000024, 0.600000024) + _CustomAmbient.rgb; + float3 ambientCol = max(bodyShine, _ambientshadowG.xyz); + specularDiffuse *= ambientCol; + float3 diffuseAdjusted = diffuse * shadingAdjustment; + + //Final combine with drawn lines + float3 coolVal = -diffuseAdjusted * detailMaskAdjusted.x + 1; + diffuseAdjusted = detailMaskAdjusted.x * diffuseAdjusted; + float lineColAlpha = _LineColorG.a - 0.5; + lineColAlpha = -lineColAlpha * 2.0 + 1.0; + float3 someValue = -lineColAlpha * coolVal + 1; + lineColAlpha = _LineColorG.a * 2; + diffuseAdjusted *= lineColAlpha; + diffuseAdjusted = 0.5 < _LineColorG.a ? someValue : diffuseAdjusted; + diffuseAdjusted = saturate(diffuseAdjusted) * bodyShine; + + shadingAdjustment = shadowExtend * (1 - shadingAdjustment) + shadingAdjustment; + specularDiffuse = specularDiffuse * shadingAdjustment - diffuseAdjusted; + + float lineMaskB = lineMask.z * 0.5 + 0.5; + float lineWidth = 1 - (_linewidthG); + lineWidth = lineWidth * 0.800000012 + 0.200000003; + lineWidth = log2(lineWidth) * lineMask.y; + lineWidth = exp2(lineWidth); + lineWidth = min(lineWidth, lineMaskB) - 1; + lineWidth = _linetexon * lineWidth + 1.0; + + float3 finalCol = (lineWidth * specularDiffuse + diffuseAdjusted); + + float3 hsl = RGBtoHSL(finalCol); + hsl.x = hsl.x + _ShadowHSV.x; + hsl.y = hsl.y + _ShadowHSV.y; + hsl.z = hsl.z + _ShadowHSV.z; + finalCol = lerp(HSLtoRGB(hsl), finalCol, saturate(shadowAttenuation + 0.5)); + + finalCol = lerp(finalCol, bodyFresCol, _KKPRimColor.a * rimPlace * bodyFres * (1 - _KKPRimAsDiffuse)); + + //Overlay Emission over everything + float4 emission = GetEmission(i.uv0); + finalCol = finalCol * (1 - emission.a) + (emission.a*emission.rgb); + + return float4(max(finalCol, 1E-06), 1); +} #endif \ No newline at end of file diff --git a/Shaders/Skin/KKPSkinFrag.cginc.meta b/Shaders/Skin/KKPSkinFrag.cginc.meta new file mode 100644 index 0000000..8523977 --- /dev/null +++ b/Shaders/Skin/KKPSkinFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e28f3fd8e922a274982003084bcd5fff +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPSkinInput.cginc b/Shaders/Skin/KKPSkinInput.cginc index 87532aa..f3dba62 100644 --- a/Shaders/Skin/KKPSkinInput.cginc +++ b/Shaders/Skin/KKPSkinInput.cginc @@ -1,6 +1,8 @@ #ifndef KKP_MAIN_INPUT #define KKP_MAIN_INPUT +#include "../KKPDeclarations.cginc" + struct VertexData { float4 vertex : POSITION; @@ -47,28 +49,25 @@ float _KKPRimRotateX; float _KKPRimRotateY; - float4 _ShadowColor; float4 _OutlineColor; - //KK Inputs - //Input Textures - sampler2D _MainTex; - sampler2D _AlphaMask; - sampler2D _NormalMap; - sampler2D _NormalMapDetail; - sampler2D _liquidmask; - sampler2D _Texture2; //Liquid Tex - sampler2D _Texture3; //Liquid Normal - sampler2D _overtex1; - sampler2D _overtex2; - sampler2D _overtex3; - sampler2D _DetailMask; - sampler2D _NormalMask; - sampler2D _RampG; - sampler2D _LineMask; + DECLARE_TEX2D(_MainTex); + DECLARE_TEX2D(_AlphaMask); + DECLARE_TEX2D(_NormalMap); + DECLARE_TEX2D_NOSAMPLER(_NormalMapDetail); + DECLARE_TEX2D_NOSAMPLER(_liquidmask); + DECLARE_TEX2D(_Texture2); //Liquid Tex + DECLARE_TEX2D_NOSAMPLER(_Texture3); //Liquid Normal + DECLARE_TEX2D(_overtex1); + DECLARE_TEX2D(_overtex2); + DECLARE_TEX2D(_overtex3); + DECLARE_TEX2D_NOSAMPLER(_LineMask); + DECLARE_TEX2D(_DetailMask); + DECLARE_TEX2D(_NormalMask); + DECLARE_TEX2D(_RampG); //UV Offsets float4 _MainTex_ST; float4 _AlphaMask_ST; @@ -91,7 +90,10 @@ float _rimpower; float _rimV; float4 _SpecularColor; + float4 _ShadowHSV; float _SpeclarHeight; + float _SpecularNormalScale; + float _SpecularDetailNormalScale; float _SpecularPower; float _SpecularPowerNail; float _ShadowExtend; @@ -113,11 +115,24 @@ float _LineWidthS; bool _OutlineOn; + //Global light params set by KK float4 _LineColorG; float _linewidthG; float4 _ambientshadowG; //Shadow color float _FaceShadowG; float _FaceNormalG; - + + float _AdjustBackfaceNormals; + float _DisablePointLights; + float _DisableShadowedMatcap; + float _rimReflectMode; + + // Extra color + DECLARE_TEX2D_NOSAMPLER(_ColMask); + float4 _ColMask_ST; + float4 _Col0; + float4 _Col1; + float4 _Col2; + float4 _Col3; #endif \ No newline at end of file diff --git a/Shaders/Skin/KKPSkinInput.cginc.meta b/Shaders/Skin/KKPSkinInput.cginc.meta new file mode 100644 index 0000000..8680879 --- /dev/null +++ b/Shaders/Skin/KKPSkinInput.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f95c8792f764a5f4abe166a790777c1d +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPSkinReflect.cginc b/Shaders/Skin/KKPSkinReflect.cginc index 084d3b9..8a968f5 100644 --- a/Shaders/Skin/KKPSkinReflect.cginc +++ b/Shaders/Skin/KKPSkinReflect.cginc @@ -1,60 +1,149 @@ #ifndef KKP_SKIN_REFLECT #define KKP_SKIN_REFLECT - sampler2D _ReflectMap; - float4 _ReflectMap_ST; - sampler2D _ReflectionMapCap; - float _Roughness; - float _ReflectionVal; - float _UseMatCapReflection; - float _ReflBlendVal; - float _ReflBlendSrc; - float _ReflBlendDst; - fixed4 reflectfrag (Varyings i) : SV_Target - { - AlphaClip(i.uv0, 1); - float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); - float3 normal = GetNormal(i); - normal = NormalAdjust(i, normal); - float reflectMap = tex2D(_ReflectMap, (i.uv0 *_ReflectMap_ST.xy) + _ReflectMap_ST.zw).r; - - - float3 reflectionDir = reflect(-viewDir, normal); - float roughness = 1 - (_Roughness); - roughness *= 1.7 - 0.7 * roughness; - float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS); - float3 env = DecodeHDR(envSample, unity_SpecCube0_HDR); - - float3 viewNormal = mul((float3x3)UNITY_MATRIX_V, normal); - float2 matcapUV = viewNormal.xy * 0.5 + 0.5; - - float3 matcap = tex2D(_ReflectionMapCap, matcapUV).rgb; - matcap = pow(matcap, 0.454545); - env = lerp(matcap, env, 1-_UseMatCapReflection); - - float reflectMulOrAdd = 1.0; - float src = floor(_ReflBlendSrc); - float dst = floor(_ReflBlendDst); - //Add - if(src == 1.0 && dst == 1.0){ - reflectMulOrAdd = 0.0; - } - //Mul - else if(src == 2.0 && dst == 0.0){ - reflectMulOrAdd = 1.0; - } - else if(dst == 10.0 && (src == 1.0 || src == 5.0)){ - reflectMulOrAdd = 0.0; - } - else{ - reflectMulOrAdd = _ReflBlendVal; - } - - //5, 10 is alpha blend - env *= _ReflectionVal; - - float3 reflCol = lerp(env, reflectMulOrAdd, 1-_ReflectionVal*reflectMap); - - return float4(reflCol, reflectMap * _ReflectionVal); - } +DECLARE_TEX2D(_ReflectMap); +float4 _ReflectMap_ST; +DECLARE_TEX2D(_ReflectionMapCap); +float4 _ReflectionMapCap_ST; +float _Roughness; +float _ReflectionVal; +float _UseMatCapReflection; +float _ReflBlendVal; +float _ReflBlendSrc; +float _ReflBlendDst; +float4 _ReflectCol; +float _ReflectColMix; + +float _ReflectRotation; +DECLARE_TEX2D(_ReflectMask); +float4 _ReflectMask_ST; + +#ifndef ROTATEUV +float2 rotateUV(float2 uv, float2 pivot, float rotation) { + float cosa = cos(rotation); + float sina = sin(rotation); + uv -= pivot; + return float2( + cosa * uv.x - sina * uv.y, + cosa * uv.y + sina * uv.x + ) + pivot; +} +#endif + +fixed4 reflectfrag (Varyings i) : SV_Target +{ + + + //Clips based on alpha texture + AlphaClip(i.uv0, 1); + + float3 worldLightPos = normalize(_WorldSpaceLightPos0.xyz); + float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + + //Normals from texture + float3 normal = GetNormal(i); + + // Cum + float liquidFinalMask; + float3 liquidNormal; + GetCumVals(i.uv0, liquidFinalMask, liquidNormal); + + //Combines normals from cum then adjusts to WS from TS + float3 finalCombinedNormal = lerp(normal, liquidNormal, liquidFinalMask); + normal = NormalAdjust(i, finalCombinedNormal); + //Detailmask channels: + //Red : Specular + //Green : Drawn shadows + //Blue : Something with rim light + //Alpha : Specular Intensity, Black = Nails White = body + float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); + + detailMask.xyz = 1 - detailMask.ywz; + + float2 lineMaskUV = i.uv0 * _LineMask_ST.xy + _LineMask_ST.zw; + float4 lineMask = SAMPLE_TEX2D_SAMPLER(_LineMask, _DetailMask, lineMaskUV); + lineMask.xz = -lineMask.zx * _DetailNormalMapScale + 1; + + //Lighting begins here + + //Because of how Koikatsu lighting works, the ForwardAdd pass method isn't going to look right with Koikatsu's shading + //It's are limited to 4 pointlights + 1 directional light because we're using Unity's vertex lights which is capped at 4 + the Forward Light pass + KKVertexLight vertexLights[4]; +#ifdef VERTEXLIGHT_ON + GetVertexLightsTwo(vertexLights, i.posWS, _DisablePointLights); +#endif + float4 vertexLighting = 0.0; + float vertexLightRamp = 1.0; +#ifdef VERTEXLIGHT_ON + vertexLighting = GetVertexLighting(vertexLights, normal); + float2 vertexLightRampUV = vertexLighting.a * _RampG_ST.xy + _RampG_ST.zw; + vertexLightRamp = SAMPLE_TEX2D(_RampG, vertexLightRampUV).x; + float3 rampLighting = GetRampLighting(vertexLights, normal, vertexLightRamp); + vertexLighting.rgb = _UseRampForLights ? rampLighting : vertexLighting.rgb; +#endif + + //Shadows used as a map for the darker shade + float shadowExtend = _ShadowExtend * -1.20000005 + 1.0; + float drawnShadows = min(detailMask.x, lineMask.x); + float matcapAttenuation = GetShadowAttenuation(i, vertexLighting.a, normal, worldLightPos, viewDir); + shadowExtend = drawnShadows * (1 - shadowExtend) + shadowExtend; + matcapAttenuation = 1 - (1-matcapAttenuation*shadowExtend)*_DisableShadowedMatcap; + + //Three lines commented due to adding matcap attenuation code + //AlphaClip(i.uv0, 1); + //float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.posWS); + //float3 normal = GetNormal(i); + //normal = NormalAdjust(i, normal); + float reflectMap = SAMPLE_TEX2D(_ReflectMap, (i.uv0 *_ReflectMap_ST.xy) + _ReflectMap_ST.zw).r; + + + float3 reflectionDir = reflect(-viewDir, normal); + float roughness = 1 - (_Roughness); + roughness *= 1.7 - 0.7 * roughness; + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + float3 env = DecodeHDR(envSample, unity_SpecCube0_HDR); + + float3 viewNormal = mul((float3x3)UNITY_MATRIX_V, normal); + float2 matcapUV = viewNormal.xy * 0.5 * _ReflectionMapCap_ST.xy + 0.5 + _ReflectionMapCap_ST.zw; + matcapUV = rotateUV(matcapUV, float2(0.5, 0.5), radians(_ReflectRotation)); + float reflectMask = SAMPLE_TEX2D(_ReflectMask, i.uv0 * _ReflectMask_ST.xy + _ReflectMask_ST.zw).r; + + float4 matcap = SAMPLE_TEX2D(_ReflectionMapCap, matcapUV); + matcap = pow(matcap, 0.454545); + float3 matcapRGBcolored = lerp(matcap.rgb, matcap.rgb * _ReflectCol.rgb, _ReflectColMix); + env = lerp(env, matcapRGBcolored, _UseMatCapReflection * reflectMask); + + float alphaLerp = 1; + float reflectMulOrAdd = 1.0; + float src = floor(_ReflBlendSrc); + float dst = floor(_ReflBlendDst); + //Add + if(src == 1.0 && dst == 1.0){ + reflectMulOrAdd = 0.0; + alphaLerp = _ReflectCol.a; + } + //Mul + else if(src == 2.0 && dst == 0.0){ + reflectMulOrAdd = 1.0; + alphaLerp = _ReflectCol.a; + } + // Alpha Blend & Premultiplied Alpha + else if(dst == 10.0 && (src == 5.0 || src == 1.0)){ + reflectMulOrAdd = 0.0; + env *= _ReflectCol.a; + } + else { + reflectMulOrAdd = _ReflBlendVal; + alphaLerp = _ReflectCol.a; + } + + env *= matcapAttenuation * matcap.a; + + float modifiedReflectionVal = _ReflectionVal * reflectMap; + + float3 reflCol = lerp(env, reflectMulOrAdd, 1 - modifiedReflectionVal * matcapAttenuation * matcap.a * alphaLerp); + + return float4(max(reflCol, 1E-06), modifiedReflectionVal * reflectMap * _ReflectCol.a); +} #endif \ No newline at end of file diff --git a/Shaders/Skin/KKPSkinReflect.cginc.meta b/Shaders/Skin/KKPSkinReflect.cginc.meta new file mode 100644 index 0000000..dd2371e --- /dev/null +++ b/Shaders/Skin/KKPSkinReflect.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1719e1045c6d1ed48a4cae2a4e1225d9 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/KKPTess.cginc b/Shaders/Skin/KKPTess.cginc index dc77e30..74fd3d4 100644 --- a/Shaders/Skin/KKPTess.cginc +++ b/Shaders/Skin/KKPTess.cginc @@ -39,7 +39,7 @@ TessellationControlPoint TessVert(VertexData v){ return p; } -sampler2D _TessTex; +DECLARE_TEX2D(_TessTex); float _TessMax; float _TessMin; float _TessBias; @@ -92,7 +92,7 @@ float EdgeTessellationFactor(float3 p0PositionWS, float2 p0UV, float3 p1Position float length = distance(p0PositionWS, p1PositionWS) * _TessBias * 3; float distanceToCamera = distance(_WorldSpaceCameraPos, (p0PositionWS + p1PositionWS) * 0.5); - float tessTex = tex2Dlod(_TessTex, float4((p0UV + p1UV) * 0.5, 0, 0)).x; + float tessTex = SAMPLE_TEX2D_LOD(_TessTex, float4((p0UV + p1UV) * 0.5, 0, 0), 0).x; float factor = length / (distanceToCamera * distanceToCamera); factor = min(_TessMax, factor); float multiplier = 1.0; diff --git a/Shaders/Skin/KKPTess.cginc.meta b/Shaders/Skin/KKPTess.cginc.meta new file mode 100644 index 0000000..97dc4d4 --- /dev/null +++ b/Shaders/Skin/KKPTess.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 660ef445583cc994d93d2bd09fbcdaf6 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/SkinPlus.shader b/Shaders/Skin/SkinPlus.shader index a920cf7..74915cf 100644 --- a/Shaders/Skin/SkinPlus.shader +++ b/Shaders/Skin/SkinPlus.shader @@ -2,6 +2,12 @@ { Properties { + _ColMask ("Color Mask", 2D) = "black" {} + [Gamma]_Col0 ("Color 0", Color) = (1, 1, 1, 1) + [Gamma]_Col1 ("Color 1", Color) = (1, 1, 1, 1) + [Gamma]_Col2 ("Color 2", Color) = (1, 1, 1, 1) + [Gamma]_Col3 ("Color 3", Color) = (1, 1, 1, 1) + _MainTex ("MainTex", 2D) = "white" {} [Gamma]_overcolor1 ("Over Color1", Vector) = (1,1,1,1) _overtex1 ("Over Tex1", 2D) = "black" {} @@ -18,7 +24,8 @@ [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Color) = (0.628,0.628,0.628,1) - [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,0) _DetailNormalMapScale ("DetailNormalMapScale", Range(0, 1)) = 1 _NormalMapScale ("NormalMapScale", Float) = 1 _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 @@ -55,6 +62,7 @@ _LineWidthS ("LineWidthS", Float) = 1 [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) _KKPRimSoft ("Body Rim Softness", Float) = 1.5 @@ -62,6 +70,13 @@ _KKPRimAsDiffuse ("Body Rim As Diffuse", Range(0, 1)) = 0.0 _KKPRimRotateX("Body Rim Rotate X", Float) = 0.0 _KKPRimRotateY("Body Rim Rotate Y", Float) = 0.0 + + _DisablePointLights ("Disable Point Lights", Float) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -78,6 +93,7 @@ CGPROGRAM #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -87,6 +103,7 @@ Varyings vert (VertexData v) { Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; float viewVal = dot(viewDir, viewDir); @@ -95,7 +112,7 @@ float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal * _LineWidthS; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB; float3 invertSquare; @@ -122,22 +139,20 @@ o.uv1 = v.uv1; o.uv2 = v.uv2; o.uv3 = v.uv3; + 1; return o; } - - - fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target { + + //Defined in Diffuse.cginc AlphaClip(i.uv0, _OutlineOn ? 1 : 0); float3 diffuse = GetDiffuse(i); float3 u_xlat1; MapValuesOutline(diffuse, u_xlat1); - - bool3 compTest = 0.555555582 < u_xlat1.xyz; float3 diffuseShaded = u_xlat1.xyz * 0.899999976 - 0.5; diffuseShaded = -diffuseShaded * 2 + 1; @@ -163,7 +178,7 @@ } float3 finalDiffuse = diffuse * u_xlat1; float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float detailGInv = 1 - detailMask.g; detailGInv = detailGInv * 0.5 + 0.5; @@ -182,12 +197,8 @@ float3 finalColor = finalDiffuse * outLineCol; finalColor = lerp(finalColor, _OutlineColor.rgb, _OutlineColor.a); - return float4(finalColor, 1.0); - - + return float4(max(finalColor, 1E-06), 1.0); } - - ENDCG } @@ -200,12 +211,12 @@ Blend One OneMinusSrcAlpha, One OneMinusSrcAlpha Cull Off - CGPROGRAM #pragma target 3.0 #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -216,16 +227,15 @@ #include "AutoLight.cginc" #include "Lighting.cginc" - #include "KKPSkinInput.cginc" #include "KKPDiffuse.cginc" #include "KKPNormals.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" - #include "KKPLighting.cginc" + #include "../KKPLighting.cginc" #include "../KKPEmission.cginc" - #include "KKPCoom.cginc" + #include "../KKPCoom.cginc" #include "KKPSkinFrag.cginc" @@ -256,10 +266,8 @@ return o; } - ENDCG } - //ShadowCaster Pass @@ -273,17 +281,13 @@ CGPROGRAM #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile_shadowcaster #include "UnityCG.cginc" - sampler2D _AlphaMask; - float4 _AlphaMask_ST; - - float _alpha_a; - float _alpha_b; - - + #include "KKPSkinInput.cginc" + struct v2f { float2 uv0 : TEXCOORD1; V2F_SHADOW_CASTER; @@ -299,8 +303,9 @@ float4 frag(v2f i) : SV_Target { + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV) ; float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); @@ -318,4 +323,4 @@ } Fallback "Unlit/Texture" -} +} \ No newline at end of file diff --git a/Shaders/Skin/SkinPlus.shader.meta b/Shaders/Skin/SkinPlus.shader.meta new file mode 100644 index 0000000..b3a9b8c --- /dev/null +++ b/Shaders/Skin/SkinPlus.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d820fcf50db6831439cef30c94145ce7 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/SkinPlusReflect.shader b/Shaders/Skin/SkinPlusReflect.shader index 8c59c61..51100c9 100644 --- a/Shaders/Skin/SkinPlusReflect.shader +++ b/Shaders/Skin/SkinPlusReflect.shader @@ -2,6 +2,12 @@ { Properties { + _ColMask ("Color Mask", 2D) = "black" {} + [Gamma]_Col0 ("Color 0", Color) = (1, 1, 1, 1) + [Gamma]_Col1 ("Color 1", Color) = (1, 1, 1, 1) + [Gamma]_Col2 ("Color 2", Color) = (1, 1, 1, 1) + [Gamma]_Col3 ("Color 3", Color) = (1, 1, 1, 1) + _MainTex ("MainTex", 2D) = "white" {} [Gamma]_overcolor1 ("Over Color1", Vector) = (1,1,1,1) _overtex1 ("Over Tex1", 2D) = "black" {} @@ -18,7 +24,8 @@ [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 [Gamma]_ShadowColor ("Shadow Color", Color) = (0.628,0.628,0.628,1) - [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) + [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,0) _DetailNormalMapScale ("DetailNormalMapScale", Range(0, 1)) = 1 _NormalMapScale ("NormalMapScale", Float) = 1 _SpeclarHeight ("Speclar Height", Range(0, 1)) = 0.98 @@ -55,6 +62,7 @@ _LineWidthS ("LineWidthS", Float) = 1 [Enum(Off,0,On,1)]_OutlineOn ("Outline On", Float) = 1.0 [Gamma]_OutlineColor ("Outline Color", Color) = (0, 0, 0, 0) + _UseKKPRim ("Use KKP Rim", Range(0 ,1)) = 0 [Gamma]_KKPRimColor ("Body Rim Color", Color) = (1.0, 1.0, 1.0, 1.0) _KKPRimSoft ("Body Rim Softness", Float) = 1.5 @@ -65,11 +73,23 @@ _ReflectMap ("Reflect Body Map", 2D) = "white" {} _Roughness ("Roughness", Range(0, 1)) = 0.75 _ReflectionVal ("ReflectionVal", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) _ReflectionMapCap ("Matcap", 2D) = "white" {} _UseMatCapReflection ("Use Matcap or Env", Range(0, 1)) = 1.0 _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} + + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -86,7 +106,8 @@ CGPROGRAM #pragma vertex vert #pragma fragment frag - + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + #include "UnityCG.cginc" #include "Lighting.cginc" @@ -95,6 +116,7 @@ Varyings vert (VertexData v) { Varyings o; + o.posWS = mul(unity_ObjectToWorld, v.vertex); float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; float viewVal = dot(viewDir, viewDir); @@ -103,7 +125,7 @@ float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal * _LineWidthS; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB; float3 invertSquare; @@ -130,22 +152,23 @@ o.uv1 = v.uv1; o.uv2 = v.uv2; o.uv3 = v.uv3; + 1; return o; } - - + + fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target { + + //Defined in Diffuse.cginc - AlphaClip(i.uv0, _OutlineOn ? 1 : 0); + AlphaClip(i.uv0, _OutlineOn ? 1 : 0); float3 diffuse = GetDiffuse(i); float3 u_xlat1; MapValuesOutline(diffuse, u_xlat1); - - bool3 compTest = 0.555555582 < u_xlat1.xyz; float3 diffuseShaded = u_xlat1.xyz * 0.899999976 - 0.5; diffuseShaded = -diffuseShaded * 2 + 1; @@ -171,7 +194,7 @@ } float3 finalDiffuse = diffuse * u_xlat1; float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float detailGInv = 1 - detailMask.g; detailGInv = detailGInv * 0.5 + 0.5; @@ -190,12 +213,10 @@ float3 finalColor = finalDiffuse * outLineCol; finalColor = lerp(finalColor, _OutlineColor.rgb, _OutlineColor.a); - return float4(finalColor, 1.0); - - + return float4(max(finalColor, 1E-06), 1.0); } - + ENDCG } @@ -208,17 +229,17 @@ Blend One OneMinusSrcAlpha, One OneMinusSrcAlpha Cull Off - CGPROGRAM #pragma target 3.0 #pragma vertex vert #pragma fragment frag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN #define KKP_EXPENSIVE_RAMP - + //Unity Includes #include "UnityCG.cginc" #include "AutoLight.cginc" @@ -226,14 +247,14 @@ #include "KKPSkinInput.cginc" - + #include "KKPDiffuse.cginc" #include "KKPNormals.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" - #include "KKPLighting.cginc" + #include "../KKPLighting.cginc" #include "../KKPEmission.cginc" - #include "KKPCoom.cginc" + #include "../KKPCoom.cginc" #include "KKPSkinFrag.cginc" @@ -251,7 +272,7 @@ o.uv1 = v.uv1; o.uv2 = v.uv2; o.uv3 = v.uv3; - + #ifdef SHADOWS_SCREEN float4 projPos = o.posCS; projPos.y *= _ProjectionParams.x; @@ -263,27 +284,39 @@ #endif return o; } - - + + ENDCG } //Reflection Pass - Pass{ + Pass { Name "Reflect" LOD 600 - Tags { "LightMode" = "Always" "Queue" = "Transparent-100" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent-100" "RenderType" = "Transparent" "ShadowSupport" = "true" } Blend [_ReflBlendSrc] [_ReflBlendDst] + CGPROGRAM #pragma target 3.0 #pragma vertex vert #pragma fragment reflectfrag + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN #include "UnityCG.cginc" + #include "AutoLight.cginc" #include "Lighting.cginc" + #include "KKPSkinInput.cginc" #include "KKPDiffuse.cginc" #include "KKPNormals.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPLighting.cginc" + #include "KKPSkinReflect.cginc" Varyings vert (VertexData v) @@ -296,14 +329,24 @@ float3 biTan = cross(o.tanWS, o.normalWS); o.bitanWS = normalize(biTan); o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif return o; } - + ENDCG } - + //ShadowCaster Pass { @@ -317,17 +360,13 @@ #pragma vertex vert #pragma fragment frag #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" - sampler2D _AlphaMask; - float4 _AlphaMask_ST; - - float _alpha_a; - float _alpha_b; - + #include "KKPSkinInput.cginc" - struct v2f { + struct v2f { float2 uv0 : TEXCOORD1; V2F_SHADOW_CASTER; }; @@ -342,8 +381,9 @@ float4 frag(v2f i) : SV_Target { + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); @@ -355,10 +395,10 @@ SHADOW_CASTER_FRAGMENT(i) } - + ENDCG } - + } Fallback "Unlit/Texture" } diff --git a/Shaders/Skin/SkinPlusReflect.shader.meta b/Shaders/Skin/SkinPlusReflect.shader.meta new file mode 100644 index 0000000..36ba03f --- /dev/null +++ b/Shaders/Skin/SkinPlusReflect.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0e6d3be3e71a87e449bcb0a8eed111f1 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/SkinPlusTess.shader b/Shaders/Skin/SkinPlusTess.shader index 7522e7c..6a26c24 100644 --- a/Shaders/Skin/SkinPlusTess.shader +++ b/Shaders/Skin/SkinPlusTess.shader @@ -2,6 +2,12 @@ { Properties { + _ColMask ("Color Mask", 2D) = "black" {} + [Gamma]_Col0 ("Color 0", Color) = (1, 1, 1, 1) + [Gamma]_Col1 ("Color 1", Color) = (1, 1, 1, 1) + [Gamma]_Col2 ("Color 2", Color) = (1, 1, 1, 1) + [Gamma]_Col3 ("Color 3", Color) = (1, 1, 1, 1) + _MainTex ("MainTex", 2D) = "white" {} [Gamma]_overcolor1 ("Over Color1", Vector) = (1,1,1,1) _overtex1 ("Over Tex1", 2D) = "black" {} @@ -17,7 +23,8 @@ _EmissionMask ("Emission Mask", 2D) = "black" {} [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 - [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + [Gamma]_ShadowColor ("Shadow Color", Color) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,0) _DetailNormalMapScale ("DetailNormalMapScale", Range(0, 1)) = 1 _NormalMapScale ("NormalMapScale", Float) = 1 @@ -74,6 +81,13 @@ _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 _DisplaceFull("Displace Full", Range(-1, 1)) = 0 _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + + _DisablePointLights ("Disable Point Lights", Float) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -94,6 +108,7 @@ #pragma fragment frag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -118,7 +133,7 @@ float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal * _LineWidthS; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB; float3 invertSquare; @@ -145,6 +160,7 @@ o.uv1 = v.uv1; o.uv2 = v.uv2; o.uv3 = v.uv3; + 1; return o; } @@ -152,6 +168,8 @@ fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target { + + //Defined in Diffuse.cginc AlphaClip(i.uv0, _OutlineOn ? 1 : 0); float3 diffuse = GetDiffuse(i); @@ -185,7 +203,7 @@ } float3 finalDiffuse = diffuse * u_xlat1; float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float detailGInv = 1 - detailMask.g; detailGInv = detailGInv * 0.5 + 0.5; @@ -204,9 +222,7 @@ float3 finalColor = finalDiffuse * outLineCol; finalColor = lerp(finalColor, _OutlineColor.rgb, _OutlineColor.a); - return float4(finalColor, 1.0); - - + return float4(max(finalColor, 1e-06), 1.0); } @@ -230,6 +246,7 @@ #pragma fragment frag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN @@ -248,9 +265,9 @@ #include "KKPNormals.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" - #include "KKPLighting.cginc" + #include "../KKPLighting.cginc" #include "../KKPEmission.cginc" - #include "KKPCoom.cginc" + #include "../KKPCoom.cginc" #include "KKPSkinFrag.cginc" @@ -314,6 +331,7 @@ #pragma hull hull #pragma domain domain #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #define SHADOW_CASTER_PASS @@ -342,8 +360,9 @@ #include "KKPTess.cginc" float4 frag(v2f i) : SV_Target { + float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); diff --git a/Shaders/Skin/SkinPlusTess.shader.meta b/Shaders/Skin/SkinPlusTess.shader.meta new file mode 100644 index 0000000..17640f7 --- /dev/null +++ b/Shaders/Skin/SkinPlusTess.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f059880ff480b7c4a876100c0ec65379 +timeCreated: 1705466961 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Shaders/Skin/SkinPlusTessReflect.shader b/Shaders/Skin/SkinPlusTessReflect.shader index 9ccfb33..efe1c3e 100644 --- a/Shaders/Skin/SkinPlusTessReflect.shader +++ b/Shaders/Skin/SkinPlusTessReflect.shader @@ -2,6 +2,12 @@ { Properties { + _ColMask ("Color Mask", 2D) = "black" {} + [Gamma]_Col0 ("Color 0", Color) = (1, 1, 1, 1) + [Gamma]_Col1 ("Color 1", Color) = (1, 1, 1, 1) + [Gamma]_Col2 ("Color 2", Color) = (1, 1, 1, 1) + [Gamma]_Col3 ("Color 3", Color) = (1, 1, 1, 1) + _MainTex ("MainTex", 2D) = "white" {} [Gamma]_overcolor1 ("Over Color1", Vector) = (1,1,1,1) _overtex1 ("Over Tex1", 2D) = "black" {} @@ -17,7 +23,8 @@ _EmissionMask ("Emission Mask", 2D) = "black" {} [Gamma]_EmissionColor("Emission Color", Color) = (1, 1, 1, 1) _EmissionIntensity("Emission Intensity", Float) = 1 - [Gamma]_ShadowColor ("Shadow Color", Vector) = (0.628,0.628,0.628,1) + [Gamma]_ShadowColor ("Shadow Color", Color) = (0.628,0.628,0.628,1) + _ShadowHSV ("Shadow HSV", Vector) = (0, 0, 0, 0) [Gamma]_SpecularColor ("Specular Color", Vector) = (1,1,1,0) _DetailNormalMapScale ("DetailNormalMapScale", Range(0, 1)) = 1 _NormalMapScale ("NormalMapScale", Float) = 1 @@ -71,6 +78,10 @@ _ReflBlendSrc ("Reflect Blend Src", Float) = 2.0 _ReflBlendDst ("Reflect Blend Dst", Float) = 0.0 _ReflBlendVal ("Reflect Blend Val", Range(0, 1)) = 1.0 + [Gamma]_ReflectCol("Reflection Color", Color) = (1, 1, 1, 1) + _ReflectColMix ("Reflection Color Mix Amount", Range(0,1)) = 1 + _ReflectRotation ("Matcap Rotation", Range(0, 360)) = 0 + _ReflectMask ("Reflect Body Mask", 2D) = "white" {} _TessTex ("Tess Tex", 2D) = "white" {} _TessMax("Tess Max", Range(1, 25)) = 4 @@ -83,6 +94,14 @@ _DisplaceNormalMultiplier("DisplaceNormalMultiplier", float) = 1 _DisplaceFull("Displace Full", Range(-1, 1)) = 0 _Clock ("W is for displacement multiplier for animation", Vector) = (0,0,0,1) + + _DisablePointLights ("Disable Point Lights", Range(0,1)) = 0.0 + _DisableShadowedMatcap ("Disable Shadowed Matcap", Range(0,1)) = 0.0 + [MaterialToggle] _AdjustBackfaceNormals ("Adjust Backface Normals", Float) = 0.0 + _rimReflectMode ("Rimlight Placement", Float) = 0.0 + + _SpecularNormalScale ("Specular Normal Map Relative Scale", Float) = 1 + _SpecularDetailNormalScale ("Specular Detail Normal Map Relative Scale", Float) = 1 } SubShader { @@ -103,6 +122,7 @@ #pragma fragment frag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #include "UnityCG.cginc" #include "Lighting.cginc" @@ -117,7 +137,7 @@ DisplacementValues(v, vertex, normal); v.vertex = vertex; v.normal = normal; - + Varyings o; o.posWS = mul(unity_ObjectToWorld, v.vertex); float3 viewDir = _WorldSpaceCameraPos.xyz - o.posWS.xyz; @@ -127,7 +147,7 @@ float lineVal = _linewidthG * 0.00499999989; viewVal *= lineVal * _LineWidthS; float2 detailMaskUV = v.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2Dlod(_DetailMask, float4(detailMaskUV, 0, 0)); + float4 detailMask = SAMPLE_TEX2D_LOD(_DetailMask, float4(detailMaskUV, 0, 0), 0); float detailB = 1 - detailMask.b; viewVal *= detailB; float3 invertSquare; @@ -154,21 +174,22 @@ o.uv1 = v.uv1; o.uv2 = v.uv2; o.uv3 = v.uv3; + 1; return o; } - + #include "KKPTess.cginc" fixed4 frag (Varyings i, int frontFace : VFACE) : SV_Target { + + //Defined in Diffuse.cginc - AlphaClip(i.uv0, _OutlineOn ? 1 : 0); + AlphaClip(i.uv0, _OutlineOn ? 1 : 0); float3 diffuse = GetDiffuse(i); float3 u_xlat1; MapValuesOutline(diffuse, u_xlat1); - - bool3 compTest = 0.555555582 < u_xlat1.xyz; float3 diffuseShaded = u_xlat1.xyz * 0.899999976 - 0.5; diffuseShaded = -diffuseShaded * 2 + 1; @@ -194,7 +215,7 @@ } float3 finalDiffuse = diffuse * u_xlat1; float2 detailMaskUV = i.uv0 * _DetailMask_ST.xy + _DetailMask_ST.zw; - float4 detailMask = tex2D(_DetailMask, detailMaskUV); + float4 detailMask = SAMPLE_TEX2D(_DetailMask, detailMaskUV); float detailGInv = 1 - detailMask.g; detailGInv = detailGInv * 0.5 + 0.5; @@ -213,12 +234,10 @@ float3 finalColor = finalDiffuse * outLineCol; finalColor = lerp(finalColor, _OutlineColor.rgb, _OutlineColor.a); - return float4(finalColor, 1.0); - - + return float4(max(finalColor, 1e-06), 1.0); } - + ENDCG } @@ -239,11 +258,12 @@ #pragma fragment frag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #pragma multi_compile _ VERTEXLIGHT_ON #pragma multi_compile _ SHADOWS_SCREEN #define KKP_EXPENSIVE_RAMP - + //Unity Includes #include "UnityCG.cginc" #include "AutoLight.cginc" @@ -257,9 +277,9 @@ #include "KKPNormals.cginc" #include "../KKPVertexLights.cginc" #include "../KKPVertexLightsSpecular.cginc" - #include "KKPLighting.cginc" + #include "../KKPLighting.cginc" #include "../KKPEmission.cginc" - #include "KKPCoom.cginc" + #include "../KKPCoom.cginc" #include "KKPSkinFrag.cginc" @@ -285,7 +305,7 @@ o.uv1 = v.uv1; o.uv2 = v.uv2; o.uv3 = v.uv3; - + #ifdef SHADOWS_SCREEN float4 projPos = o.posCS; projPos.y *= _ProjectionParams.x; @@ -297,8 +317,8 @@ #endif return o; } - - + + #include "KKPTess.cginc" @@ -309,7 +329,7 @@ Pass{ Name "Reflect" LOD 600 - Tags { "LightMode" = "Always" "Queue" = "Transparent-100" "RenderType" = "Transparent" "ShadowSupport" = "true" } + Tags { "LightMode" = "ForwardBase" "Queue" = "Transparent-100" "RenderType" = "Transparent" "ShadowSupport" = "true" } Blend [_ReflBlendSrc] [_ReflBlendDst] CGPROGRAM #pragma target 5.0 @@ -317,16 +337,29 @@ #pragma fragment reflectfrag #pragma hull hull #pragma domain domain + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu + + #pragma multi_compile _ VERTEXLIGHT_ON + #pragma multi_compile _ SHADOWS_SCREEN + + #define KKP_EXPENSIVE_RAMP #include "UnityCG.cginc" + #include "AutoLight.cginc" #include "Lighting.cginc" + #include "KKPSkinInput.cginc" #include "KKPDiffuse.cginc" #include "../KKPDisplace.cginc" #include "KKPNormals.cginc" + #include "../KKPCoom.cginc" + #include "../KKPVertexLights.cginc" + #include "../KKPVertexLightsSpecular.cginc" + #include "../KKPLighting.cginc" + #include "KKPSkinReflect.cginc" - + Varyings vert (VertexData v) { Varyings o; @@ -342,6 +375,16 @@ float3 biTan = cross(o.tanWS, o.normalWS); o.bitanWS = normalize(biTan); o.uv0 = v.uv0; + + #ifdef SHADOWS_SCREEN + float4 projPos = o.posCS; + projPos.y *= _ProjectionParams.x; + float4 projbiTan; + projbiTan.xyz = biTan; + projbiTan.xzw = projPos.xwy * 0.5; + o.shadowCoordinate.zw = projPos.zw; + o.shadowCoordinate.xy = projbiTan.zz + projbiTan.xw; + #endif return o; } #include "KKPTess.cginc" @@ -349,7 +392,7 @@ ENDCG } - + //ShadowCaster Pass { @@ -367,6 +410,7 @@ #pragma hull hull #pragma domain domain #pragma multi_compile_shadowcaster + #pragma only_renderers d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu #define SHADOW_CASTER_PASS @@ -374,7 +418,7 @@ #include "KKPSkinInput.cginc" #include "../KKPDisplace.cginc" #define TESS_LOW - struct v2f { + struct v2f { float2 uv0 : TEXCOORD1; V2F_SHADOW_CASTER; }; @@ -396,7 +440,7 @@ float4 frag(v2f i) : SV_Target { float2 alphaUV = i.uv0 * _AlphaMask_ST.xy + _AlphaMask_ST.zw; - float4 alphaMask = tex2D(_AlphaMask, alphaUV); + float4 alphaMask = SAMPLE_TEX2D(_AlphaMask, alphaUV); float2 alphaVal = -float2(_alpha_a, _alpha_b) + float2(1.0f, 1.0f); alphaVal = max(alphaVal, alphaMask.xy); alphaVal = min(alphaVal.y, alphaVal.x); @@ -408,10 +452,10 @@ SHADOW_CASTER_FRAGMENT(i) } - + ENDCG } - + } Fallback "Unlit/Texture" } diff --git a/Shaders/Skin/SkinPlusTessReflect.shader.meta b/Shaders/Skin/SkinPlusTessReflect.shader.meta new file mode 100644 index 0000000..bc90e27 --- /dev/null +++ b/Shaders/Skin/SkinPlusTessReflect.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 079540e42ce71e4479f822e82e1b3d64 +timeCreated: 1705466960 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..6f9764b --- /dev/null +++ b/manifest.xml @@ -0,0 +1,1989 @@ + + + xukmi.Shaders.VanillaPlus + Vanilla Plus + 1.5.4 + xukmi + Vanilla KK Shaders with more features + https://www.pixiv.net/en/users/66587336 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Koikatsu + \ No newline at end of file diff --git a/manifest.xml.meta b/manifest.xml.meta new file mode 100644 index 0000000..b39e73a --- /dev/null +++ b/manifest.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 57eb5ab2c2a91794e82f96df8be4e93e +timeCreated: 1579020593 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: